| | |
| | | @Autowired |
| | | private WithdrawRecordMapper withdrawRecordMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void updateById(WithdrawRecord withdrawRecord) { |
| | | public void updateById(WithdrawRecord withdrawRecord, IntegralService integralService) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!Constants.equalsObject(withdrawRecord.getStatus(),Constants.ONE) |
| | | && !Constants.equalsObject(withdrawRecord.getStatus(),Constants.TWO)){ |
| | |
| | | model.setPayBank(withdrawRecord.getPayBank()); |
| | | withdrawRecordMapper.updateById(model); |
| | | dealBatchMultiFiles(model,withdrawRecord.getPayFileList()); |
| | | |
| | | //审批未通过 退回提现金额 |
| | | if (Constants.equalsObject(model.getStatus(), Constants.TWO)) { |
| | | DealIntegralRequest dealIntegralRequest = new DealIntegralRequest(); |
| | | dealIntegralRequest.setIntegralObjType(Constants.IntegralObjType.WITHDRAW_APPLY_BACK); |
| | | dealIntegralRequest.setIntegralNum(model.getAmount()); |
| | | dealIntegralRequest.setObjId(withdrawRecord.getId()); |
| | | dealIntegralRequest.setOrderCode(withdrawRecord.getCode().toString()); |
| | | dealIntegralRequest.setMemberId(model.getMemberId()); |
| | | dealIntegralRequest.setDealType(Constants.ZERO); |
| | | integralService.dealShopAmount(dealIntegralRequest); |
| | | } |
| | | } |
| | | |
| | | public void dealBatchMultiFiles(WithdrawRecord model, List<Multifile> fileList ) { |
| | | //清空原有的 |
| | | if(fileList!=null && fileList.size()>0){ |
| | |
| | | return; |
| | | } |
| | | for (WithdrawRecord withdrawRecord: withdrawRecords) { |
| | | this.updateById(withdrawRecord); |
| | | // this.updateById(withdrawRecord); |
| | | } |
| | | } |
| | | |