| | |
| | | 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){ |
| | |
| | | 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+"]!"); |
| | | } |
| | |
| | | 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+"]!"); |
| | | } |
| | |
| | | |
| | | 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); |