Commit d011e052 by 周晓航

优化代码传参

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 836a0f88
......@@ -25,6 +25,7 @@ import com.freemud.application.sdk.api.util.DateUtil;
import com.freemud.sdk.api.assortment.order.constant.CommonConstant;
import com.freemud.sdk.api.assortment.order.domain.OrderStatesVO;
import com.freemud.sdk.api.assortment.order.domain.ResponseCodeConstant;
import com.freemud.sdk.api.assortment.order.entities.other.OtherParamDTO;
import com.freemud.sdk.api.assortment.order.entities.promption.ActivityUpdateStockRequest;
import com.freemud.sdk.api.assortment.order.entities.promption.SubtractStockVO;
import com.freemud.sdk.api.assortment.order.enums.*;
......@@ -64,12 +65,12 @@ public class OrderSdkAdapter {
/**
* 接单request
*
* @param operator
* @param orderBean
* @param dispatchType 派单模式(0-系统自动派单;1-手动派单) null表示方法重载使用,无需关注该参数
* @return
*/
public BaseQueryOrderRequest getOrderConfirmRequest(String operator, OrderBeanV1 orderBean) {
public BaseQueryOrderRequest getOrderConfirmRequest(String operator, OrderBeanV1 orderBean, OtherParamDTO otherParamDTO) {
BaseQueryOrderRequest orderRequest = new BaseQueryOrderRequest();
orderRequest.setOrderId(orderBean.getOid());
orderRequest.setShopId(orderBean.getShopId());
......@@ -89,6 +90,9 @@ public class OrderSdkAdapter {
} else {
orderRequest.setDeliveryType(orderBean.getAddInfo().getDeliveryType());
}
if (Objects.nonNull(otherParamDTO)) {
orderRequest.setDispatchType(otherParamDTO.getDispatchType());
}
return orderRequest;
}
......@@ -4029,4 +4033,7 @@ public class OrderSdkAdapter {
}
}
public BaseQueryOrderRequest getOrderConfirmRequest(String operator, OrderBeanV1 orderBean) {
return this.getOrderConfirmRequest(operator,orderBean,null);
}
}
package com.freemud.sdk.api.assortment.order.entities.other;
import lombok.Data;
/**
* @author : xh.Z
* @email : fisherman0510@163.com
* @Date : 2021/12/22 上午11:11
* @description : 额外参数逻辑处理 操作
*/
@Data
public class OtherParamDTO {
/**
* 派单模式(0-系统自动派单;1-手动派单)
* 内置传参使用
*/
private String dispatchType;
}
......@@ -17,6 +17,7 @@ import com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoR
import com.freemud.application.sdk.api.ordercenter.response.orderInfo.QueryByCodeResponse;
import com.freemud.application.sdk.api.ordercenter.service.OrderSdkService;
import com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter;
import com.freemud.sdk.api.assortment.order.entities.other.OtherParamDTO;
import com.freemud.sdk.api.assortment.order.enums.PayRefundStatus;
import com.freemud.sdk.api.assortment.order.enums.RefundStatus;
import com.freemud.sdk.api.assortment.order.request.order.BaseQueryOrderRequest;
......@@ -71,8 +72,10 @@ public class SaasOrderHandle {
*/
public BaseResponse orderConfirm(OrderManagerRequest request, OrderBeanV1 orderBean) {
//订单接单
BaseQueryOrderRequest orderConfirmRequest = orderSdkAdapter.getOrderConfirmRequest(request.getOperator(), orderBean);
orderConfirmRequest.setDispatchType(request.getDispatchType());
OtherParamDTO dto = new OtherParamDTO();
dto.setDispatchType(request.getDispatchType());
BaseQueryOrderRequest orderConfirmRequest = orderSdkAdapter.getOrderConfirmRequest(request.getOperator(), orderBean, dto);
orderSdkAdapter.convert2wmDeliveryTimeOut(orderConfirmRequest,this.wmDeliveryTimeOut);
//合阔pos 商户订单状态不自动扭转
// 2021-07-07 合阔自动
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment