From e154b0c0dca51d5368859e46f54e33d11096d212 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Thu, 12 Sep 2024 16:45:04 +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 --- .../pile/service/impl/OrderBasicInfoServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index 1b3f95988..dbef3d7b9 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -1950,10 +1950,18 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { if (StringUtils.isBlank(transactionCode)) { return resultList; } - String pileConnectorCode = transactionCode.substring(0, 16); + String pileConnectorCode = transactionCode.substring(0, 16); // 汽车桩 String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode; // 拿到所有数据 Map map = redisCache.hmget(redisKey); + + if (map == null) { + // 按照电单车重新查 + pileConnectorCode = transactionCode.substring(0, 10); // 电单车车桩 + redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode; + map = redisCache.hmget(redisKey); + } + if (map != null && !map.isEmpty()) { List keyList = map.keySet().stream() .map(x -> (String) x)