新增 查询充电启动状态缓存,查询启动充电结果逻辑

This commit is contained in:
Lemon
2025-12-10 11:13:30 +08:00
parent 37decc1e6d
commit fbc97a0cd9
4 changed files with 23 additions and 4 deletions

View File

@@ -709,9 +709,17 @@ public class OrderService {
reason = orderInfo.getReason();
} else {
// 查询订单的实时监测数据
List<RealTimeMonitorData> chargingRealTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode());
if (CollectionUtils.isNotEmpty(chargingRealTimeData)) {
// 实时监测数据不为空说明已经在充电中了
// List<RealTimeMonitorData> chargingRealTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode());
// if (CollectionUtils.isNotEmpty(chargingRealTimeData)) {
// // 实时监测数据不为空说明已经在充电中了
// status = Constants.ONE;
// }
// 查询缓存中该笔订单的启动状态
String redisKey = CacheConstants.QUERY_ORDER_START_RESULT_BY_ORDER_CODE + orderCode;
String startResult = (String) redisCache.getCacheObject(redisKey);
if (StringUtils.equals(Constants.ONE, startResult)) {
// 启动成功
status = Constants.ONE;
}
}