| | |
| | | RunVipDataDictionaryEnum.RUN_VIP_BALANCE_TO_COIN_PERCENT.getType(), |
| | | RunVipDataDictionaryEnum.RUN_VIP_BALANCE_TO_COIN_PERCENT.getCode()).getValue() |
| | | ).setScale(4, BigDecimal.ROUND_DOWN); |
| | | |
| | | BigDecimal withdrawalAmount = withdrawalDto.getAmount().multiply(balanceToCoin).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal fee = balanceToCoinPercent; |
| | | // BigDecimal fee = balanceToCoinPercent.multiply(withdrawalAmount).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal withdrawalAmountReal = withdrawalAmount.subtract(fee); |
| | | if(BigDecimal.ZERO.compareTo(withdrawalAmountReal) >= 0){ |
| | | throw new FebsException(minCnt+"手续费不足"); |
| | | } |
| | | |
| | | /** |
| | | * 减少碳币,增加进行中提现记录 |
| | | */ |
| | | walletService.reduceBalance(withdrawalDto.getAmount(), loginMember.getId()); |
| | | |
| | | BigDecimal withdrawalAmount = withdrawalDto.getAmount().multiply(balanceToCoin).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal fee = balanceToCoinPercent.multiply(withdrawalAmount).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal withdrawalAmountReal = withdrawalAmount.subtract(fee); |
| | | String orderNo = MallUtils.getOrderNum("TX"); |
| | | MallMemberWithdraw withdraw = new MallMemberWithdraw(); |
| | | withdraw.setWithdrawNo(orderNo); |