From e50a43bb067adff10cd1dcc81349b1aafdfda882 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 22 一月 2026 13:18:44 +0800
Subject: [PATCH] 业务管理:IFS域区分【ZTNS】和【KJNS】
---
cnas-device/src/main/java/com/ruoyi/device/controller/WeightController.java | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/controller/WeightController.java b/cnas-device/src/main/java/com/ruoyi/device/controller/WeightController.java
index 6e51c4c..763ac61 100644
--- a/cnas-device/src/main/java/com/ruoyi/device/controller/WeightController.java
+++ b/cnas-device/src/main/java/com/ruoyi/device/controller/WeightController.java
@@ -39,7 +39,15 @@
// return ResponseEntity.internalServerError().body("鏁版嵁澶勭悊澶辫触: " + e.getMessage());
// }
if(Objects.nonNull(weightRequest) && CollectionUtil.isNotEmpty(weightRequest.getWeights())){
- RedisUtil.lSet(WeightRequestDto.DENSITY,weightRequest.getWeights());
+ List<?> objectList = RedisUtil.lGet(WeightRequestDto.DENSITY, 0, -1);
+ if(CollectionUtil.isNotEmpty(objectList)){
+ // 鍒犻櫎 Redis 涓棫鐨勫垪琛ㄦ暟鎹�
+ RedisUtil.del(WeightRequestDto.DENSITY);
+ // 瀛樺叆鏂扮殑鏁版嵁
+ RedisUtil.lSet(WeightRequestDto.DENSITY, weightRequest.getWeights());
+ }else {
+ RedisUtil.lSet(WeightRequestDto.DENSITY,weightRequest.getWeights());
+ }
return Result.success(null,"淇濆瓨鎴愬姛");
}
return Result.fail();
--
Gitblit v1.9.3