|
@@ -2,10 +2,9 @@ package com.fdkankan.manage.service.impl;
|
|
|
|
|
|
import com.fdkankan.manage.mapper.IDataMapper;
|
|
|
import com.fdkankan.manage.service.IDataService;
|
|
|
-import com.fdkankan.manage.vo.response.CameraDataVo;
|
|
|
-import com.fdkankan.manage.vo.response.DataGroupByCount;
|
|
|
-import com.fdkankan.manage.vo.response.OrderDataGroupByCount;
|
|
|
-import com.fdkankan.manage.vo.response.SceneDataGroupByCount;
|
|
|
+import com.fdkankan.manage.service.IUserService;
|
|
|
+import com.fdkankan.manage.vo.response.*;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -23,6 +22,47 @@ public class DataService implements IDataService {
|
|
|
IDataMapper dataMapper;
|
|
|
|
|
|
@Override
|
|
|
+ public UserTotalVo getUserTotal() {
|
|
|
+ UserTotalVo totalVo = new UserTotalVo();
|
|
|
+ Long totalUserCount = dataMapper.totalUserCount("t_user",1);
|
|
|
+ Long preMonthAddCount = dataMapper.preMonthAddCount("t_user",1);
|
|
|
+ Long todayAddCount = dataMapper.todayAddCount("t_user",1);
|
|
|
+ Long todayActiveCount = dataMapper.todayActiveCount();
|
|
|
+
|
|
|
+ totalVo.setTotalUserCount(totalUserCount);
|
|
|
+ totalVo.setPreMonthAddCount(preMonthAddCount);
|
|
|
+ totalVo.setTodayAddCount(todayAddCount);
|
|
|
+ totalVo.setTodayActiveCount(todayActiveCount);
|
|
|
+ return totalVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SceneTotalVo sceneTotal() {
|
|
|
+ SceneTotalVo totalVo = new SceneTotalVo();
|
|
|
+ Long totalSceneCount = dataMapper.totalUserCount("t_scene_pro",0) + dataMapper.totalUserCount("t_scene_plus",1);
|
|
|
+ Long preMonthAddCount = dataMapper.preMonthAddCount("t_scene_pro",0) + dataMapper.preMonthAddCount("t_scene_plus",1);
|
|
|
+ Long todayAddCount = dataMapper.todayAddCount("t_scene_pro",0) + dataMapper.todayAddCount("t_scene_plus",1);
|
|
|
+
|
|
|
+ totalVo.setTotalSceneCount(totalSceneCount);
|
|
|
+ totalVo.setPreMonthAddCount(preMonthAddCount);
|
|
|
+ totalVo.setTodayAddCount(todayAddCount);
|
|
|
+ return totalVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public OrderTotalVo orderTotal() {
|
|
|
+ Long preMonthPowCount = dataMapper.preMonthAddCount("t_increment_order",2);
|
|
|
+ Long preMonthDownCount = dataMapper.preMonthAddCount("t_download_order",2);
|
|
|
+ // Long preMonthPartCount = dataMapper.preMonthAddCount("t_increment_order",1);
|
|
|
+ OrderTotalVo totalVo = new OrderTotalVo();
|
|
|
+ totalVo.setPreMonThPowCount(preMonthPowCount);
|
|
|
+ totalVo.setPreMonThDownCount(preMonthDownCount);
|
|
|
+ totalVo.setPreMonThPartCount(0L);
|
|
|
+
|
|
|
+ return totalVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public CameraDataVo cameraData() {
|
|
|
CameraDataVo cameraDataVo = new CameraDataVo();
|
|
|
// 0KK 1KK 2KK 9KJ 10SS
|