From 6495040bbda5308c86e852ad1b080097bfa916a9 Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期三, 09 七月 2025 09:22:17 +0800 Subject: [PATCH] 优化粮温检测 --- src/main/java/com/fzzy/gateway/GatewayRunner.java | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/GatewayRunner.java b/src/main/java/com/fzzy/gateway/GatewayRunner.java index 9dbdcd8..ab5dc98 100644 --- a/src/main/java/com/fzzy/gateway/GatewayRunner.java +++ b/src/main/java/com/fzzy/gateway/GatewayRunner.java @@ -3,7 +3,6 @@ import com.fzzy.gateway.hx2023.service.ApiInitService; import com.fzzy.mqtt.MqttPublishService; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; @@ -20,13 +19,34 @@ @Resource private ApiInitService apiInitService; - @Autowired + @Resource private MqttPublishService mqttPublishService; + @Resource + private GatewayTimerScheduled scheduled; + + + @Override public void run(String... args) throws Exception { + + log.info("---------MQTT鍒濆鍖�--------------"); mqttPublishService.init(); - //鎵ц鍒濆鍖栨柟妗� + + //缃戝叧鍒濆鍖� + log.info("---------缃戝叧璁惧鍒濆鍖�--------------"); apiInitService.init(); + + + //鑾峰彇姘旇薄淇℃伅 + scheduled.doWeatherExe(); + + //鏇存柊璁惧缂撳瓨 + log.info("---------璁惧缂撳瓨鍒濆鍖�--------------"); + apiInitService.updateDeviceCache(); + + //鍒濆鍖栬溅鐗岃瘑鍒� + log.info("---------杞︾墝璇嗗埆鍒濆鍖�--------------"); + apiInitService.initAllLpr(); } } -- Gitblit v1.9.3