| | |
| | | if (Objects.isNull(withdrawRecord)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | MemberBank memberBank = memberBankMapper.selectById(withdrawRecord.getBankId()); |
| | | if(Objects.nonNull(memberBank)){ |
| | | withdrawRecord.setBankName(memberBank.getBankName()); |
| | | } |
| | | if(!Constants.equalsInteger(withdrawRecord.getStatus(), Constants.ZERO)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OSS, Constants.TRANSFER_FILE).getCode(); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"商户余额不足"); |
| | | } |
| | | |
| | | MemberBank memberBank = memberBankMapper.selectById(request.getBankId()); |
| | | if(Objects.isNull(memberBank)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到收款银行信息"); |
| | | } |
| | | WithdrawRecord withdrawRecord = new WithdrawRecord(); |
| | | withdrawRecord.setCreateDate(new Date()); |
| | | withdrawRecord.setIsdeleted(Constants.ZERO); |
| | |
| | | withdrawRecord.setMemberId(request.getMemberId()); |
| | | withdrawRecord.setCode(this.getNextInCode()); |
| | | withdrawRecord.setStatus(Constants.ZERO); |
| | | withdrawRecord.setBankName(memberBank.getBankName()); |
| | | withdrawRecord.setName(memberBank.getName()); |
| | | withdrawRecord.setBankAccount(memberBank.getBankAccount()); |
| | | withdrawRecordMapper.insert(withdrawRecord); |
| | | |
| | | DealIntegralRequest dealIntegralRequest = new DealIntegralRequest(); |