Commit 45ee75b2 by shuhu.hou@freemud.cn

Merge branch 'feature/20200518_退款退配送费' into develop

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	ordercenter-sdk/pom.xml
#	ordercenter-sdk/readme.md
parents 71b5b7b0 87b38f4a
......@@ -973,6 +973,9 @@ public class OrderAdapter {
responseVo.setOrderStatusFlows(orderChangeTime);
responseVo.setOrderStatusDesc(orderViewStatusDto.getOrderStatusDesc());
responseVo.setOrderStatusDescText(orderViewStatusDto.getOrderStatusDescText());
if (CollectionUtils.isNotEmpty(ordersBean.getRefundList())) {
responseVo.setRefundTips(orderViewStatusDto.getRefundStatusText());
}
responseVo.setTakeMealFlows(getTakeMealFlows(ordersBean));
responseVo.setRiderName(orderViewStatusDto.getRiderName());
responseVo.setRiderText(orderViewStatusDto.getRiderText());
......@@ -1311,13 +1314,15 @@ public class OrderAdapter {
orderViewStatusDto.setButtonRefund(checkRefundButton(orderBean,wxAppId));
orderViewStatusDto.setButtonMealCode(true);
}
//申请退款
if (refundBean != null && RefundStatus.APPLY_REFUND.getCode().equals(refundBean.getStatus())) {
setApplyRefundDesc(orderViewStatusDto, orderBean);
}
//同意退款
if (refundBean != null && RefundStatus.AGREE_REFUND.getCode().equals(refundBean.getStatus())) {
setAgreeRefundDesc(orderViewStatusDto, orderBean);
}
//已退货
if (refundBean != null && RefundStatus.ALREADY_REFUND.getCode().equals(refundBean.getStatus())) {
setAgreeRefundDesc(orderViewStatusDto, orderBean);
}
......@@ -1497,25 +1502,29 @@ public class OrderAdapter {
if (refundBean != null && RefundStatus.AGREE_REFUND.getCode().equals(refundBean.getStatus())) {
orderViewStatusDto.setOrderStatus(OrderStatus.CALCEL.getCode());
orderViewStatusDto.setOrderStatusDesc("已退款");
orderViewStatusDto.setOrderStatusDescText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setButtonContactPartner(true);
}
if (refundBean != null && RefundStatus.ALREADY_REFUND.getCode().equals(refundBean.getStatus())) {
orderViewStatusDto.setOrderStatus(OrderStatus.CALCEL.getCode());
orderViewStatusDto.setOrderStatusDesc("退款中");
orderViewStatusDto.setOrderStatusDescText("若48小时后商家未处理,则自动【同意】/【拒绝】退款~");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("正在退款中,请稍等");
orderViewStatusDto.setButtonContactPartner(true);
}
if (OrderStatus.REFUSE.getCode().equals(orderBean.getStatus())) {
orderViewStatusDto.setOrderStatus(OrderStatus.REFUSE.getCode());
orderViewStatusDto.setOrderStatusDesc("已退款");
orderViewStatusDto.setOrderStatusDescText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setButtonContactPartner(true);
}
if (PayStatus.HAVE_REFUND.getCode().equals(orderBean.getPayStatus())) {
orderViewStatusDto.setOrderStatus(OrderStatus.REFUSE.getCode());
orderViewStatusDto.setOrderStatusDesc("已退款");
orderViewStatusDto.setOrderStatusDescText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("订单金额已原路退还,请及时查看~");
orderViewStatusDto.setButtonContactPartner(true);
}
......@@ -1523,6 +1532,8 @@ public class OrderAdapter {
// TODO: 2019/9/9 获取商户退款配置
if (refundBean != null && refundBean.getStatus() != null) {
orderViewStatusDto.setButtonRefund(false);
orderViewStatusDto.setRefundStatusText("商家会处理退款申请,请稍后");
} else {
orderViewStatusDto.setButtonRefund(checkRefundButton(orderBean, wxAppId));
}
......@@ -1927,18 +1938,20 @@ public class OrderAdapter {
productBean1.setSonProducts(new ArrayList<>());
return productBean1;
}
//申请
public void setApplyRefundDesc(OrderViewStatusDto orderViewStatusDto, QueryOrdersResponse.DataBean.OrderBean orderBean) {
orderViewStatusDto.setOrderStatus(orderBean.getStatus());
orderViewStatusDto.setOrderStatusDesc("退款中");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("商家会处理退款申请,请稍后");
orderViewStatusDto.setButtonContactPartner(true);
}
//同意
public void setAgreeRefundDesc(OrderViewStatusDto orderViewStatusDto, QueryOrdersResponse.DataBean.OrderBean orderBean) {
orderViewStatusDto.setOrderStatus(orderBean.getStatus());
orderViewStatusDto.setOrderStatusDesc("退款中");
orderViewStatusDto.setOrderStatusDescText("感谢您对我们的信任,期待再次光临~");
orderViewStatusDto.setRefundStatusText("商家会处理退款申请,请稍后");
orderViewStatusDto.setButtonContactPartner(true);
}
......
......@@ -61,6 +61,8 @@ public class OrderViewStatusDto {
* 取餐码按钮
*/
private Boolean buttonMealCode;
/**
* 售后单文案描述
*/
private String refundStatusText;
}
......@@ -202,6 +202,10 @@ public class QueryOrderResponseVo {
private String refundReason;
/**
* 退款文案提示 若48小时后商家未处理,自动同意/拒绝退款
*/
private String refundTips;
/**
* 退款单
*/
private String rid;
......
......@@ -100,6 +100,10 @@ public class InterfaceAddressConstant {
*/
public static final String BATCH_QUERY_AFTER_SALES = "afterSales/v2/batchQuery";
/**
* 根据订单号查询售后单
*/
public static final String QUERY_AFTER_SALES_BY_ORDERCODE = "afterSales/v2/queryByOrder";
/**
* 查询关联订单
*/
public static final String QUERY_RELATED_ORDER_BY_CODE = "order/v2/queryRelatedOrderByCode";
......
package com.freemud.application.sdk.api.ordercenter.request;
import lombok.Data;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: QueryAfterSalesByOrderCodeReq
* @Package com.freemud.application.sdk.api.ordercenter.request
* @Description:
* @author: shuhu.hou
* @date: 2020/5/18 15:26
* @Copyright: 2020 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public class QueryAfterSalesByOrderCodeReq {
/**
* 商户号
*/
private String partnerId;
/**
* 售后单号
*/
private String orderCode;
}
......@@ -9,6 +9,7 @@ import com.freemud.application.sdk.api.ordercenter.request.create.BatchQueryByCo
import com.freemud.application.sdk.api.ordercenter.request.create.CreateFatherSonOrderReq;
import com.freemud.application.sdk.api.ordercenter.request.create.CreateOrderRequest;
import com.freemud.application.sdk.api.ordercenter.response.*;
import com.freemud.application.sdk.api.ordercenter.response.orderInfo.AfterSalesOrderResp;
import com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoReqs;
import com.freemud.application.sdk.api.ordercenter.response.orderInfo.QueryByCodeResponse;
import com.freemud.application.sdk.api.ordercenter.util.ResponseUtil;
......@@ -461,6 +462,23 @@ public class OrderSdkService {
return createBaseResponse(responseDTO);
}
/**
* 根据订单号查询售后单
* @param partnerId
* @param orderCode
* @return
*/
public BaseResponse<List<AfterSalesOrderResp>> queryAfterSaleByOrderCode(String partnerId,String orderCode){
QueryAfterSalesByOrderCodeReq queryAfterSalesByOrderCodeReq = new QueryAfterSalesByOrderCodeReq();
queryAfterSalesByOrderCodeReq.setOrderCode(orderCode);
queryAfterSalesByOrderCodeReq.setPartnerId(partnerId);
OrderBaseResp<List<AfterSalesOrderResp>> responseDTO = RequestThirdPartyUtils.httpJsonReqComplexNew(restTemplate, InterfaceAddressConstant.BATCH_QUERY_AFTER_SALES,
createBaseRequest(queryAfterSalesByOrderCodeReq, ""), new ParameterizedTypeReference<OrderBaseResp<List<AfterSalesOrderResp>>>() {
});
return responseHandle(responseDTO);
}
private BaseResponse<BatchQueryAfterSalesResp> createBaseResponse(BatchQueryAfterSalesBaseResponse<AfterSalesPageResp> responseDTO) {
if (responseDTO == null) {
return responseHandle(null);
......
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