From af125e4ae9e92b5cc54d3a0b3b57229e698ee484 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 24 九月 2023 10:30:38 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/config/ScheduleConfig.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/lf/server/config/ScheduleConfig.java b/src/main/java/com/lf/server/config/ScheduleConfig.java
index 1fbe663..5bf3fad 100644
--- a/src/main/java/com/lf/server/config/ScheduleConfig.java
+++ b/src/main/java/com/lf/server/config/ScheduleConfig.java
@@ -5,14 +5,15 @@
 import com.lf.server.entity.data.FmeLogEntity;
 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.sys.AttachService;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -22,16 +23,24 @@
 @Component
 @EnableScheduling
 public class ScheduleConfig {
-    @Autowired
+    @Resource
     AttachService attachService;
 
-    @Autowired
+    @Resource
     ScheduleService scheduleService;
+
+    @Resource
+    AutoQueryService autoQueryService;
 
     private static boolean isBusy = false;
 
     private static final Log log = LogFactory.getLog(ScheduleConfig.class);
 
+    @Scheduled(cron = "0 0 1 * * ?")
+    public void autoQuery() {
+        autoQueryService.autoQuery();
+    }
+
     @Scheduled(fixedRate = 15 * 1000)
     public void pushMonitorInfo() {
         try {

--
Gitblit v1.9.3