|
@@ -1,20 +1,40 @@
|
|
|
package com.zhongzheng.modules.base.service.impl;
|
|
|
|
|
|
|
|
|
+import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
|
|
|
import com.zhongzheng.modules.base.service.IConsoleService;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderService;
|
|
|
+import com.zhongzheng.modules.user.service.IUserService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
@Service
|
|
|
-public class ConsoleServiceImpl implements IConsoleService {
|
|
|
+public class ConsoleServiceImpl implements IConsoleService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IOrderService iOrderService;
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> getStudentData(ConsoleQueryBo bo) {
|
|
|
-
|
|
|
- return null;
|
|
|
+ Integer allNum = iOrderService.getConsoleStudentNum(bo);
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
|
|
|
+ bo.setEndTime(cal.getTimeInMillis() / 1000);
|
|
|
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
|
|
+ bo.setStartTime(cal.getTimeInMillis() / 1000);
|
|
|
+
|
|
|
+ Integer yesNum = iOrderService.getConsoleStudentNum(bo); //昨天人数
|
|
|
+ System.out.println(Calendar.DAY_OF_MONTH);
|
|
|
+ System.out.println(bo);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("allStudent",allNum);
|
|
|
+ map.put("ytdStudent",yesNum);
|
|
|
+ return map;
|
|
|
}
|
|
|
}
|