fhx
2023-12-18 b18c22d3f1e8dc31489585196f87010c1904d30a
1.修改升单和退款处理逻辑
3个文件已修改
29 ■■■■■ 已修改文件
phi_platform_common/src/main/resources/mapper/platform/CancelOrderMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRiseServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/platform/CancelOrderMapper.xml
@@ -8,7 +8,7 @@
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,orderId = #{orderId},operatorId = #{operatorId},operatorName = #{operatorName},roleId = #{roleId},roleStr = #{roleStr},shopId = #{shopId},shopName = #{shopName},isApproval = #{isApproval},isRefund = #{isRefund},platformSource = #{platformSource},approvalstatus = #{approvalstatus},applyId = #{applyId},examEmplId = #{examEmplId},examEmplName = #{examEmplName},refundRecordId = #{refundRecordId},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
            ,orderId = #{orderId},operatorId = #{operatorId},operatorName = #{operatorName},roleId = #{roleId},roleStr = #{roleStr},shopId = #{shopId},shopName = #{shopName},isApproval = #{isApproval},isRefund = #{isRefund},platformSource = #{platformSource},approvalstatus = #{approvalstatus},applyId = #{applyId},examEmplId = #{examEmplId},examEmplName = #{examEmplName},refundRecordId = #{refundRecordId},isThirdPartyRefund = #{isThirdPartyRefund},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
        </trim>
    </sql>
     
@@ -19,8 +19,12 @@
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into cancel_order (id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isDel,createTime,editTime)  values (#{id},#{orderId},#{operatorId},#{operatorName},#{roleId},#{roleStr},#{shopId},#{shopName},#{isApproval},#{isRefund},#{platformSource},#{approvalstatus},#{applyId},#{examEmplId},#{examEmplName},#{refundRecordId},#{isDel},#{createTime},#{editTime})
        insert into cancel_order (id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isThirdPartyRefund,isDel,createTime,editTime)  values (#{id},#{orderId},#{operatorId},#{operatorName},#{roleId},#{roleStr},#{shopId},#{shopName},#{isApproval},#{isRefund},#{platformSource},#{approvalstatus},#{applyId},#{examEmplId},#{examEmplName},#{refundRecordId},#{isThirdPartyRefund},#{isDel},#{createTime},#{editTime})
    </insert>
    <insert id="insertById" parameterType="com.hx.phiappt.model.order.CancelOrder">
        insert into cancel_order (id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isThirdPartyRefund,isDel,createTime,editTime)  values (#{id},#{orderId},#{operatorId},#{operatorName},#{roleId},#{roleStr},#{shopId},#{shopName},#{isApproval},#{isRefund},#{platformSource},#{approvalstatus},#{applyId},#{examEmplId},#{examEmplName},#{refundRecordId},#{isThirdPartyRefund},#{isDel},#{createTime},#{editTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.order.CancelOrder" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
@@ -51,14 +55,14 @@
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.order.CancelOrder" parameterType="java.lang.Object" >
        select 
            id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isDel,createTime,editTime
            id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isThirdPartyRefund,isDel,createTime,editTime
        from cancel_order
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.order.CancelOrder" parameterType="java.lang.Object" >
        select 
            id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isDel,createTime,editTime
            id,orderId,operatorId,operatorName,roleId,roleStr,shopId,shopName,isApproval,isRefund,platformSource,approvalstatus,applyId,examEmplId,examEmplName,refundRecordId,isThirdPartyRefund,isDel,createTime,editTime
        from cancel_order
        WHERE id = #{value}
    </select>
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -1370,6 +1370,10 @@
            }
        }
        if(orderRefundDto.getIsThirdPartyRefund() != null){
            cancelOrder.setIsThirdPartyRefund(orderRefundDto.getIsThirdPartyRefund());
        }
        cancelOrder.setIsApproval(orderRefundDto.getIsApproval());
        cancelOrder.setIsRefund(orderRefundDto.getIsRefund());
        cancelOrder.setPlatformSource(orderRefundDto.getPlatformSource());
@@ -1790,7 +1794,7 @@
        if(CancelOrderDto.HIS_ASSISTANT.equals(cancelOrder.getPlatformSource())){
            //如果是his自动处理退款单原路退回
            //CRM的操作也在这里
            hisAssistantNoteList(ordersTotal,refundRecord,operationId,orderNodeBuilder);
            hisAssistantNoteList(ordersTotal,refundRecord,operationId,orderNodeBuilder, cancelOrder.getIsThirdPartyRefund());
        }
        //撤销【保妥适会员】标签
@@ -1801,7 +1805,8 @@
    /**
     * his助手原路退回退款单
     */
    public void hisAssistantNoteList(OrdersTotal ordersTotal,RefundRecord refundRecord,String operationId,StringBuilder orderNodeBuilder){
    public void hisAssistantNoteList(OrdersTotal ordersTotal,RefundRecord refundRecord,String operationId
            ,StringBuilder orderNodeBuilder, Integer isThirdPartyRefund){
        OrderRefundNoteListDto orderRefundNoteListDto=new OrderRefundNoteListDto();
        orderRefundNoteListDto.setOperationId(operationId);
        orderRefundNoteListDto.setOrderId(ordersTotal.getId());
@@ -1840,8 +1845,8 @@
            orderRefundNoteDto.setRefundName(refundRecordMethod.getRefundName());
            orderRefundModelList.add(orderRefundNoteDto);
            //是现金
            if(refundRecordMethod.getIsMoneyPay().equals(BaseEntity.YES)){
            //是现金 && 是第三方退款
            if(refundRecordMethod.getIsMoneyPay().equals(BaseEntity.YES) && isThirdPartyRefund == BaseEntity.YES){
                orderRefundNoteDtos.add(orderRefundNoteDto);
            }
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRiseServiceImpl.java
@@ -236,7 +236,9 @@
        //判断已支付订单是否需要营销助手审批
        //记录取消日志
        //默认赋值平台来源为1,0会走真实退款线上支付逻辑
        orderRefundDto.setPlatformSource(CancelOrderDto.HIS_BACKSTAGE);
        orderRefundDto.setPlatformSource(CancelOrderDto.HIS_ASSISTANT);
        //不第三方退款
        orderRefundDto.setIsThirdPartyRefund(BaseEntity.NO);
        CancelOrder cancelOrder = orderRefundService.handleCancelOrder(ordersTotal,orderRefundDto);
        //这里开始真正的退款到用户账户的