xiaoyong931011
2023-08-06 a2aa6f1b4becb6e2af0c527ef231dcb8f31120c7
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -364,6 +364,11 @@
         * A币卖币规则,卖出100%销毁,30%回流底池溢价
         */
        DappMemberEntity member = LoginUserUtil.getAppUser();
        DappMemberEntity dappMemberEntity = dappMemberDao.selectById(member.getId());
        Integer activeStatus = dappMemberEntity.getActiveStatus();
        if(1 != activeStatus){
            throw new FebsException("Not yet open");
        }
        DataDictionaryCustom systemStateDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                PoolEnum.SYSTEM.getType(),
@@ -446,7 +451,7 @@
        /**
         * A币卖币规则,卖出100%销毁,30%回流底池溢价
         */
        BigDecimal coinUsdtAmountFee = coinUsdtAmount.multiply(new BigDecimal(0.2)).setScale(4,BigDecimal.ROUND_DOWN);
        BigDecimal coinUsdtAmountFee = coinUsdtAmount.multiply(new BigDecimal(0.05)).setScale(4,BigDecimal.ROUND_DOWN);
//        coinUsdtAmount = coinUsdtAmount.multiply(outPercent).setScale(4,BigDecimal.ROUND_DOWN);
        //金本位底池数量
        DataDictionaryCustom coinAUsdtPriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
@@ -826,6 +831,8 @@
                 */
                flow.setFromHash(transferADto.getTxHash());
                dappFundFlowDao.updateById(flow);
                chainProducer.sendContractAnDao(flow.getId());
//                /**
//                 * 生成会员入金买A币的记录
//                 */
@@ -1107,6 +1114,9 @@
        if(ObjectUtil.isEmpty(memberParent)){
            throw new FebsException("请输入正确的地址");
        }
        if(member.getAddress().equals(memberParent.getAddress())){
            throw new FebsException("请输入正确的地址");
        }
        BigDecimal coinCnt = roundCoinDto.getCoinCnt();
        if(BigDecimal.ZERO.compareTo(coinCnt) >= 0){