xiangpei
2024-07-10 182c1cde1f4507d12eb4b6b1a4ffd24a2be6c93b
src/main/java/com/ycl/jxkg/job/StudyRecordJob.java
@@ -32,7 +32,7 @@
    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<>();
@@ -56,6 +56,7 @@
                    if (record.getStudentId().equals(cacheRecord.getStudentId())) {
                        cacheRecord.setId(record.getId());
                        cacheRecord.setStudyTime(record.getStudyTime() + cacheRecord.getStudyTime());
                        cacheRecord.setMeetCount(record.getMeetCount());
                    }
                }
            }