20240115-ljl-multiPay
ljl 10 months ago
parent 8c5a2ec132
commit 9e59593d2b

@ -76,6 +76,12 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
}
Set<String> purOrderIds = new HashSet<>(orderIdAndPurOrderIdMap.values());
List<PlatformPurchaseOrder> platformPurchaseOrders = platformPurchaseOrderMapper.getListByPurOrderIds(new ArrayList<>(purOrderIds));
if (platformPurchaseOrders.isEmpty()) {
storeCreateOrders(shopId, param.getOrders(), purOrderIds);
}
storeCreateOrders(shopId, param.getOrders(), purOrderIds);
BatchCreateDistributionOrdersRequestDTO request = buildBatchCreateDistributionOrdersRequestDTO(param);
@ -109,9 +115,11 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
}
}
data.setOrderResults(orderResults);
purchaseOrderMapper.insertBatch(purchaseOrders);
purchaseOrderItemMapper.insertBatch(purchaseOrderItems);
PurchaseOrder purchaseOrder = purchaseOrderMapper.getByPurOrderId(purOrderIds.iterator().next());
if (purchaseOrder == null) {
purchaseOrderMapper.insertBatch(purchaseOrders);
purchaseOrderItemMapper.insertBatch(purchaseOrderItems);
}
}
private PurchaseOrder buildPurchaseOrderByDTO(Long shopId, PurchaseOrderDTO purchaseOrderDTO, String purOrderId) {

Loading…
Cancel
Save