| | |
| | | if (!mallMember.getTradePassword().equals(SecureUtil.md5(withdrawalBalanceDto.getTradePwd()))) { |
| | | throw new FebsException("支付密码错误"); |
| | | } |
| | | DataDictionaryCustom coinWithdrawDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.COIN_WITHDRAW.getType(), |
| | | DataDictionaryEnum.COIN_WITHDRAW.getCode() |
| | | ); |
| | | if(!"1".equals(coinWithdrawDic.getValue())){ |
| | | throw new FebsException("暂未开放"); |
| | | } |
| | | |
| | | |
| | | DataDictionaryCustom withdrawAmountDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.WITHDRAW_AMOUNT.getType(), |
| | |
| | | if(withdrawAmount.compareTo(amount) > 0){ |
| | | throw new FebsException("至少为"+withdrawAmount); |
| | | } |
| | | boolean b = Integer.parseInt(amount.toString()) % Integer.parseInt(withdrawAmount.toString()) == 0; |
| | | |
| | | // boolean b = Integer.parseInt(amount.toString()) % Integer.parseInt(withdrawAmount.toString()) == 0; |
| | | boolean b = amount.remainder(withdrawAmount).compareTo(BigDecimal.ZERO) == 0; |
| | | if(!b){ |
| | | throw new FebsException("金额必须为"+withdrawAmount+"的整数倍"); |
| | | } |