| | |
| | | public void moneyOut() throws AlipayApiException { |
| | | Date date = new Date(); |
| | | List<Competition> list = competitionService.list(new QueryWrapper<Competition>().lt("endTime",date).ne("isOut",1)); |
| | | List<Integer> coms = new ArrayList<>(); |
| | | for (Competition competition : list) { |
| | | coms.add(competition.getId()); |
| | | competition.setIsOut(1); |
| | | if(list.size() > 0){ |
| | | List<Integer> coms = new ArrayList<>(); |
| | | for (Competition competition : list) { |
| | | coms.add(competition.getId()); |
| | | competition.setIsOut(1); |
| | | } |
| | | List<PaymentCompetition> pays = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>().in("competitionId", coms)); |
| | | for (PaymentCompetition pay : pays) { |
| | | moneyOut(pay.getPayOrderNo(),pay.getPayOrderNo(),pay.getCode()); |
| | | } |
| | | competitionService.updateBatchById(list); |
| | | } |
| | | List<PaymentCompetition> pays = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>().in("competitionId", coms)); |
| | | for (PaymentCompetition pay : pays) { |
| | | moneyOut(pay.getPayOrderNo(),pay.getPayOrderNo(),pay.getCode()); |
| | | } |
| | | competitionService.updateBatchById(list); |
| | | |
| | | |
| | | } |