| | |
| | | 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(); |
| | | if(voucherCnt.compareTo(voucherPercentNeed) < 0){ |
| | | throw new FebsException("绿色积分不足"); |
| | | throw new FebsException("红豆不足"); |
| | | } |
| | | |
| | | walletService.reduce(voucherCntDto, memberId, "voucher_cnt"); |