| | |
| | | private final StudyRecordMapper studyRecordMapper; |
| | | private final StudyRecordService studyRecordService; |
| | | |
| | | @Scheduled(fixedRate = 1200000) // 20分钟执行一次 |
| | | @Scheduled(fixedRate = 1200000) // 2分钟执行一次 |
| | | private void updateStudyRecord() { |
| | | log.info("开始存学习时长"); |
| | | List<StudyRecord> cacheList = new ArrayList<>(); |
| | |
| | | if (record.getStudentId().equals(cacheRecord.getStudentId())) { |
| | | cacheRecord.setId(record.getId()); |
| | | cacheRecord.setStudyTime(record.getStudyTime() + cacheRecord.getStudyTime()); |
| | | cacheRecord.setMeetCount(record.getMeetCount()); |
| | | } |
| | | } |
| | | } |