| | |
| | | // 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 |
| | |
| | | * 每人总共入金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()); |
| | |
| | | // 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"); |
| | | } |
| | | } |
| | | /** |