diff --git a/ms-biz/src/main/java/com/ms/biz/service/impl/DsMessageServiceImpl.java b/ms-biz/src/main/java/com/ms/biz/service/impl/DsMessageServiceImpl.java index 3db5274..610f186 100644 --- a/ms-biz/src/main/java/com/ms/biz/service/impl/DsMessageServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/biz/service/impl/DsMessageServiceImpl.java @@ -468,14 +468,12 @@ public class DsMessageServiceImpl implements DsMessageService { refundPurchaseOrder.setSellerReceiveAddress(refundInfo.getSellerReceiveAddress()); refundPurchaseOrder.setGmtTimeOut(refundInfo.getGmtTimeOut()); refundPurchaseOrder.setGmtModified(new Date()); - if (refundPurchaseOrder.getRefundPurchaseOrderId() != null) { + if (refundPurchaseOrder.getRefundPurchaseOrderId() == null) { refundPurchaseOrderMapper.insertSelective(refundPurchaseOrder); + refundPurchaseOrderSkuMapper.insertBatch(refundPurchaseOrderSkus); } else { refundPurchaseOrderMapper.updateByPrimaryKeySelective(refundPurchaseOrder); } - if (!refundPurchaseOrderSkus.isEmpty()) { - refundPurchaseOrderSkuMapper.insertBatch(refundPurchaseOrderSkus); - } } private SkuRefundInfosItem buildSkuRefundInfosItem(String purSkuOrderId, RefundInfoDTO refundInfo, AlibabaMessage alibabaMessage) {