| | |
| | | |
| | | //每日提现额度上限 |
| | | BigDecimal allCashOut = cashOutSettingVo.getAllCashOut(); |
| | | if(withdrawalDto.getAmount().compareTo(allCashOut) > 0){ |
| | | throw new FebsException("每日限额为"+cashOutSettingVo.getAllCashOut().setScale(2,BigDecimal.ROUND_DOWN)); |
| | | } |
| | | List<MallMemberWithdraw> mallMemberWithdrawListDone = this.baseMapper.selectListByMemberIdAndDate(memberId,new Date()); |
| | | if(CollUtil.isNotEmpty(mallMemberWithdrawListDone)){ |
| | | if (withdrawalDto.getAmount().compareTo(allCashOut) >= 0) { |
| | | BigDecimal amountTCAll = mallMemberWithdrawListDone.stream().map(MallMemberWithdraw::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | amountTCAll = amountTCAll.add(withdrawalDto.getAmount()); |
| | | if (amountTCAll.compareTo(allCashOut) > 0) { |
| | | throw new FebsException("每日限额为"+cashOutSettingVo.getAllCashOut().setScale(2,BigDecimal.ROUND_DOWN)); |
| | | } |
| | | } |