| | |
| | | private WithdrawDetailService withdrawDetailService; |
| | | |
| | | |
| | | /** |
| | | * 每隔一分钟去处理的定时任务 |
| | | */ |
| | | @Scheduled(fixedRate = 10000 * 60) |
| | | public void taskMinute(){ |
| | | try { |
| | | |
| | | List<WithdrawDetail> list = withdrawDetailService.lambdaQuery().ne(WithdrawDetail::getStatus, "SUCCESS").ne(WithdrawDetail::getStatus, "FAIL").list(); |
| | | |
| | | for (WithdrawDetail withdrawDetail : list) { |
| | | String s = GetTransferBatchByOutNo.checkStatus(withdrawDetail.getOutBatchNo()); |
| | | if (s.equals("SUCCESS")) { |
| | | withdrawDetail.setStatus("SUCCESS"); |
| | | withdrawDetailService.updateById(withdrawDetail); |
| | | //执行订单提现成功,增加提现成功金额 |
| | | //查询订单 |
| | | |
| | | //增加已提现金额 |
| | | |
| | | |
| | | } else if (s.equals("FAIL")) { |
| | | withdrawDetail.setStatus("FAIL"); |
| | | withdrawDetailService.updateById(withdrawDetail); |
| | | }else { |
| | | withdrawDetail.setStatus(s); |
| | | withdrawDetailService.updateById(withdrawDetail); |
| | | } |
| | | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // /** |
| | | // * 每隔一分钟去处理的定时任务 |
| | | // */ |
| | | // @Scheduled(fixedRate = 10000 * 60) |
| | | // public void taskMinute(){ |
| | | // try { |
| | | // |
| | | // List<WithdrawDetail> list = withdrawDetailService.lambdaQuery().ne(WithdrawDetail::getStatus, "SUCCESS").ne(WithdrawDetail::getStatus, "FAIL").list(); |
| | | // |
| | | // for (WithdrawDetail withdrawDetail : list) { |
| | | // String s = GetTransferBatchByOutNo.checkStatus(withdrawDetail.getOutBatchNo()); |
| | | // if (s.equals("SUCCESS")) { |
| | | // withdrawDetail.setStatus("SUCCESS"); |
| | | // withdrawDetailService.updateById(withdrawDetail); |
| | | // //执行订单提现成功,增加提现成功金额 |
| | | // //查询订单 |
| | | // |
| | | // //增加已提现金额 |
| | | // |
| | | // |
| | | // } else if (s.equals("FAIL")) { |
| | | // withdrawDetail.setStatus("FAIL"); |
| | | // withdrawDetailService.updateById(withdrawDetail); |
| | | // }else { |
| | | // withdrawDetail.setStatus(s); |
| | | // withdrawDetailService.updateById(withdrawDetail); |
| | | // } |
| | | // |
| | | // } |
| | | // |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | } |