From b02941ddef861e951358176436c50c62b4437c58 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 31 三月 2025 14:15:23 +0800 Subject: [PATCH] IailabData缓存 bug --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsde.java | 2 +- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdc.java | 2 +- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdb.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdb.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdb.java index e5d6d78..db158d2 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdb.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdb.java @@ -58,7 +58,7 @@ List<HttpAsdbRespDataVO> dataList = JSON.parseArray(responseStr, HttpAsdbRespDataVO.class); log.info("存入IailabData缓存: " + catchKey); dataList.forEach(item -> { - redisTemplate.opsForValue().set(catchKey, item.getValue().toString(), offset, TimeUnit.SECONDS); + redisTemplate.opsForValue().set("IailabData:" + httpApi.getCode() + ":" + item.getPoint(), item.getValue().toString(), offset, TimeUnit.SECONDS); }); for (HttpAsdbRespDataVO data : dataList){ if (tagNo.equals(data.getPoint())){ diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdc.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdc.java index c04fecb..17646c2 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdc.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsdc.java @@ -62,7 +62,7 @@ List<HttpAsdbRespDataVO> dataList = JSON.parseArray(responseStr, HttpAsdbRespDataVO.class); log.info("存入IailabData缓存: " + catchKey); dataList.forEach(item -> { - redisTemplate.opsForValue().set(catchKey, item.getValue().toString(), offset, TimeUnit.SECONDS); + redisTemplate.opsForValue().set("IailabData:" + httpApi.getCode() + ":" + item.getPoint(), item.getValue().toString(), offset, TimeUnit.SECONDS); }); for (HttpAsdbRespDataVO data : dataList){ if (tagNo.equals(data.getPoint())){ diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsde.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsde.java index 13e0015..2149ec0 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsde.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/asdb/HttpCollectorForAsde.java @@ -62,7 +62,7 @@ List<HttpAsdbRespDataVO> dataList = JSON.parseArray(responseStr, HttpAsdbRespDataVO.class); log.info("存入IailabData缓存: " + catchKey); dataList.forEach(item -> { - redisTemplate.opsForValue().set(catchKey, item.getValue().toString(), offset, TimeUnit.SECONDS); + redisTemplate.opsForValue().set("IailabData:" + httpApi.getCode() + ":" + item.getPoint(), item.getValue().toString(), offset, TimeUnit.SECONDS); }); for (HttpAsdbRespDataVO data : dataList){ if (tagNo.equals(data.getPoint())){ -- Gitblit v1.9.3