xiaoyong931011
2023-06-07 3c1a3bb702693a70487154c8804c648be8c29630
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -636,6 +636,9 @@
//            System.out.println(2);
//        }
//        getLocalAddress("0x2bBAD0d2362a8dbdc655fBa5A0cd51d5379e38f7");
        BigDecimal amountIn = BigDecimal.valueOf(951);
        BigDecimal result = amountIn.divide(BigDecimal.valueOf(100));
        System.out.println(result.remainder(BigDecimal.ONE).equals(BigDecimal.ZERO));
    }
    @Override
@@ -711,8 +714,22 @@
                 *  每人总共入金100U
                 */
                BigDecimal amountIn = transferADto.getAmount();
                if(amountIn.compareTo(new BigDecimal(100)) != 0){
                    throw new FebsException("Limit per address 100 USDT");
//                if(amountIn.compareTo(new BigDecimal(100)) != 0){
//                    throw new FebsException("Limit per address 100 USDT");
//                }
                /**
                 * 每单金额得大于100 小于1000 限制
                 */
                if(amountIn.compareTo(new BigDecimal(100)) < 0){
                    throw new FebsException("Min 100");
                }
                if(amountIn.compareTo(new BigDecimal(1000)) > 0){
                    throw new FebsException("Max 1000");
                }
                BigDecimal result = amountIn.divide(BigDecimal.valueOf(100));
                if(!result.remainder(BigDecimal.ONE).equals(BigDecimal.ZERO)){
                    throw new FebsException("Please enter an integer multiple of 100");
                }
//                BigDecimal amountInLast = dappChargeUsdtMapper.selectByMaxAmountMemberId(member.getId());
@@ -736,9 +753,12 @@
//                        throw new FebsException("Limit per address 100 USDT");
//                    }
//                }
                /**
                 * 每个地址只能使用一次 限制
                 */
                if(getLocalAddress(dappMemberEntity.getAddress())){
                    if(BigDecimal.ZERO.compareTo(amountInLast) < 0){
                        throw new FebsException("Limit per address 100 USDT");
                        throw new FebsException("Address can only be used once");
                    }
                }
                /**