From 4fc68eb0cafb74ff56796062e60a3e720898c378 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 13 三月 2024 17:13:47 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/config/ScheduleConfig.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/config/ScheduleConfig.java b/src/main/java/com/lf/server/config/ScheduleConfig.java index 5bf3fad..0221adb 100644 --- a/src/main/java/com/lf/server/config/ScheduleConfig.java +++ b/src/main/java/com/lf/server/config/ScheduleConfig.java @@ -6,9 +6,11 @@ import com.lf.server.service.all.ScheduleService; import com.lf.server.service.all.WebSocketService; import com.lf.server.service.show.AutoQueryService; +import com.lf.server.service.show.OneMapService; import com.lf.server.service.sys.AttachService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.ibatis.annotations.Result; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -32,6 +34,9 @@ @Resource AutoQueryService autoQueryService; + @Resource + OneMapService oneMapService; + private static boolean isBusy = false; private static final Log log = LogFactory.getLog(ScheduleConfig.class); @@ -41,6 +46,12 @@ autoQueryService.autoQuery(); } + @Scheduled(cron = "0 0 2 * * ?") + public void calcData() { + String str = oneMapService.calcData(); + log.info("璁$畻鏁版嵁锛�" + str); + } + @Scheduled(fixedRate = 15 * 1000) public void pushMonitorInfo() { try { -- Gitblit v1.9.3