wangliang 4 vuotta sitten
vanhempi
commit
19b42c5df3

+ 40 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/CacheService.java

@@ -154,4 +154,44 @@ public interface CacheService {
      * @param userId
      */
     public void removeUserRolePrivilegeCache(Long userId);
+
+    /**
+     * 删除考生个人报告缓存
+     *
+     * @param schoolId
+     * @param studentCode
+     * @param examId
+     * @param courseCode
+     */
+    public void removeExamStudentReportCache(Long schoolId, String studentCode, String examId, String courseCode);
+
+    /**
+     * 删除院长缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param collegeId
+     */
+    public void removeCollegeDeanCache(Long schoolId, String semester, Long examId, Long collegeId);
+
+    /**
+     * 删除学院学科缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param courseCode
+     */
+    public void removeCollegeCourseCache(Long schoolId, String semester, Long examId, String courseCode);
+
+    /**
+     * 删除开课课程考试总览图表缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param courseCode
+     */
+    public void removeSurveyTeacherViewCache(Long schoolId, String semester, Long examId, String courseCode);
 }

+ 56 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/CacheServiceImpl.java

@@ -251,4 +251,60 @@ public class CacheServiceImpl implements CacheService {
     public void removeUserRolePrivilegeCache(Long userId) {
 
     }
+
+    /**
+     * 删除考生个人报告缓存
+     *
+     * @param schoolId
+     * @param studentCode
+     * @param examId
+     * @param courseCode
+     */
+    @Override
+    @CacheEvict(value = SystemConstant.EXAM_STUDENT_REPORT, key = "#schoolId + '-' + #studentCode + '-' + #examId + '-' + #courseCode")
+    public void removeExamStudentReportCache(Long schoolId, String studentCode, String examId, String courseCode) {
+
+    }
+
+    /**
+     * 删除院长缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param collegeId
+     */
+    @Override
+    @CacheEvict(value = SystemConstant.COLLEGE_DEAN_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' +#collegeId")
+    public void removeCollegeDeanCache(Long schoolId, String semester, Long examId, Long collegeId) {
+
+    }
+
+    /**
+     * 删除学院学科缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param courseCode
+     */
+    @Override
+    @CacheEvict(value = SystemConstant.COLLEGE_COURSE_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode")
+    public void removeCollegeCourseCache(Long schoolId, String semester, Long examId, String courseCode) {
+
+    }
+
+    /**
+     * 删除开课课程考试总览图表缓存
+     *
+     * @param schoolId
+     * @param semester
+     * @param examId
+     * @param courseCode
+     */
+    @Override
+    @CacheEvict(value = SystemConstant.SURVEY_TEACHER_VIEW_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode")
+    public void removeSurveyTeacherViewCache(Long schoolId, String semester, Long examId, String courseCode) {
+
+    }
 }

+ 2 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -226,7 +226,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
      * @return
      */
     @Override
-    @Cacheable(value = SystemConstant.TEACHER_VIEW_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode + '-' + #collegeId + '-' + #teacherId")
+//    @Cacheable(value = SystemConstant.TEACHER_VIEW_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode + '-' + #collegeId + '-' + #teacherId")
     public DimensionAnalyzeResult surveyTeacherQuestionView(Long schoolId, SemesterEnum semester, Long examId, String courseCode, Long collegeId, Long teacherId) {
         return reportCommonService.findDimensionInfo(examId, courseCode, collegeId, teacherId);
     }
@@ -243,7 +243,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
      * @return
      */
     @Override
-    @Cacheable(value = SystemConstant.TEACHER_ANSWER_VIEW_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode + '-' + #collegeId + '-' + #teacherId")
+//    @Cacheable(value = SystemConstant.TEACHER_ANSWER_VIEW_REPORT, key = "#schoolId + '-' + #semester + '-' + #examId + '-' + #courseCode + '-' + #collegeId + '-' + #teacherId")
     public QuestionInfoResult surveyTeacherQuestionAnswerView(Long schoolId, SemesterEnum semester, Long examId, String courseCode, Long collegeId, Long teacherId) {
         return reportCommonService.findSituationOfQuestions(examId, courseCode, collegeId, teacherId);
     }