提交 2f227c7c 作者: xiaowang

定时器

上级 aae8d5d7
...@@ -2,6 +2,7 @@ package com.mmc.iuav.user.schedule; ...@@ -2,6 +2,7 @@ package com.mmc.iuav.user.schedule;
import com.mmc.iuav.user.model.vo.data.ActiveUserCountVO; import com.mmc.iuav.user.model.vo.data.ActiveUserCountVO;
import com.mmc.iuav.user.service.data.UserReportService; import com.mmc.iuav.user.service.data.UserReportService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -12,7 +13,7 @@ import java.util.Calendar; ...@@ -12,7 +13,7 @@ import java.util.Calendar;
* @author lw * @author lw
*/ */
@Component @Component
//@ConditionalOnProperty(prefix = "scheduling", name = "enabled", havingValue = "true") @ConditionalOnProperty(prefix = "scheduling", name = "enabled", havingValue = "true")
public class ManagerLogSchedule { public class ManagerLogSchedule {
@Resource @Resource
UserReportService userReportService; UserReportService userReportService;
...@@ -20,7 +21,7 @@ public class ManagerLogSchedule { ...@@ -20,7 +21,7 @@ public class ManagerLogSchedule {
/** /**
* 统计日活量 * 统计日活量
*/ */
@Scheduled(cron = "0 0 8 * * ?") @Scheduled(cron = "0 0 10 * * ?")
public void calculateActiveUserCount() { public void calculateActiveUserCount() {
Integer userActiveCount = userReportService.getUserActiveCount(); Integer userActiveCount = userReportService.getUserActiveCount();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论