From 22af68a24f3402dadfea6f645ff6bdc9f8555526 Mon Sep 17 00:00:00 2001 From: wangchaoxu Date: Mon, 4 Sep 2023 16:09:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/impl/PurchaseOrderServiceImpl.java | 14 ++++++++------ ms-dal/src/main/resources/mapper/OpOrderMapper.xml | 12 ++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java index f6120fd6..ac33f1db 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java @@ -650,11 +650,13 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService { return new HashMap<>(); } StringBuilder where = new StringBuilder(); - if (ObjectUtil.isNotEmpty(filter.getPurchaseStartTime())) { - where.append(String.format(" and purchase_order_start_time >= '%s'", DateUtil.formatDateTime(filter.getPurchaseStartTime()))); - } - if (ObjectUtil.isNotEmpty(filter.getPurchaseEndTime())) { - where.append(String.format(" and purchase_order_start_time <= '%s'", DateUtil.formatDateTime(filter.getPurchaseEndTime()))); + if (ObjectUtil.isNotEmpty(filter)) { + if (ObjectUtil.isNotEmpty(filter.getPurchaseStartTime())) { + where.append(String.format(" and purchase_order_start_time >= '%s'", DateUtil.formatDateTime(filter.getPurchaseStartTime()))); + } + if (ObjectUtil.isNotEmpty(filter.getPurchaseEndTime())) { + where.append(String.format(" and purchase_order_start_time <= '%s'", DateUtil.formatDateTime(filter.getPurchaseEndTime()))); + } } List purchaseOrders = purchaseOrderMapper.selectPurchaseOrders(shopIds, orderIds, StatusConst.normal, where.toString()); if (ObjectUtil.isEmpty(purchaseOrders)) { @@ -1503,7 +1505,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService { return orderPhaseInfo; } - + private List appendItemsIsUseManualConsignee(List returnOrderItems, Map returnPurchaseOrders, Map skuIdAndPurchaseOrderIdMap) { for (JSONObject item : returnOrderItems) { diff --git a/ms-dal/src/main/resources/mapper/OpOrderMapper.xml b/ms-dal/src/main/resources/mapper/OpOrderMapper.xml index 6554490d..3ba18e12 100644 --- a/ms-dal/src/main/resources/mapper/OpOrderMapper.xml +++ b/ms-dal/src/main/resources/mapper/OpOrderMapper.xml @@ -68,7 +68,7 @@ select from op_order - where op_order_id = #{opOrderId,jdbcType=BIGINT} + where op_order_id = #{opOrderId,jdbcType=BIGINT} select from op_order where order_id in - + #{orderId}