|
@@ -766,7 +766,7 @@ public class WFTOrderService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String refundOrder(Long userId) throws Exception {
|
|
|
|
|
|
|
+ public String refundOrder(Long userId,Integer type) throws Exception {
|
|
|
|
|
|
|
|
//查询账户余额
|
|
//查询账户余额
|
|
|
UserAccount userAccount =
|
|
UserAccount userAccount =
|
|
@@ -800,7 +800,7 @@ public class WFTOrderService {
|
|
|
refundOrder(userOrderInfo,refundMoney, "账户退款", SystemConstants.STATUS_ONE);
|
|
refundOrder(userOrderInfo,refundMoney, "账户退款", SystemConstants.STATUS_ONE);
|
|
|
//账户变动及日志记录(退款清空账户余额)
|
|
//账户变动及日志记录(退款清空账户余额)
|
|
|
userAccountService.updateAccountBalanceAndLog(
|
|
userAccountService.updateAccountBalanceAndLog(
|
|
|
- SecurityUtils.getUserId(),
|
|
|
|
|
|
|
+ userId,
|
|
|
refundMoney,
|
|
refundMoney,
|
|
|
SystemConstants.CHANGE_TYPE_REDUCE,
|
|
SystemConstants.CHANGE_TYPE_REDUCE,
|
|
|
SystemConstants.ACCOUNT_LOG_REFUND_NOTE,
|
|
SystemConstants.ACCOUNT_LOG_REFUND_NOTE,
|
|
@@ -821,10 +821,10 @@ public class WFTOrderService {
|
|
|
}
|
|
}
|
|
|
if (canRefundMoney.compareTo(refundMoney) < 0) {
|
|
if (canRefundMoney.compareTo(refundMoney) < 0) {
|
|
|
//退款金额小于订单金额,则先退订单金额
|
|
//退款金额小于订单金额,则先退订单金额
|
|
|
- refundOrder(userOrderInfo, canRefundMoney, "账户退款", SystemConstants.STATUS_TWO);
|
|
|
|
|
|
|
+ refundOrder(userOrderInfo, canRefundMoney, "账户退款", type);
|
|
|
//账户变动及日志记录(减少账户余额)
|
|
//账户变动及日志记录(减少账户余额)
|
|
|
userAccountService.updateAccountBalanceAndLog(
|
|
userAccountService.updateAccountBalanceAndLog(
|
|
|
- SecurityUtils.getUserId(),
|
|
|
|
|
|
|
+ userId,
|
|
|
canRefundMoney,
|
|
canRefundMoney,
|
|
|
SystemConstants.CHANGE_TYPE_REDUCE,
|
|
SystemConstants.CHANGE_TYPE_REDUCE,
|
|
|
SystemConstants.ACCOUNT_LOG_REFUND_NOTE,
|
|
SystemConstants.ACCOUNT_LOG_REFUND_NOTE,
|