From 6dfd2599d2e52507e018fd4c6b35d38873e48cfb Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期四, 17 三月 2022 15:52:51 +0800 Subject: [PATCH] 最新版本 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java index 1156308..c1d17a5 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java @@ -1,6 +1,5 @@ package cn.exrick.xboot.your.schedulings; import cn.exrick.xboot.core.common.redis.RedisTemplateHelper; -import cn.exrick.xboot.core.entity.User; import cn.exrick.xboot.core.service.MessageService; import cn.exrick.xboot.core.service.UserService; import cn.exrick.xboot.your.entity.*; @@ -11,9 +10,7 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import java.io.IOException; import java.util.Date; -import java.util.List; //澶у睆棣栭〉缁熻 @Component public class StatisticPcScheduleImpl { @@ -47,9 +44,6 @@ @Autowired private IRemoteCallService iRemoteCallService; - - @Autowired - private IEquipmentService iEquipmentService; @Autowired private IEventLogService eventLogService; @@ -87,14 +81,17 @@ redisTemplate.set(HEAD+"likeRate",(i*100)/count+"");//浜掑姩鐜� } + String format = DateUtil.format(new Date(), "yyyy-MM-dd"); - redisTemplate.set(HEAD+"outCar",iEquipmentService.countByTypeAndStatus(0)+"");//鍑哄彂杞﹁締 + QueryWrapper<DrivingRecord> wp = new QueryWrapper<>(); + wp.between("create_time",format+" 00:00:00",format+" 23:59:59"); + redisTemplate.set(HEAD+"outCar",iDrivingRecordService.count(wp)+"");//鍑哄彂杞﹁締 + QueryWrapper<EventLog> wrapper2=new QueryWrapper<>(); wrapper2.eq("type",5); redisTemplate.set(HEAD+"open",eventLogService.count(wrapper2)+"");//鍗遍櫓寮�鍚� QueryWrapper<Customer> wrapper = new QueryWrapper<>(); - String format = DateUtil.format(new Date(), "yyyy-MM-dd"); wrapper.between("create_time",format+" 00:00:00",format+" 23:59:59"); redisTemplate.set(HEAD+"addCustomer",iCustomerService.count(wrapper)+"");//浠婃棩鏂板鍟嗘埛 } -- Gitblit v1.9.1