| | |
| | | package com.ruoyi.web.controller.tool; |
| | | |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TbBasicDataService; |
| | | import com.ruoyi.system.service.TbDataScreenConfigService; |
| | | import com.ruoyi.system.service.TbDataScreenScoreService; |
| | | import com.ruoyi.system.service.TbQuestionService; |
| | | import com.ruoyi.system.service.TbScoreService; |
| | | import com.ruoyi.system.vo.ScoreRankVO; |
| | | import com.ruoyi.web.controller.service.DepartmentRanking; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class TaskUtil { |
| | | |
| | | @Autowired |
| | | private ISysRoleService roleService; |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | private final RedisCache redisCache; |
| | | private final DepartmentRanking departmentRanking; |
| | | private final ISysUserService sysUserService; |
| | | private final TbBasicDataService tbBasicDataService; |
| | | private final TbDataScreenScoreService tbDataScreenScoreService; |
| | | private final TbDataScreenConfigService tbDataScreenConfigService; |
| | | private final TbQuestionService tbQuestionService; |
| | | private final TbScoreService tbScoreService; |
| | | |
| | | @Scheduled(fixedRate = 1000 * 60) |
| | | public void message() { |
| | |
| | | public void taskDayOne() { |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新排行榜数据 |
| | | */ |
| | | @Scheduled(cron = "0 0 1 * * ? ") |
| | | public void ranking() { |
| | | List<ScoreRankVO> list = tbScoreService.queryTotalScoreList(); |
| | | } |
| | | } |