| | |
| | | if(amountIn.compareTo(new BigDecimal(100)) < 0){ |
| | | throw new FebsException("Min 100"); |
| | | } |
| | | if(amountIn.compareTo(new BigDecimal(1000)) > 0){ |
| | | throw new FebsException("Max 1000"); |
| | | if(amountIn.compareTo(new BigDecimal(100000)) > 0){ |
| | | throw new FebsException("Max 100000"); |
| | | } |
| | | |
| | | BigDecimal result = amountIn.divide(BigDecimal.valueOf(100)); |
| | |
| | | */ |
| | | BigDecimal amountInAll = amountInLast.add(amountIn); |
| | | if(getLocalAddress(dappMemberEntity.getAddress())){ |
| | | if(amountInAll.compareTo(new BigDecimal(1000)) > 0){ |
| | | BigDecimal add = new BigDecimal(1000).subtract(amountInLast).setScale(0, BigDecimal.ROUND_DOWN); |
| | | if(amountInAll.compareTo(new BigDecimal(100000)) > 0){ |
| | | BigDecimal add = new BigDecimal(100000).subtract(amountInLast).setScale(0, BigDecimal.ROUND_DOWN); |
| | | throw new FebsException("Max "+ add.toString()); |
| | | } |
| | | } |
| | |
| | | BigDecimal feePercent = new BigDecimal(StrUtil.isEmpty(dic.getValue()) ? "0.2" : dic.getValue()); |
| | | //手续费 |
| | | BigDecimal feeCnt = coinCnt.multiply(feePercent).setScale(4,BigDecimal.ROUND_DOWN); |
| | | if(AppContants.YL_MEMBER_ID.equals(member.getId())){ |
| | | if(AppContants.YL_MEMBER_ID.equals(member.getId()) |
| | | || AppContants.YL_MEMBER_ID_TWO.equals(member.getId())){ |
| | | feeCnt = BigDecimal.ZERO; |
| | | } |
| | | //闪对钱包获取的 |