| | |
| | | if(ObjectUtil.isEmpty(mallMemberBank)){ |
| | | throw new FebsException("未找到银行卡信息"); |
| | | } |
| | | if(ObjectUtil.isEmpty(mallMemberBank.getBankName())){ |
| | | throw new FebsException("请填写所属银行"); |
| | | } |
| | | if(ObjectUtil.isEmpty(mallMemberBank.getSubbranchName())){ |
| | | throw new FebsException("请填写所属支行"); |
| | | } |
| | | if(ObjectUtil.isEmpty(mallMemberBank.getDigitalNo())){ |
| | | throw new FebsException("请填写数字货币账号"); |
| | | } |
| | | |
| | | MallMemberWallet wallet = mallMemberWalletMapper.selectWalletByMemberId(memberId); |
| | | // 可提现 |
| | |
| | | if("1".equals(voucherOnOff)){ |
| | | BigDecimal voucherCntDto = withdrawalDto.getVoucherCnt(); |
| | | if(voucherCntDto.compareTo(BigDecimal.ZERO) <= 0){ |
| | | throw new FebsException("红豆不足"); |
| | | throw new FebsException("能量不足"); |
| | | } |
| | | //提现需要的凭证数量 = 提现金额 * 余额提现需要绿色凭证比例 |
| | | DataDictionaryCustom voucherPercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | |
| | | // BigDecimal voucherCnt = wallet.getVoucherCnt(); |
| | | BigDecimal voucherFireCnt = wallet.getVoucherFireCnt(); |
| | | if(voucherFireCnt.compareTo(voucherPercentNeed) < 0){ |
| | | throw new FebsException("红豆不足"); |
| | | throw new FebsException("能量不足"); |
| | | } |
| | | |
| | | // walletService.reduce(voucherCntDto, memberId, "voucherCnt"); |