| | |
| | | import com.gkhy.exam.system.mapper.ExResourceMapper; |
| | | import com.gkhy.exam.system.mapper.ExStudentStudyMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | /** |
| | | * 建议:每10秒执行一次 |
| | | */ |
| | | @Scheduled(cron = "*/10 * * * * ?") |
| | | public void progress(){ |
| | | Set<String> keys = redisUtils.keys(CacheConstant.STUDY_PROCESS_KEY + "*"); |
| | | if(ObjectUtil.isNotEmpty(keys)){ |