开发中

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 505c7b0edd
commit 9b12f35849

@ -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<SearchDsOrderListRequestDTO, Ret> {
public class SearchDsOrderListService extends SPIBaseService implements ExtensionServiceHandler<SearchDsOrderListRequestDTO, Ret> {
@Autowired
private PurchaseOrderService purchaseOrderService;
@ -29,7 +30,7 @@ public class SearchDsOrderListService implements ExtensionServiceHandler<SearchD
@Override
public BaseResponse<Ret> handle(BaseRequest<SearchDsOrderListRequestDTO> 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<SearchD
dto.checkParams();
SearchDsOrderFilterDTO filter = purchaseOrderUtil.searchDsOrderFilter(dto);
Pager<JSONObject> pager = purchaseOrderService.searchDsOrderList(shopId, dto.getPage(), dto.getPageSize(), filter, true, true);
Pager<JSONObject> pager = purchaseOrderService.searchDsOrderList(shopId.toString(), dto.getPage(), dto.getPageSize(), filter, true, true);
return R.ok(Ret.success(pager.toMap()));
}
}

@ -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<SearchDsOrderListRequestDTO, Ret> {
public class SearchDsTabOrderTotalCountService extends SPIBaseService implements ExtensionServiceHandler<SearchDsOrderListRequestDTO, Ret> {
@Autowired
private PurchaseOrderService purchaseOrderService;
@ -34,14 +35,14 @@ public class SearchDsTabOrderTotalCountService implements ExtensionServiceHandle
@Override
public BaseResponse<Ret> handle(BaseRequest<SearchDsOrderListRequestDTO> req) {
String shopId = req.getAuthId();
initHandle(req);
SearchDsOrderListRequestDTO dto = req.getData();
Map<String, Integer> 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;

@ -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<Void, Ret> {
@Override
public BaseResponse<Ret> handle(BaseRequest<Void> req) {
initHandle(req);
return R.ok(Ret.success());
}
}
Loading…
Cancel
Save