123
This commit is contained in:
@@ -52,8 +52,6 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
private WithdrawTotalCache withdrawTotalCache;
|
||||
@Autowired
|
||||
private RankAdminManager rankAdminManager;
|
||||
@Autowired
|
||||
private SystemConfigManager systemConfigManager;
|
||||
@Override
|
||||
public void withdraw(WithdrawReq res) {
|
||||
AccountBankcard one = accountBankcardService.getOne(Wrappers.lambdaQuery(AccountBankcard.class)
|
||||
@@ -65,7 +63,6 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
if(withdrawExchange == null){
|
||||
throw new ServiceException("参数不正确");
|
||||
}
|
||||
BigDecimal withdrawRate = systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.WITHDRAW_RATE);
|
||||
Long traceId = IdManager.nextId();
|
||||
Long coinNum = withdrawExchange.getCoinNum();
|
||||
accountService.withdraw(res.getUserId(), coinNum,traceId);
|
||||
@@ -74,13 +71,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
cash.setTraceId(traceId);
|
||||
cash.setOrderNo(OrderNoUtil.createOrderNo(OrderTypeEnum.WITHDRAW_ORDER_SUB));
|
||||
cash.setWithdrawCoin(coinNum);
|
||||
cash.setCoinFees(0L);
|
||||
cash.setCoinCallbackCoin(coinNum);
|
||||
if(withdrawRate != null && !withdrawRate.equals(BigDecimal.ZERO)){
|
||||
long coinFees = NumberUtil.mul(coinNum, withdrawRate).longValue();
|
||||
cash.setCoinFees(coinFees);
|
||||
cash.setCoinCallbackCoin(coinNum-coinFees);
|
||||
}
|
||||
cash.setCoinCallbackCoin(withdrawExchange.getCoinCallbackNum());
|
||||
cash.setCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
|
||||
cash.setRealCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
|
||||
cash.setCashFees(BigDecimal.ZERO);
|
||||
|
||||
Reference in New Issue
Block a user