| | |
| | | package com.dsh.communityWorldCup.util; |
| | | |
| | | import com.dsh.communityWorldCup.service.IWorldCupService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | public class TaskUtil { |
| | | |
| | | @Autowired |
| | | private CompetitionService competitionService; |
| | | private IWorldCupService worldCupService; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute() { |
| | | try { |
| | | //定时修改赛事状态 |
| | | competitionService.taskSetStatus(); |
| | | worldCupService.taskUpdateStatus(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedRate = 60000) |
| | | public void money() { |
| | | try { |
| | | //定时修改赛事状态 |
| | | competitionService.moneyOut(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |