update 预约充电

This commit is contained in:
Guoqs
2024-09-09 11:24:10 +08:00
parent 35b2367ab9
commit 569ab188c0

View File

@@ -82,11 +82,11 @@ public class ReservationChargingResponseHandler extends AbstractYkcHandler {
if ("01".equals(resultCode)) {
// 预约成功, 删除redis中的预约信息
String redisKey = CacheConstants.UPDATE_RESERVATION_INFO + pileSn + connectorCode;
JSON cacheObject = redisCache.getCacheObject(redisKey);
String cacheObject = redisCache.getCacheObject(redisKey);
log.info("预约充电-收到成功, redisKey:{}, result:{}", redisKey, cacheObject);
if (cacheObject != null) {
log.info("修改预约充电相应成功, 更新数据库");
PileReservationInfo pileReservationInfo = JSON.parseObject(cacheObject.toString(), PileReservationInfo.class);
PileReservationInfo pileReservationInfo = JSON.parseObject(cacheObject, PileReservationInfo.class);
pileReservationInfoService.insertOrUpdateSelective(pileReservationInfo);
}
}