From 9b12f358499f3b4c40f382d0106bf793a3b6da64 Mon Sep 17 00:00:00 2001 From: wangchaoxu Date: Sun, 3 Sep 2023 16:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spi/order/SearchDsOrderListService.java | 7 +++--- .../SearchDsTabOrderTotalCountService.java | 7 +++--- .../order/TriggerRsyncSourceOrderService.java | 22 +++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 ms-biz/src/main/java/com/ms/api/spi/order/TriggerRsyncSourceOrderService.java diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsOrderListService.java b/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsOrderListService.java index 540ea8ce..3ba09d4d 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsOrderListService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsOrderListService.java @@ -10,6 +10,7 @@ import com.jinritemai.cloud.base.api.ExtensionServiceHandler; import com.ms.api.common.Pager; import com.ms.api.common.R; import com.ms.api.common.Ret; +import com.ms.api.common.SPIBaseService; import com.ms.api.dto.order.SearchDsOrderFilterDTO; import com.ms.api.dto.order.SearchDsOrderListRequestDTO; import com.ms.api.service.PurchaseOrderService; @@ -19,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; @ExtensionService("searchDsOrderList") @Slf4j -public class SearchDsOrderListService implements ExtensionServiceHandler { +public class SearchDsOrderListService extends SPIBaseService implements ExtensionServiceHandler { @Autowired private PurchaseOrderService purchaseOrderService; @@ -29,7 +30,7 @@ public class SearchDsOrderListService implements ExtensionServiceHandler handle(BaseRequest req) { - String shopId = req.getAuthId(); + initHandle(req); SearchDsOrderListRequestDTO dto = req.getData(); if (dto.checkParams()) { return R.ok(Ret.fail("参数不合法")); @@ -37,7 +38,7 @@ public class SearchDsOrderListService implements ExtensionServiceHandler pager = purchaseOrderService.searchDsOrderList(shopId, dto.getPage(), dto.getPageSize(), filter, true, true); + Pager pager = purchaseOrderService.searchDsOrderList(shopId.toString(), dto.getPage(), dto.getPageSize(), filter, true, true); return R.ok(Ret.success(pager.toMap())); } } diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsTabOrderTotalCountService.java b/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsTabOrderTotalCountService.java index 5e6bcd02..c3a41bac 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsTabOrderTotalCountService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/order/SearchDsTabOrderTotalCountService.java @@ -13,6 +13,7 @@ import com.jinritemai.cloud.base.api.ExtensionService; import com.jinritemai.cloud.base.api.ExtensionServiceHandler; import com.ms.api.common.R; import com.ms.api.common.Ret; +import com.ms.api.common.SPIBaseService; import com.ms.api.consts.DsOrderConst; import com.ms.api.consts.PurchaseOrderConst; import com.ms.api.dto.order.SearchDsOrderFilterDTO; @@ -24,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; @ExtensionService("getDsTabOrderTotalCount") @Slf4j -public class SearchDsTabOrderTotalCountService implements ExtensionServiceHandler { +public class SearchDsTabOrderTotalCountService extends SPIBaseService implements ExtensionServiceHandler { @Autowired private PurchaseOrderService purchaseOrderService; @@ -34,14 +35,14 @@ public class SearchDsTabOrderTotalCountService implements ExtensionServiceHandle @Override public BaseResponse handle(BaseRequest req) { - String shopId = req.getAuthId(); + initHandle(req); SearchDsOrderListRequestDTO dto = req.getData(); Map counts = purchaseOrderUtil.getDsTabAndOrderCountMap(dto); dto.setIsReceiverAddressChanged(true); SearchDsOrderFilterDTO filterRet = purchaseOrderUtil.searchDsOrderFilter(dto); dto.setIsReceiverAddressChanged(null); - filterRet.setAuthShopIds(shopId); + filterRet.setAuthShopIds(shopId.toString()); Integer receiverAddressChangedOrderCount = purchaseOrderService.getDsOrderCount(Integer.valueOf(filterRet.getAuthShopIds()), filterRet); Integer priorityDeliveryOrderCount = 0; diff --git a/ms-biz/src/main/java/com/ms/api/spi/order/TriggerRsyncSourceOrderService.java b/ms-biz/src/main/java/com/ms/api/spi/order/TriggerRsyncSourceOrderService.java new file mode 100644 index 00000000..c6df5983 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/api/spi/order/TriggerRsyncSourceOrderService.java @@ -0,0 +1,22 @@ +package com.ms.api.spi.order; + +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.api.common.R; +import com.ms.api.common.Ret; +import com.ms.api.common.SPIBaseService; +import lombok.extern.slf4j.Slf4j; + +@ExtensionService("savePurchaseSetting") +@Slf4j +public class TriggerRsyncSourceOrderService extends SPIBaseService implements ExtensionServiceHandler { + + @Override + public BaseResponse handle(BaseRequest req) { + initHandle(req); + + return R.ok(Ret.success()); + } +}