debug:提现后剩余金额为0
This commit is contained in:
parent
b548e1aad1
commit
e68b3e85ab
|
@ -393,6 +393,10 @@ public class TransactionBillServiceImpl implements TransactionBillService {
|
||||||
bill.setChannelCost(channel.getCostRate().multiply(bill.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); // 渠道成本
|
bill.setChannelCost(channel.getCostRate().multiply(bill.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); // 渠道成本
|
||||||
|
|
||||||
transactionTemplate.execute(status -> {
|
transactionTemplate.execute(status -> {
|
||||||
|
// 减少余额后的用户信息
|
||||||
|
SmUserVo afterUser = smUserMapper.selectSimpleById(userId);
|
||||||
|
bill.setAfterBalance(afterUser.getBalance());
|
||||||
|
|
||||||
// 提现申请
|
// 提现申请
|
||||||
int insert = this.insertSmTransactionBill(bill);
|
int insert = this.insertSmTransactionBill(bill);
|
||||||
ServiceUtil.assertion(insert != 1, "提现申请失败");
|
ServiceUtil.assertion(insert != 1, "提现申请失败");
|
||||||
|
@ -400,10 +404,6 @@ public class TransactionBillServiceImpl implements TransactionBillService {
|
||||||
// 减少余额,并判断提现金额是否超额(减少的是交易金额)
|
// 减少余额,并判断提现金额是否超额(减少的是交易金额)
|
||||||
userService.subtractBalance(userId, bill.getMoney(), String.format("提现申请:%s", bill.getBillNo()), RecordBalanceBstType.WITHDRAW, bill.getBillId());
|
userService.subtractBalance(userId, bill.getMoney(), String.format("提现申请:%s", bill.getBillNo()), RecordBalanceBstType.WITHDRAW, bill.getBillId());
|
||||||
|
|
||||||
// 减少余额后的用户信息
|
|
||||||
SmUserVo afterUser = smUserMapper.selectSimpleById(userId);
|
|
||||||
bill.setAfterBalance(afterUser.getBalance());
|
|
||||||
|
|
||||||
return insert;
|
return insert;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user