| | |
| | | @Autowired |
| | | private TicketBlackService ticketBlackService; |
| | | |
| | | @Scheduled(cron = "0 0/40 * * * ?") |
| | | //@Scheduled(cron = "0 0/40 * * * ?") |
| | | public void execute() throws IOException { |
| | | System.out.println("开始定时任务-------》"); |
| | | List<TicketBlack> list = ticketBlackService.updateType(); |
| | | if(list.size() > 0){ |
| | | for(TicketBlack t:list){ |
| | | t.setBlackType(1); |
| | | ticketBlackService.saveOrUpdate(t); |
| | | } |
| | | } |
| | | // List<TicketBlack> list = ticketBlackService.updateType(); |
| | | // if(list.size() > 0){ |
| | | // for(TicketBlack t:list){ |
| | | // t.setBlackType(1); |
| | | // ticketBlackService.saveOrUpdate(t); |
| | | // } |
| | | // } |
| | | Statistic statistic = null; |
| | | List<Statistic> all = statisticService.list(); |
| | | if(all.size()>0){ |