Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java
This commit is contained in:
Owen 2025-02-28 16:08:21 +08:00
commit 47ac8a2ea9
1 changed files with 10 additions and 13 deletions

View File

@ -220,7 +220,6 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
// String idCardName = userIdInfo.getIdCardName(); // String idCardName = userIdInfo.getIdCardName();
String encryptIdCardName = userIdInfo.getEncryptIdCardName(); String encryptIdCardName = userIdInfo.getEncryptIdCardName();
List<OrdersDO> orderList = new ArrayList<>(); List<OrdersDO> orderList = new ArrayList<>();
List<OrdersDO> orderListAll = new ArrayList<>();
for (com.doudian.open.api.order_orderDetail.data.SkuOrderListItem skuOrderListItem : skuOrderList) { for (com.doudian.open.api.order_orderDetail.data.SkuOrderListItem skuOrderListItem : skuOrderList) {
String orderId = skuOrderListItem.getOrderId(); String orderId = skuOrderListItem.getOrderId();
OrdersDO ordersDO = new OrdersDO(); OrdersDO ordersDO = new OrdersDO();
@ -333,17 +332,17 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
} }
} }
orderListAll.addAll(orderList); // 执行解密解密后更新数据库
for (List<OrdersDO> ordersDOS : GroupListUtil.groupList(orderList, 50)) {
batchDecryptOrderAndUpdate(ordersDOS);
}
for (OrdersDO ordersDO : orderList) { for (OrdersDO ordersDO : orderList) {
OrdersSaveReqVO ordersSaveReqVO = new OrdersSaveReqVO(); OrdersSaveReqVO ordersSaveReqVO = new OrdersSaveReqVO();
BeanUtils.copyProperties(ordersDO,ordersSaveReqVO); BeanUtils.copyProperties(ordersDO,ordersSaveReqVO);
ordersService.createOrders(ordersSaveReqVO); ordersService.createOrders(ordersSaveReqVO);
} }
// ordersMapper.insertBatch(orderList); // ordersMapper.insertBatch(orderList);
// 执行解密解密后更新数据库
for (List<OrdersDO> ordersDOS : GroupListUtil.groupList(orderListAll, 50)) {
batchDecryptOrderAndUpdate(ordersDOS);
}
} }
@ -360,7 +359,6 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
// 所有在售商品sku // 所有在售商品sku
List<String> skuList = onSaleProductDOS.stream().map(OnSaleProductDO::getSku).toList(); List<String> skuList = onSaleProductDOS.stream().map(OnSaleProductDO::getSku).toList();
//数据分片处理 分片理由 每次最多徐解密50条数据一条订单解密5个数据10个订单解密50条 //数据分片处理 分片理由 每次最多徐解密50条数据一条订单解密5个数据10个订单解密50条
List<OrdersDO> orderListAll = new ArrayList<>();
List<List<ShopOrderListItem>> orderGroupList = GroupListUtil.groupList(orders, 10); List<List<ShopOrderListItem>> orderGroupList = GroupListUtil.groupList(orders, 10);
// orderGroupList size 最大为10 // orderGroupList size 最大为10
for (List<ShopOrderListItem> orderListItems : orderGroupList) { for (List<ShopOrderListItem> orderListItems : orderGroupList) {
@ -514,7 +512,10 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
} }
} }
} }
orderListAll.addAll(orderList); // 执行解密解密后更新数据库
for (List<OrdersDO> ordersDOS : GroupListUtil.groupList(orderList, 50)) {
batchDecryptOrderAndUpdate(ordersDOS);
}
//调用创建订单流程触发发送短信 //调用创建订单流程触发发送短信
for (OrdersDO ordersDO : orderList) { for (OrdersDO ordersDO : orderList) {
OrdersSaveReqVO ordersSaveReqVO = new OrdersSaveReqVO(); OrdersSaveReqVO ordersSaveReqVO = new OrdersSaveReqVO();
@ -523,10 +524,6 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
} }
// ordersMapper.insertBatch(orderList); // ordersMapper.insertBatch(orderList);
} }
// 执行解密解密后更新数据库
for (List<OrdersDO> ordersDOS : GroupListUtil.groupList(orderListAll, 50)) {
batchDecryptOrderAndUpdate(ordersDOS);
}
} }
private CipherInfosItem createCipherItem(String cipherText, String authId) { private CipherInfosItem createCipherItem(String cipherText, String authId) {
CipherInfosItem item = new CipherInfosItem(); CipherInfosItem item = new CipherInfosItem();
@ -572,7 +569,7 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
} }
} }
} }
ordersMapper.updateBatch(orderList); // ordersMapper.updateBatch(orderList);
} }
/** /**