From a6535d8ca2bbb3d7854aba9b679e13d1ca16ba5c Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 12 Sep 2023 09:04:25 +0800 Subject: [PATCH] yh --- .../ms/api/service/impl/DistributionOrderServiceImpl.java | 2 +- .../impl/OpOrderDelayOutstorageBufferServiceImpl.java | 2 +- .../ms/api/service/impl/OpPackageOrderChildServiceImpl.java | 2 +- .../com/ms/api/service/impl/OpPackageOrderServiceImpl.java | 2 +- .../java/com/ms/api/service/impl/OpPackageServiceImpl.java | 2 +- .../api/spi/order/BatchAddDsPurchaseConfirmLogService.java | 5 ++++- .../com/ms/api/spi/order/CancelPurchaseOrderService.java | 6 ++++-- .../com/ms/api/spi/order/ClosePurchaseOrderService.java | 6 ++++-- .../ms/api/spi/order/GetDsPurchaseOrderPayUrlService.java | 6 +++++- .../java/com/ms/api/spi/order/GetSourceSkuInfosService.java | 5 ++++- 10 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java index 4f75e885..5218ad1f 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java @@ -390,7 +390,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService { purchaseOrderCustom.setOperateIp(""); purchaseOrderCustom.setGmtCreate(new Date()); purchaseOrderCustom.setGmtModified(new Date()); - if (purchaseOrderCustom.getPurchaseOrderCustomId() > 0) { + if (purchaseOrderCustom.getPurchaseOrderCustomId() != null && purchaseOrderCustom.getPurchaseOrderCustomId() > 0) { purchaseOrderCustomService.updateByPrimaryKeySelective(purchaseOrderCustom); } else { purchaseOrderCustomService.insertSelective(purchaseOrderCustom); diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/OpOrderDelayOutstorageBufferServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/OpOrderDelayOutstorageBufferServiceImpl.java index 1da68e4e..60de7e6b 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/OpOrderDelayOutstorageBufferServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/OpOrderDelayOutstorageBufferServiceImpl.java @@ -60,7 +60,7 @@ public class OpOrderDelayOutstorageBufferServiceImpl implements OpOrderDelayOuts buffer.setGmtCreate(new Date()); } buffer.setGmtModified(new Date()); - if (buffer.getOpOrderDelayOutstorageBufferId() > 0) { + if (buffer.getOpOrderDelayOutstorageBufferId() != null && buffer.getOpOrderDelayOutstorageBufferId() > 0) { opOrderDelayOutstorageBufferMapper.updateByPrimaryKeySelective(buffer); } else { opOrderDelayOutstorageBufferMapper.insertSelective(buffer); diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderChildServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderChildServiceImpl.java index 819f186d..61e91c57 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderChildServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderChildServiceImpl.java @@ -84,7 +84,7 @@ public class OpPackageOrderChildServiceImpl implements OpPackageOrderChildServic child.setShippedNum(child.getShippedNum() + shippedNum); } child.setGmtModified(new Date()); - if (child.getOpPackageOrderChildId() > 0) { + if (child.getOpPackageOrderChildId() != null && child.getOpPackageOrderChildId() > 0) { updateByPrimaryKeySelective(child); } else { insertSelective(child); diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderServiceImpl.java index 7465878a..8b6a4f26 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageOrderServiceImpl.java @@ -93,7 +93,7 @@ public class OpPackageOrderServiceImpl implements OpPackageOrderService{ packageOrder.setGmtCreate(new Date()); } packageOrder.setGmtModified(new Date()); - if (packageOrder.getOpPackageOrderId() > 0) { + if (packageOrder.getOpPackageOrderId() != null && packageOrder.getOpPackageOrderId() > 0) { updateByPrimaryKeySelective(packageOrder); } else { insertSelective(packageOrder); diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageServiceImpl.java index b8cfccee..c6f34ac8 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/OpPackageServiceImpl.java @@ -141,7 +141,7 @@ public class OpPackageServiceImpl implements OpPackageService{ opPackage.setGmtShipped(new Date()); opPackage.setGmtModified(new Date()); - if (opPackage.getOpPackageId() > 0) { + if (opPackage.getOpPackageId() != null && opPackage.getOpPackageId() > 0) { updateByPrimaryKeySelective(opPackage); } else { insertSelective(opPackage); diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/BatchAddDsPurchaseConfirmLogService.java b/ms-biz/src/main/java/com/ms/api/spi/order/BatchAddDsPurchaseConfirmLogService.java index dd18e6b0..98912a13 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/BatchAddDsPurchaseConfirmLogService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/BatchAddDsPurchaseConfirmLogService.java @@ -16,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired; import java.util.HashMap; import java.util.Map; +/** + * @author elf + */ @ExtensionService("batchAddDsPurchaseConfirmLog") @Slf4j @AllArgsConstructor @@ -33,7 +36,7 @@ public class BatchAddDsPurchaseConfirmLogService extends SPIBaseService implemen data.put("platformItemIdAndSourceItemInfoMap", platformOrderIdAndPurchaseConfirmLogIdMap); return R.ok(Ret.success(data)); } catch (Exception e) { - log.error("batchAddDsPurchaseConfirmLog fail:" + e.getMessage()); + log.error("batchAddDsPurchaseConfirmLog error", e); return R.ok(Ret.fail(e.getMessage())); } } diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/CancelPurchaseOrderService.java b/ms-biz/src/main/java/com/ms/api/spi/order/CancelPurchaseOrderService.java index d86b4c9b..f2f5b953 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/CancelPurchaseOrderService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/CancelPurchaseOrderService.java @@ -14,6 +14,9 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +/** + * @author elf + */ @ExtensionService("cancelPurchaseOrder") @Slf4j @AllArgsConstructor @@ -30,8 +33,7 @@ public class CancelPurchaseOrderService extends SPIBaseService implements Extens distributionOrderService.cancelPurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getSkuIds(), source, false); return R.ok(Ret.success()); } catch (Exception e) { - e.printStackTrace(); - log.error("cancelPurchaseOrder fail:" + e.getMessage()); + log.error("cancelPurchaseOrder error", e); return R.ok(Ret.fail(e.getMessage())); } } diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/ClosePurchaseOrderService.java b/ms-biz/src/main/java/com/ms/api/spi/order/ClosePurchaseOrderService.java index 1b57e849..d625957e 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/ClosePurchaseOrderService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/ClosePurchaseOrderService.java @@ -13,6 +13,9 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +/** + * @author elf + */ @ExtensionService("closePurchaseOrder") @Slf4j @AllArgsConstructor @@ -28,8 +31,7 @@ public class ClosePurchaseOrderService extends SPIBaseService implements Extensi distributionOrderService.closeSourceOrderAndCancelRelatePurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getPurchaseOrderSn()); return R.ok(Ret.success()); } catch (Exception e) { - e.printStackTrace(); - log.error("closePurchaseOrder fail:" + e.getMessage()); + log.error("closePurchaseOrder error", e); return R.ok(Ret.fail(e.getMessage())); } } diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/GetDsPurchaseOrderPayUrlService.java b/ms-biz/src/main/java/com/ms/api/spi/order/GetDsPurchaseOrderPayUrlService.java index d7294153..6e8ef455 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/GetDsPurchaseOrderPayUrlService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/GetDsPurchaseOrderPayUrlService.java @@ -16,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired; import java.util.HashMap; import java.util.Map; +/** + * @author elf + */ @ExtensionService("getDsPurchaseOrderPayUrl") @Slf4j @AllArgsConstructor @@ -33,7 +36,8 @@ public class GetDsPurchaseOrderPayUrlService extends SPIBaseService implements E data.put("payUrl", payUrl); return R.ok(Ret.success(data)); } catch (Exception e) { - log.error("getDsPurchaseOrderPayUrl fail:" + e.getMessage()); + + log.error("getDsPurchaseOrderPayUrl error:", e); return R.ok(Ret.fail(e.getMessage())); } } diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/GetSourceSkuInfosService.java b/ms-biz/src/main/java/com/ms/api/spi/order/GetSourceSkuInfosService.java index f7aa1fad..779cf694 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/GetSourceSkuInfosService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/GetSourceSkuInfosService.java @@ -18,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired; import java.util.HashMap; import java.util.Map; +/** + * @author elf + */ @ExtensionService("getSourceSkuInfos") @Slf4j @AllArgsConstructor @@ -43,7 +46,7 @@ public class GetSourceSkuInfosService extends SPIBaseService implements Extensio data.put("sourceItemIdAndProductApiRetMap", response.getSourceItemIdAndProductApiRetMap()); return R.ok(Ret.success(data)); } catch (Exception e) { - log.error("getSourceSkuInfos fail:" + e.getMessage()); + log.error("getSourceSkuInfos error", e); return R.ok(Ret.fail(e.getMessage())); } }