修正并充订单数据工具

This commit is contained in:
Guoqs
2024-11-15 11:07:10 +08:00
parent 9533c234e6
commit 578a870061

View File

@@ -686,12 +686,20 @@ public class TempService {
} }
} }
// 更新数据库 // 更新数据库
orderBasicInfoService.updateBatch(orderBasicInfos); int updateCount = 0;
orderDetailService.updateBatch(orderDetailList); if (CollectionUtils.isNotEmpty(orderBasicInfos)) {
updateCount = orderBasicInfoService.updateBatch(orderBasicInfos);
}
if (CollectionUtils.isNotEmpty(orderDetailList)) {
orderDetailService.updateBatch(orderDetailList);
}
Map<String, List<String>> redisMap = Maps.newHashMap(); if (orderCodeList.size() == updateCount) {
redisMap.put(redisKey, orderCodeList); logger.info("修正并充订单数据工具, 修正成功, 订单号:{}", JSON.toJSONString(orderCodeList));
redisCache.batchSetCacheList(redisMap, 300, TimeUnit.DAYS); Map<String, List<String>> redisMap = Maps.newHashMap();
redisMap.put(redisKey, orderCodeList);
redisCache.batchSetCacheList(redisMap, 300, TimeUnit.DAYS);
}
return orderCodeList; return orderCodeList;
} }