KKSU
2024-12-30 95c54326a4e93c4084ad424a6edd3eb93195328d
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -581,14 +581,20 @@
                        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);