xiaoyong931011
2023-06-02 1c60c0f2ab36bce52690451442399d5b113eb0e4
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -454,7 +454,7 @@
        coinACntDic.setValue(coinACnt.toString());
        dataDictionaryCustomMapper.updateById(coinACntDic);
        coinAPrice = coinAUsdtCnt.divide(coinACnt,8,BigDecimal.ROUND_DOWN);
        coinAPrice = coinAUsdtCnt.divide(coinACnt,12,BigDecimal.ROUND_DOWN);
        aCoinPriceDic.setValue(coinAPrice.toString());
        dataDictionaryCustomMapper.updateById(aCoinPriceDic);
@@ -709,10 +709,10 @@
                /**
                 * 出局复投要求等于戓大于自己上次投资金额
                 */
                BigDecimal maxAmount = dappChargeUsdtMapper.selectByMaxAmountMemberId(member.getId());
                if(maxAmount.compareTo(transferADto.getAmount()) > 0){
                    throw new FebsException("投资金额不能小于"+maxAmount.setScale(4,BigDecimal.ROUND_DOWN));
                }
//                BigDecimal maxAmount = dappChargeUsdtMapper.selectByMaxAmountMemberId(member.getId());
//                if(maxAmount.compareTo(transferADto.getAmount()) > 0){
//                    throw new FebsException("投资金额不能小于"+maxAmount.setScale(4,BigDecimal.ROUND_DOWN));
//                }
                //生成一条进行中的入金资金流水记录
                DappFundFlowEntity fundFlow = new DappFundFlowEntity(
                        member.getId(),
@@ -1050,7 +1050,7 @@
                PoolEnum.COIN_A_PRICE.getCode()
        );
        BigDecimal coinAPrice = new BigDecimal(aCoinPriceDic.getValue());
        coinAPrice = coinAUsdtCnt.divide(coinACnt,8,BigDecimal.ROUND_DOWN);
        coinAPrice = coinAUsdtCnt.divide(coinACnt,12,BigDecimal.ROUND_DOWN);
        aCoinPriceDic.setValue(coinAPrice.toString());
        dataDictionaryCustomMapper.updateById(aCoinPriceDic);