修正并充订单数据工具

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);
orderDetailService.updateBatch(orderDetailList);
int updateCount = 0;
if (CollectionUtils.isNotEmpty(orderBasicInfos)) {
updateCount = orderBasicInfoService.updateBatch(orderBasicInfos);
}
if (CollectionUtils.isNotEmpty(orderDetailList)) {
orderDetailService.updateBatch(orderDetailList);
}
Map<String, List<String>> redisMap = Maps.newHashMap();
redisMap.put(redisKey, orderCodeList);
redisCache.batchSetCacheList(redisMap, 300, TimeUnit.DAYS);
if (orderCodeList.size() == updateCount) {
logger.info("修正并充订单数据工具, 修正成功, 订单号:{}", JSON.toJSONString(orderCodeList));
Map<String, List<String>> redisMap = Maps.newHashMap();
redisMap.put(redisKey, orderCodeList);
redisCache.batchSetCacheList(redisMap, 300, TimeUnit.DAYS);
}
return orderCodeList;
}