采购配置相关

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 407b9a7a14
commit 6743944da5

@ -0,0 +1,7 @@
package com.ms.api.bo;
import lombok.Data;
@Data
public class DsPurchaseSettingBo {
}

@ -1,9 +1,9 @@
package com.ms.api.dto.order;
package com.ms.api.bo;
import lombok.Data;
@Data
public class PurchaseSettingDTO {
public class PurchaseSettingBO {
/**
*
*/

@ -1,5 +1,7 @@
package com.ms.api.service;
import com.ms.api.bo.DsPurchaseSettingBo;
import com.ms.api.bo.PurchaseSettingBO;
import com.ms.api.common.Pager;
import com.ms.api.dto.order.SearchDsOrderFilterDTO;
import com.ms.dal.entity.OpOrder;
@ -23,4 +25,10 @@ public interface PurchaseOrderService {
int updateByPrimaryKey(PurchaseOrder record);
Pager<OpOrder> searchDsOrderList(String shopId, Integer page, Integer pageSize, SearchDsOrderFilterDTO filter, Boolean isEnsconceString, Boolean needOutstorageResult);
PurchaseSettingBO getPurchaseSetting(Long shopId);
boolean savePurchaseSetting(Long shopId, PurchaseSettingBO purchaseSettingBO);
DsPurchaseSettingBo getDsPurchaseSettingByShopId(Long shopId);
}

@ -9,6 +9,8 @@ import com.doudian.open.api.order_BatchSearchIndex.data.OrderBatchSearchIndexDat
import com.doudian.open.api.order_BatchSearchIndex.data.PlainToEncryptIndexListItem;
import com.doudian.open.api.order_BatchSearchIndex.param.OrderBatchSearchIndexParam;
import com.doudian.open.api.order_BatchSearchIndex.param.PlainTextListItem;
import com.ms.api.bo.DsPurchaseSettingBo;
import com.ms.api.bo.PurchaseSettingBO;
import com.ms.api.common.Pager;
import com.ms.api.consts.*;
import com.ms.api.dto.order.PurchaseSettingDTO;
@ -488,7 +490,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
return rows.stream().collect(Collectors.toMap(PurchaseOrderSetting::getPurchaseOrderId, x -> x));
}
public PurchaseSettingDTO getPurchaseSetting(Long shopId) {
public PurchaseSettingBO getPurchaseSetting(Long shopId) {
PurchaseSetting purchaseSetting = purchaseSettingMapper.selectByShopId(shopId);
// boolean isNewestVersion = purchaseSetting.version = PurchaseOrderConst.CURRENT_PURCHASE_SETTING_VERSION;
@ -521,28 +523,33 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
autoFillOrderMemoTpl = purchaseSetting.getAutoFillOrderMemoTpl();
}
PurchaseSettingDTO purchaseSettingDTO = new PurchaseSettingDTO();
purchaseSettingDTO.setIsAppendShopRemark(isAppendShopRemark);
purchaseSettingDTO.setIsAppendShopNote(isAppendShopNote);
purchaseSettingDTO.setIsAutoFillRemark(isAutoFillRemark);
purchaseSettingDTO.setIsAutoFillOrderMemo(isAutoFillOrderMemo);
purchaseSettingDTO.setAppendShopRemarkTpl(appendShopRemarkTpl);
purchaseSettingDTO.setAppendShopNoteTpl(appendShopNoteTpl);
purchaseSettingDTO.setAutoFillRemarkTpl(autoFillRemarkTpl);
purchaseSettingDTO.setAutoFillOrderMemoTpl(autoFillOrderMemoTpl);
PurchaseSettingBO purchaseSettingBO = new PurchaseSettingBO();
purchaseSettingBO.setIsAppendShopRemark(isAppendShopRemark);
purchaseSettingBO.setIsAppendShopNote(isAppendShopNote);
purchaseSettingBO.setIsAutoFillRemark(isAutoFillRemark);
purchaseSettingBO.setIsAutoFillOrderMemo(isAutoFillOrderMemo);
purchaseSettingBO.setAppendShopRemarkTpl(appendShopRemarkTpl);
purchaseSettingBO.setAppendShopNoteTpl(appendShopNoteTpl);
purchaseSettingBO.setAutoFillRemarkTpl(autoFillRemarkTpl);
purchaseSettingBO.setAutoFillOrderMemoTpl(autoFillOrderMemoTpl);
if (purchaseSetting == null) {
savePurchaseSetting(shopId, purchaseSettingDTO);
savePurchaseSetting(shopId, purchaseSettingBO);
}
return purchaseSettingDTO;
return purchaseSettingBO;
}
public boolean savePurchaseSetting(Long shopId, PurchaseSettingDTO purchaseSettingDTO) {
public boolean savePurchaseSetting(Long shopId, PurchaseSettingBO purchaseSettingBO) {
// todo:
return false;
}
public DsPurchaseSettingBo getDsPurchaseSettingByShopId(Long shopId) {
// todo:
return null;
}
}

@ -4,18 +4,35 @@ 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.bo.PurchaseSettingBO;
import com.ms.api.common.SPIBaseService;
import com.ms.api.dto.order.GetPurchaseSettingResponseDTO;
import com.ms.api.dto.order.PurchaseSettingDTO;
import com.ms.api.service.PurchaseOrderService;
import com.ms.api.util.PurchaseOrderUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ExtensionService("getPurchaseSetting")
@Slf4j
@AllArgsConstructor
public class GetPurchaseSettingService extends SPIBaseService implements ExtensionServiceHandler<Void, GetPurchaseSettingResponseDTO> {
@Autowired
private PurchaseOrderUtil purchaseOrderUtil;
@Autowired
private PurchaseOrderService purchaseOrderService;
@Override
public BaseResponse<GetPurchaseSettingResponseDTO> handle(BaseRequest<Void> req) {
// GetPurchaseSettingRequestDTO requestDTO = req.getData();
// todo: 获取shopid
Long shopId = 0L;
PurchaseSettingBO purchaseSettingBO = purchaseOrderUtil.getPurchaseSetting(shopId);
return null;
}
}

@ -10,20 +10,24 @@ import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.jinritemai.cloud.base.api.BaseResponse;
import com.ms.api.bo.PurchaseSettingBO;
import com.ms.api.common.R;
import com.ms.api.consts.DsOrderConst;
import com.ms.api.consts.OrderConst;
import com.ms.api.consts.PurchaseOrderConst;
import com.ms.api.consts.SessionConst;
import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoRequestDTO;
import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoResponseDTO;
import com.ms.api.dto.order.SearchDsOrderFilterDTO;
import com.ms.api.dto.order.SearchDsOrderListRequestDTO;
import com.ms.api.dto.order.*;
import com.ms.api.service.PurchaseOrderService;
import com.ms.api.tool.CommonTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class PurchaseOrderUtil {
@Autowired
private PurchaseOrderService purchaseOrderService;
private OriginalAndCustomConsigneeInfoResponseDTO getOriginalAndCustomConsigneeInfo(OriginalAndCustomConsigneeInfoRequestDTO requestDTO) {
return new OriginalAndCustomConsigneeInfoResponseDTO();
}
@ -211,8 +215,8 @@ public class PurchaseOrderUtil {
return params;
}
public int getPurchaseSetting(Long operateShopId) {
return 0;
public PurchaseSettingBO getPurchaseSetting(Long operateShopId) {
return purchaseOrderService.getPurchaseSetting(operateShopId);
}
}

Loading…
Cancel
Save