From 852664df1caf38831793b341edcada9dd7b6c22a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 06 五月 2026 19:28:33 +0800
Subject: [PATCH] #dfs

---
 src/main/java/com/zy/core/thread/impl/ZyRgvThread.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
index 9b258da..76ce1d5 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
@@ -25,6 +25,7 @@
 import com.zy.core.network.ZyRgvConnectDriver;
 import com.zy.core.network.entity.ZyRgvStatusEntity;
 import com.zy.core.thread.RgvThread;
+import com.zy.core.task.DeviceAsyncLogPublisher;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 
@@ -42,10 +43,12 @@
     private ZyRgvConnectDriver zyRgvConnectDriver;
     private RgvProtocol rgvProtocol;
     private int deviceLogCollectTime = 200;
+    private final DeviceAsyncLogPublisher deviceAsyncLogPublisher;
 
     public ZyRgvThread(DeviceConfig deviceConfig, RedisUtil redisUtil) {
         this.deviceConfig = deviceConfig;
         this.redisUtil = redisUtil;
+        this.deviceAsyncLogPublisher = SpringUtils.getBean(DeviceAsyncLogPublisher.class);
     }
 
     @Override
@@ -139,7 +142,7 @@
             deviceDataLog.setType(String.valueOf(SlaveType.Rgv));
             deviceDataLog.setDeviceNo(rgvProtocol.getRgvNo());
             deviceDataLog.setCreateTime(new Date());
-            redisUtil.set(RedisKeyType.DEVICE_LOG_KEY.key + System.currentTimeMillis(), deviceDataLog, 60 * 60 * 24);
+            deviceAsyncLogPublisher.publishLatest(deviceDataLog);
             rgvProtocol.setDeviceDataLog(System.currentTimeMillis());
         }
 

--
Gitblit v1.9.1