update 修复生成订单,钱包未校验问题
This commit is contained in:
@@ -769,26 +769,28 @@ public class OrderAndPayTask {
|
||||
.chain(LeaseOrderItem.getChain()).build())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
//查询到对应商铺对应的 chain 然后比较上面的链对应的地址是否改变
|
||||
List<ShopConfigDelDto> shopConfigList = leaseShopConfigMapper.selectShopConfigByShopIdAndSymbolAndChain(collect);
|
||||
List<LeaseOrderItem> updateOrderItemList = new ArrayList<>();
|
||||
// 遍历 orderItemList
|
||||
for (LeaseOrderItem orderItem : orderItemList) {
|
||||
for (ShopConfigDelDto shopConfig : shopConfigList) {
|
||||
// 检查 chain 和 shopId 是否相同
|
||||
if (orderItem.getShopId().equals(shopConfig.getShopId()) &&
|
||||
orderItem.getChain().equals(shopConfig.getChain())) {
|
||||
// 检查 address 是否不同
|
||||
if (!orderItem.getAddress().equals(shopConfig.getPayAddress())) {
|
||||
// 更新 orderItem 的 address
|
||||
orderItem.setAddress(shopConfig.getPayAddress());
|
||||
updateOrderItemList.add(orderItem);
|
||||
if (!collect.isEmpty()){
|
||||
//查询到对应商铺对应的 chain 然后比较上面的链对应的地址是否改变
|
||||
List<ShopConfigDelDto> shopConfigList = leaseShopConfigMapper.selectShopConfigByShopIdAndSymbolAndChain(collect);
|
||||
// 遍历 orderItemList
|
||||
for (LeaseOrderItem orderItem : orderItemList) {
|
||||
for (ShopConfigDelDto shopConfig : shopConfigList) {
|
||||
// 检查 chain 和 shopId 是否相同
|
||||
if (orderItem.getShopId().equals(shopConfig.getShopId()) &&
|
||||
orderItem.getChain().equals(shopConfig.getChain())) {
|
||||
// 检查 address 是否不同
|
||||
if (!orderItem.getAddress().equals(shopConfig.getPayAddress())) {
|
||||
// 更新 orderItem 的 address
|
||||
orderItem.setAddress(shopConfig.getPayAddress());
|
||||
updateOrderItemList.add(orderItem);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
leaseOrderItemService.updateBatchById(updateOrderItemList);
|
||||
}
|
||||
leaseOrderItemService.updateBatchById(updateOrderItemList);
|
||||
return orderItemList;
|
||||
|
||||
}
|
||||
@@ -796,7 +798,7 @@ public class OrderAndPayTask {
|
||||
|
||||
|
||||
/**
|
||||
*订单完成后---发送支付消息到mq 一个买家对应一个卖家
|
||||
*订单全部已完成
|
||||
* @param orderIds
|
||||
*/
|
||||
public void sendMessageToMq(List<Long> orderIds){
|
||||
|
||||
Reference in New Issue
Block a user