fwq
2024-01-25 bfdc6b8633e72c97f7209739c138c551655cde23
优化金额处理类型
2个文件已修改
13 ■■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/tool/refund/OrderRefundCancelTool.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/util/api/UserMoneyUtil.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/tool/refund/OrderRefundCancelTool.java
@@ -159,7 +159,7 @@
        OrderLog orderLog;
        if(optType == OPT_TYPE_EXECUTE){
            //充值金额扣减
            UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),REFUND_REMARK+"["+ordersTotal.getOrderNo()+"]","退款单:"+refundRecord.getCode()+";"+optName+",扣减充值资金:"+ordersTotal.getTotal(),refundRecord.getOperatorId(),refundRecord.getOrderId(),refundRecord.getInvalidAppCode(),refundRecord.getId(),ordersTotal.getTotal().negate(), UserMoneyUnclaimed.FUND_TYPE_STORED_VALUE_FUND, OperationReasonConstants.OP_REASON_REFUND_CANCEL,commonService,UserMoneyUnclaimed.NO);
            UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),REFUND_REMARK+"["+ordersTotal.getOrderNo()+"]","退款单:"+refundRecord.getCode()+";"+optName+",扣减充值资金:"+ordersTotal.getTotal(),refundRecord.getOperatorId(),refundRecord.getOrderId(),refundRecord.getInvalidAppCode(),refundRecord.getId(),ordersTotal.getTotal().negate(), UserMoneyUnclaimed.FUND_TYPE_STORED_VALUE_FUND, OperationReasonConstants.OP_REASON_RECHARGE_REFUND,commonService,UserMoneyUnclaimed.NO);
            orderLog = RefundToolUtil.setOrderLog(refundRecord, refundRecord.getOperatorId(), refundRecord.getOperatorName(), "充值单:"+ordersTotal.getOrderNo()+";"+optName+",预扣除金额:"+ordersTotal.getTotal(), 0, OrderLogConstants.LOG_TYPE_REFUND);
        }else if(optType == OPT_TYPE_CANCEL){
@@ -242,7 +242,7 @@
                    if(optType == OPT_TYPE_EXECUTE){
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",预扣除活动规则赠送储值金金额:"+activityAction.getWorth(),refundRecord.getOperatorId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()).negate(), UserMoneyUnclaimed.FUND_TYPE_INTEGRAL,OperationReasonConstants.OP_REASON_RECHARGE_REFUND,commonService,UserMoneyUnclaimed.YES);
                    }else if(optType == OPT_TYPE_CANCEL){
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",返还赠送储值金预扣除金额:"+activityAction.getWorth(),refundRecord.getInvalidId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()), UserMoneyUnclaimed.FUND_TYPE_INTEGRAL,OperationReasonConstants.OP_REASON_RECHARGE_REFUND,commonService,UserMoneyUnclaimed.YES);
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",返还赠送储值金预扣除金额:"+activityAction.getWorth(),refundRecord.getInvalidId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()), UserMoneyUnclaimed.FUND_TYPE_INTEGRAL,OperationReasonConstants.OP_REASON_REFUND_CANCEL,commonService,UserMoneyUnclaimed.YES);
                    }else{
                        throw new PlatTipsException(PlatformCode.ERROR_TIPS,"操作类型错误[2]["+optType+"]!");
                    }
@@ -257,7 +257,7 @@
                    if(optType == OPT_TYPE_EXECUTE){
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",预扣除活动规则赠送增值金金额:"+activityAction.getWorth(),refundRecord.getOperatorId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()).negate(), UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND,OperationReasonConstants.OP_REASON_RECHARGE_REFUND,commonService,UserMoneyUnclaimed.YES);
                    }else if(optType == OPT_TYPE_CANCEL){
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",返还赠送增值金预扣除金额:"+activityAction.getWorth(),refundRecord.getInvalidId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()), UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND,OperationReasonConstants.OP_REASON_RECHARGE_REFUND,commonService,UserMoneyUnclaimed.YES);
                        UserMoneyUtil.setNewUserMoneyUnclaimed(refundRecord.getUserId(),refundRecord.getRemarks(),"订单:"+ordersTotal.getOrderNo()+";"+optName+",返还赠送增值金预扣除金额:"+activityAction.getWorth(),refundRecord.getInvalidId(),refundRecord.getOrderId(),ordersTotal.getAppIdCode(),refundRecord.getId(),new BigDecimal(activityAction.getWorth()), UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND,OperationReasonConstants.OP_REASON_REFUND_CANCEL,commonService,UserMoneyUnclaimed.YES);
                    }else{
                        throw new PlatTipsException(PlatformCode.ERROR_TIPS,"操作类型错误[3]["+optType+"]!");
                    }
phi_platform_user/src/main/java/com/hx/phip/util/api/UserMoneyUtil.java
@@ -172,8 +172,11 @@
        userMoneyUnclaimed.setOriginChannel(originChannel);
        userMoneyUnclaimed.setOperationReason(operationReason);
        if(OperationReasonConstants.OP_REASON_RECHARGE_REFUND.equals(operationReason)
                || OperationReasonConstants.OP_REASON_BRING_NEW_USER_GIFT_RETRU_CANCEL.equals(operationReason)){
        //退款,作废退款,老带新退回,老带新作废退回 默认系统处理
        if(OperationReasonConstants.OP_REASON_RECHARGE_REFUND.equals(operationReason) ||
                OperationReasonConstants.OP_REASON_REFUND_CANCEL.equals(operationReason) ||
                OperationReasonConstants.OP_REASON_BRING_NEW_USER_GIFT_RETRUN.equals(operationReason) ||
                OperationReasonConstants.OP_REASON_BRING_NEW_USER_GIFT_RETRU_CANCEL.equals(operationReason)){
            userMoneyUnclaimed.setOpType(BaseEntity.NO);
        }
        userMoneyUnclaimed.setCommonId(commonId);