fwq
2024-02-23 3a9bb66393ab71a0c64ddf3e63e3033abc87cb9c
退款增加退费统计类型
3个文件已修改
20 ■■■■ 已修改文件
phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml
@@ -8,7 +8,7 @@
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,code = #{code},sealStatus = #{sealStatus},refundOperationType = #{refundOperationType},refundType = #{refundType},refundStatus = #{refundStatus},refundShopId = #{refundShopId},refundShopNo = #{refundShopNo},refundShopName = #{refundShopName},refundTotal = #{refundTotal},refundIntegral = #{refundIntegral},realRefundTotal = #{realRefundTotal},realRefundIntegral = #{realRefundIntegral},deductionTotal = #{deductionTotal},cashTotal = #{cashTotal},cashPurenessTotal = #{cashPurenessTotal},rechargeTotal = #{rechargeTotal},incrementTotal = #{incrementTotal},payee = #{payee},openBank = #{openBank},openBranch = #{openBranch},account = #{account},confirmStatus = #{confirmStatus},confirmId = #{confirmId},confirmNo = #{confirmNo},confirmName = #{confirmName},confirmRoleNo = #{confirmRoleNo},confirmRoleName = #{confirmRoleName},confirmCancel = #{confirmCancel},confirmCancelId = #{confirmCancelId},confirmCancelNo = #{confirmCancelNo},confirmCancelName = #{confirmCancelName},confirmCancelRoleNo = #{confirmCancelRoleNo},confirmCancelRoleName = #{confirmCancelRoleName},refundReason = #{refundReason},remarks = #{remarks},sourceType = #{sourceType},sourceAssistantType = #{sourceAssistantType},orderId = #{orderId},userId = #{userId},operatorType = #{operatorType},operatorId = #{operatorId},operatorNo = #{operatorNo},operatorName = #{operatorName},operatorAppId = #{operatorAppId},operatorAppCode = #{operatorAppCode},operatorAppName = #{operatorAppName},invalidTime = #{invalidTime},invalidType = #{invalidType},invalidId = #{invalidId},invalidNo = #{invalidNo},invalidName = #{invalidName},invalidRoleNo = #{invalidRoleNo},invalidRoleName = #{invalidRoleName},invalidAppId = #{invalidAppId},invalidAppCode = #{invalidAppCode},invalidAppName = #{invalidAppName},invalidRemarks = #{invalidRemarks},addTime = #{addTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
            ,code = #{code},sealStatus = #{sealStatus},refundOperationType = #{refundOperationType},refundType = #{refundType},refundStatus = #{refundStatus},refundStatistics = #{refundStatistics},refundShopId = #{refundShopId},refundShopNo = #{refundShopNo},refundShopName = #{refundShopName},refundTotal = #{refundTotal},refundIntegral = #{refundIntegral},realRefundTotal = #{realRefundTotal},realRefundIntegral = #{realRefundIntegral},deductionTotal = #{deductionTotal},cashTotal = #{cashTotal},cashPurenessTotal = #{cashPurenessTotal},rechargeTotal = #{rechargeTotal},incrementTotal = #{incrementTotal},payee = #{payee},openBank = #{openBank},openBranch = #{openBranch},account = #{account},confirmStatus = #{confirmStatus},confirmId = #{confirmId},confirmNo = #{confirmNo},confirmName = #{confirmName},confirmRoleNo = #{confirmRoleNo},confirmRoleName = #{confirmRoleName},confirmCancel = #{confirmCancel},confirmCancelId = #{confirmCancelId},confirmCancelNo = #{confirmCancelNo},confirmCancelName = #{confirmCancelName},confirmCancelRoleNo = #{confirmCancelRoleNo},confirmCancelRoleName = #{confirmCancelRoleName},refundReason = #{refundReason},remarks = #{remarks},sourceType = #{sourceType},sourceAssistantType = #{sourceAssistantType},orderId = #{orderId},userId = #{userId},operatorType = #{operatorType},operatorId = #{operatorId},operatorNo = #{operatorNo},operatorName = #{operatorName},operatorAppId = #{operatorAppId},operatorAppCode = #{operatorAppCode},operatorAppName = #{operatorAppName},invalidTime = #{invalidTime},invalidType = #{invalidType},invalidId = #{invalidId},invalidNo = #{invalidNo},invalidName = #{invalidName},invalidRoleNo = #{invalidRoleNo},invalidRoleName = #{invalidRoleName},invalidAppId = #{invalidAppId},invalidAppCode = #{invalidAppCode},invalidAppName = #{invalidAppName},invalidRemarks = #{invalidRemarks},addTime = #{addTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
        </trim>
    </sql>
     
@@ -19,11 +19,11 @@
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundStatistics},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
    </insert>
    <insert id="insertById" parameterType="com.hx.phiappt.model.refund.RefundRecord">
        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundStatistics},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="com.hx.mybatisTool.SqlSentence" >
@@ -55,14 +55,14 @@
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="java.lang.Object" >
        select 
            id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
            id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
        from refund_record
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="java.lang.Object" >
        select 
            id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
            id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
        from refund_record
        WHERE id = #{value}
    </select>
phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java
@@ -184,6 +184,9 @@
        if(orderRefundDto.getIsRefund() == null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"是否自动生成退款单不能为空");
        }
        if(orderRefundDto.getRefundStatistics() == null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"退款统计类型不能为空!");
        }
        OrdersTotal ordersTotal = ordersTotalService.selectOneByKey(orderRefundDto.getOrderId());
        if (ordersTotal == null) {
@@ -223,6 +226,10 @@
        if(orderRefundDto.getIsRefund()==null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"是否自动生成退款单不能为空");
        }
        if(orderRefundDto.getRefundStatistics() == null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"退款统计类型不能为空!");
        }
        SqlSentence sqlSentence = new SqlSentence();
        Map<String, Object> sqlMap = new HashMap<>();
        sqlSentence.setM(sqlMap);
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -982,6 +982,7 @@
        refundRecord.setOperatorNo(employee.getEmployeeNo());
        refundRecord.setOperatorName(employee.getCnName());
        refundRecord.setRefundIntegral(orderRefundDto.getRefundIntegral());
        refundRecord.setRefundStatistics(orderRefundDto.getRefundStatistics());
        refundRecord.setRefundOperationType(orderRefundDto.getRefundOperationType());
        /////退款的备注
@@ -1271,7 +1272,7 @@
        orderPartRefundDto.setOrdersTotalDto(ordersTotalDto);//填充主订单信息
        orderPartRefundDto.setRefundStatistics(refundRecord.getRefundStatistics());
        //填充操作人,用户的基本信息
        orderPartRefundDto.setOrdersTotalDto(ordersTotalDto);
        orderPartRefundDto.setOperatorId(cancelOrder.getOperatorId());