From 9f9bb44e743b8c8354e92cc604bc9fd96c5d0baf Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Sat, 21 Sep 2024 17:00:03 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=B5=E5=8D=95=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/jsowell/common/constant/CacheConstants.java | 3 +++ .../pile/service/impl/PileConnectorInfoServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jsowell-common/src/main/java/com/jsowell/common/constant/CacheConstants.java b/jsowell-common/src/main/java/com/jsowell/common/constant/CacheConstants.java index ea4bc4aa9..babf27661 100644 --- a/jsowell-common/src/main/java/com/jsowell/common/constant/CacheConstants.java +++ b/jsowell-common/src/main/java/com/jsowell/common/constant/CacheConstants.java @@ -17,6 +17,9 @@ public class CacheConstants { // 缓存时间 5分钟 public static final int cache_expire_time_5m = cache_expire_time_1m * 5; + // 缓存时间 6分钟 + public static final int cache_expire_time_6m = cache_expire_time_1m * 6; + // 缓存时间 10分钟 public static final int cache_expire_time_10m = cache_expire_time_1m * 10; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java index 122b33bb5..f99914013 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java @@ -625,7 +625,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService { // 只修改一个枪口的状态 num = pileConnectorInfoMapper.updateConnectorStatus(pileConnectorCode, status); deleteRedisByPileSnOrPileConnectorCode(pileSn, pileConnectorCode); - redisCache.setCacheObject(redisKey, status, CacheConstants.cache_expire_time_5m); + redisCache.setCacheObject(redisKey, status, CacheConstants.cache_expire_time_6m); // 异步放缓存 CompletableFuture.runAsync(() -> statusChange(pileConnectorCode), executor);