update 加注释

This commit is contained in:
Guoqs
2025-08-26 16:21:20 +08:00
parent 4e7bf56522
commit b598939be9
4 changed files with 5 additions and 7 deletions

View File

@@ -2925,14 +2925,14 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
return resultList;
}
String pileConnectorCode = transactionCode.substring(0, 16); // 汽车桩
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode;
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode; // 查缓存
// 拿到所有数据
Map<Object, Object> map = redisCache.hmget(redisKey);
// logger.debug("查redis中的实时数据, pileConnectorCode:{}, transactionCode:{}, map:{}", pileConnectorCode, transactionCode, map);
if (map == null || map.isEmpty()) {
// 按照电单车重新查
pileConnectorCode = transactionCode.substring(0, 10); // 电单车车桩
redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode;
redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode; // 查缓存
map = redisCache.hmget(redisKey);
// logger.debug("按照电单车重新查, pileConnectorCode:{}, transactionCode:{}, map:{}", pileConnectorCode, transactionCode, map);
}

View File

@@ -641,7 +641,7 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
}
// 保存到redis
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + realTimeMonitorData.getPileConnectorCode() + "_" + realTimeMonitorData.getTransactionCode();
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + realTimeMonitorData.getPileConnectorCode() + "_" + realTimeMonitorData.getTransactionCode(); // 放缓存
// 设置接收到实时数据的时间
Date now = new Date();
@@ -657,8 +657,6 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
// 设置过期时间
try {
redisCache.expire(redisKey, CacheConstants.cache_expire_time_30d);
// if (redisCache.getExpire(redisKey) < 0) {
// }
} catch (Exception e) {
log.info("设置过期时间error", e);
}

View File

@@ -878,7 +878,7 @@ public abstract class AbstractProgramLogic implements InitializingBean {
if (insert > 0) {
// 删除redis中缓存
String pileConnectorCode = transactionCode.substring(0, 16);
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode;
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + pileConnectorCode + "_" + transactionCode; // 删缓存
redisCache.deleteObject(redisKey);
}
} catch (Exception e) {