From d193355c76cfbec572408f9a256c970699c9a542 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 18 三月 2026 15:12:55 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/impl/ZyRgvThread.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 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 4e9d007..2a24566 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
@@ -1,7 +1,7 @@
package com.zy.core.thread.impl;
import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.DateUtils;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasRgv;
@@ -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.utils.DeviceLogRedisKeyBuilder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -139,7 +140,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);
+ redisUtil.set(DeviceLogRedisKeyBuilder.build(deviceDataLog), deviceDataLog, 60 * 60 * 24);
rgvProtocol.setDeviceDataLog(System.currentTimeMillis());
}
@@ -158,7 +159,7 @@
log.setStatus(1);
log.setCreateTime(new Date());
log.setSystemStatus(JSON.toJSONString(rgvProtocol));
- errLogService.insert(log);
+ errLogService.save(log);
if (log.getId() != null) {
redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24);
}
@@ -185,13 +186,13 @@
}
if (basRgvService != null) {
- BasRgv basRgv = basRgvService.selectOne(new EntityWrapper<BasRgv>().eq("rgv_no", deviceConfig.getDeviceNo()));
+ BasRgv basRgv = basRgvService.getOne(new QueryWrapper<BasRgv>().eq("rgv_no", deviceConfig.getDeviceNo()));
if(basRgv == null) {
basRgv = new BasRgv();
basRgv.setRgvNo(deviceConfig.getDeviceNo());
basRgv.setStatus(1);
basRgv.setCreateTime(new Date());
- basRgvService.insert(basRgv);
+ basRgvService.save(basRgv);
}
}
}
@@ -268,7 +269,7 @@
JSON.toJSONString(response)
);
if (bean != null) {
- bean.insert(basRgvOpt);
+ bean.save(basRgvOpt);
}
}
}
--
Gitblit v1.9.1