chenjiahe
2023-05-06 866a8e951f9c7e9d0add9b08ad23433b100d4689
Merge remote-tracking branch 'origin/master-prod-new' into master-prod-new
1个文件已修改
19 ■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -30,13 +30,15 @@
import com.hx.phip.tool.CreateNo;
import com.hx.phip.tool.refund.PartialRefundUtil;
import com.hx.phip.tool.refund.PaymentCountTool;
import com.hx.phip.util.api.*;
import com.hx.phip.util.api.ApiOrderUtil;
import com.hx.phip.util.api.SendNoticeUtil;
import com.hx.phip.util.api.UserLevelUtil;
import com.hx.phip.util.api.UserMoneyUtil;
import com.hx.phip.vo.order.payment.PayMethodVo;
import com.hx.phip.vo.order.refund.DistributionRedundMethodVo;
import com.hx.phip.vo.order.refund.DistributionRedundVo;
import com.hx.resultTool.Result;
import com.hx.util.StringUtils;
import com.hz.crm.dto.OrderStatusDto;
import com.hz.crm.dto.order.refund.RefundAmountModelDto;
import com.hz.crm.dto.order.refund.RefundDto;
import com.hz.crm.dto.order.refund.RefundReturnDto;
@@ -1634,8 +1636,9 @@
        orderRefundNoteListDto.setOperationId(operationId);
        orderRefundNoteListDto.setOrderId(ordersTotal.getId());
        //统一在crm取消订单
        // 没有现金支付, 如果是crm的订单则调用crm取消订单的方法
        if("crm".equals(ordersTotal.getAppIdCode()) && OrderTotalConstants.STATUS_CANCEL == ordersTotal.getStatus()){
    /*    if("crm".equals(ordersTotal.getAppIdCode()) && OrderTotalConstants.STATUS_CANCEL == ordersTotal.getStatus()){
            //通知crm
            if(OrderTotalConstants.STATUS_REFUND_FINSH==ordersTotal.getRefundStatus()){
                //全部退款完成
@@ -1660,7 +1663,7 @@
                }
            }
        }
        }*/
        SqlSentence sqlSentence = new SqlSentence();
        Map<String,Object> map=new HashMap<>();
@@ -1779,6 +1782,14 @@
            refundDto.setIsWholeOrder(0);
            refundDto.setRemarks("phis退款单退款,订单号:"+ordersTotal.getOrderNo());
            refundDto.setAmountModelList(amountModelList);
            refundDto.setOperatorId(operatorId);
            refundDto.setOperatorName(operatorName);
            if(OrderTotalConstants.STATUS_REFUND_FINSH==ordersTotal.getRefundStatus() &&
                    OrderTotalConstants.STATUS_CANCEL == ordersTotal.getStatus()){
                //全部退款完成则取消订单
                refundDto.setIsCancelOrder(BaseEntity.YES);
            }
            logger.info("调用crm退款入参:{}",JSONObject.toJSONString(refundDto));
            Result result= fOderService.refundOrder(refundDto);;
            logger.info("调用crm退款返回:{}",JSONObject.toJSONString(result));