临时提交
This commit is contained in:
parent
b548e1aad1
commit
6ea063f36d
|
@ -393,6 +393,10 @@ public class TransactionBillServiceImpl implements TransactionBillService {
|
|||
bill.setChannelCost(channel.getCostRate().multiply(bill.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); // 渠道成本
|
||||
|
||||
transactionTemplate.execute(status -> {
|
||||
// 减少余额后的用户信息
|
||||
SmUserVo afterUser = smUserMapper.selectSimpleById(userId);
|
||||
bill.setAfterBalance(afterUser.getBalance());
|
||||
|
||||
// 提现申请
|
||||
int insert = this.insertSmTransactionBill(bill);
|
||||
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());
|
||||
|
||||
// 减少余额后的用户信息
|
||||
SmUserVo afterUser = smUserMapper.selectSimpleById(userId);
|
||||
bill.setAfterBalance(afterUser.getBalance());
|
||||
|
||||
return insert;
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.ss.receiveBill.domain.ReceiveBillQuery;
|
||||
import com.ruoyi.ss.receiveBill.service.ReceiveBillService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author wjh
|
||||
* 2024/8/7
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/receiveBill")
|
||||
public class AppReceiveBillController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ReceiveBillService receiveBillService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(ReceiveBillQuery query) {
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user