| | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <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> |
| | | |
| | |
| | | <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} |
| | |
| | | |
| | | <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> |
| | |
| | | } |
| | | } |
| | | |
| | | if(orderRefundDto.getIsThirdPartyRefund() != null){ |
| | | cancelOrder.setIsThirdPartyRefund(orderRefundDto.getIsThirdPartyRefund()); |
| | | } |
| | | |
| | | cancelOrder.setIsApproval(orderRefundDto.getIsApproval()); |
| | | cancelOrder.setIsRefund(orderRefundDto.getIsRefund()); |
| | | cancelOrder.setPlatformSource(orderRefundDto.getPlatformSource()); |
| | |
| | | if(CancelOrderDto.HIS_ASSISTANT.equals(cancelOrder.getPlatformSource())){ |
| | | //如果是his自动处理退款单原路退回 |
| | | //CRM的操作也在这里 |
| | | hisAssistantNoteList(ordersTotal,refundRecord,operationId,orderNodeBuilder); |
| | | hisAssistantNoteList(ordersTotal,refundRecord,operationId,orderNodeBuilder, cancelOrder.getIsThirdPartyRefund()); |
| | | } |
| | | |
| | | //撤销【保妥适会员】标签 |
| | |
| | | /** |
| | | * 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()); |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | //判断已支付订单是否需要营销助手审批 |
| | | //记录取消日志 |
| | | //默认赋值平台来源为1,0会走真实退款线上支付逻辑 |
| | | orderRefundDto.setPlatformSource(CancelOrderDto.HIS_BACKSTAGE); |
| | | orderRefundDto.setPlatformSource(CancelOrderDto.HIS_ASSISTANT); |
| | | //不第三方退款 |
| | | orderRefundDto.setIsThirdPartyRefund(BaseEntity.NO); |
| | | CancelOrder cancelOrder = orderRefundService.handleCancelOrder(ordersTotal,orderRefundDto); |
| | | |
| | | //这里开始真正的退款到用户账户的 |