wangliang 2 жил өмнө
parent
commit
b3c3ac3beb

+ 4 - 4
themis-admin/src/main/java/com/qmth/themis/admin/api/TBOrgController.java

@@ -91,8 +91,8 @@ public class TBOrgController {
                 tbOrg.setUpdateId(tbUser.getId());
             }
             tbOrgService.saveOrUpdate(tbOrg);
-            cacheService.removeOrgCache(tbOrg.getId());
-            cacheService.removeOrgCodeCache(tbOrg.getCode());
+            cacheService.updateOrgCache(tbOrg.getId());
+            cacheService.updateOrgCodeCache(tbOrg.getCode());
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof DuplicateKeyException) {
@@ -131,8 +131,8 @@ public class TBOrgController {
         //保存机构
         tbOrg.setEnable(enable);
         tbOrgService.updateById(tbOrg);
-        cacheService.removeOrgCache(orgId);
-        cacheService.removeOrgCodeCache(tbOrg.getCode());
+        cacheService.updateOrgCache(orgId);
+        cacheService.updateOrgCodeCache(tbOrg.getCode());
         return ResultUtil.ok(true);
     }
 }

+ 3 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java

@@ -229,7 +229,7 @@ public class TEExamController {
                     teExamActivity.setUpdateId(tbUser.getId());
                 }
                 teExamActivityService.saveOrUpdate(teExamActivity);
-                teExamActivityService.deleteExamActivityCacheBean(teExamActivity.getId());
+                teExamActivityService.updateExamActivityCacheBean(teExamActivity.getId());
             }
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
@@ -253,7 +253,7 @@ public class TEExamController {
                 throw new RuntimeException(e);
             }
         }
-        teExamService.deleteExamCacheBean(teExam.getId());
+        teExamService.updateExamCacheBean(teExam.getId());
         examPaperService.disposeObjectiveAnswer(teExam.getId());
         return ResultUtil.ok(true);
     }
@@ -334,7 +334,7 @@ public class TEExamController {
         teExam.setEnable(enable);
         teExam.setUpdateId(tbUser.getId());
         teExamService.updateById(teExam);
-        teExamService.deleteExamCacheBean(teExam.getId());
+        teExamService.updateExamCacheBean(teExam.getId());
         return ResultUtil.ok(true);
     }
 

+ 1 - 1
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamCourseController.java

@@ -70,7 +70,7 @@ public class TEExamCourseController {
                 throw new RuntimeException(e);
             }
         }
-        teExamCourseService.deleteExamCourseCacheBean(teExamCourse.getExamId(), teExamCourse.getCourseCode());
+        teExamCourseService.updateExamCourseCacheBean(teExamCourse.getExamId(), teExamCourse.getCourseCode());
         return ResultUtil.ok(true);
     }
 

+ 2 - 2
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamPaperController.java

@@ -113,9 +113,9 @@ public class TEExamPaperController {
             }
         }
         teExamPaperList.forEach(s -> {
-            teExamPaperService.deleteExamPaperCacheBean(s.getId());
+            teExamPaperService.updateExamPaperCacheBean(s.getId());
             ExamPaperCacheBean paper = teExamPaperService.getExamPaperCacheBean(s.getId());
-            examCourseService.deleteExamCourseCacheBean(paper.getExamId(), paper.getCourseCode());
+            examCourseService.updateExamCourseCacheBean(paper.getExamId(), paper.getCourseCode());
         });
         return ResultUtil.ok(true);
     }

+ 2 - 2
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamReexamController.java

@@ -152,7 +152,7 @@ public class TEExamReexamController {
                             teExamStudentUpdateWrapper.lambda().set(TEExamStudent::getAlreadyExamCount, alreadyExamCount)
                                     .eq(TEExamStudent::getId, s);
                             teExamStudentService.update(teExamStudentUpdateWrapper);
-                            teExamStudentService.deleteExamStudentCacheBean(s);
+                            teExamStudentService.updateExamStudentCacheBean(s);
                         }
                     }
                 });
@@ -214,7 +214,7 @@ public class TEExamReexamController {
                                             teExamStudentUpdateWrapper.lambda().set(TEExamStudent::getAlreadyExamCount, alreadyExamCount)
                                                     .eq(TEExamStudent::getId, teExamReexam.getExamStudentId());
                                             teExamStudentService.update(teExamStudentUpdateWrapper);
-                                            teExamStudentService.deleteExamStudentCacheBean(teExamReexam.getExamStudentId());
+                                            teExamStudentService.updateExamStudentCacheBean(teExamReexam.getExamStudentId());
                                         }
                                     }
                                 }

+ 2 - 2
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamStudentController.java

@@ -231,7 +231,7 @@ public class TEExamStudentController {
         }
         teExamStudentService.updateBatchById(teExamStudentList);
         teExamStudentList.forEach(s -> {
-            teExamStudentService.deleteExamStudentCacheBean(s.getId());
+            teExamStudentService.updateExamStudentCacheBean(s.getId());
         });
         return ResultUtil.ok(true);
     }
@@ -304,7 +304,7 @@ public class TEExamStudentController {
             teExamStudentService.saveOrUpdate(s);
         });
         for (TEExamStudent es : teExamStudentList) {
-            teExamStudentService.deleteExamStudentCacheBean(es.getId());
+            teExamStudentService.updateExamStudentCacheBean(es.getId());
         }
         return ResultUtil.ok(true);
     }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamActivityServiceImpl.java

@@ -413,7 +413,7 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
             teExamActivityService.saveOrUpdateBatch(teExamActivityList);
 
             for (TEExamActivity ac : teExamActivityList) {
-                teExamActivityService.deleteExamActivityCacheBean(ac.getId());
+                teExamActivityService.updateExamActivityCacheBean(ac.getId());
             }
 
             if (!CollectionUtils.isEmpty(teAudioList)) {

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -1504,7 +1504,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
             TEExamService examService = SpringContextHolder.getBean(TEExamService.class);
             teExamMapper.updateScoreStatus(ScoreStatusEnum.CALCULATING, examId);
             teExamMapper.updateScoreProgress(0.0, examId);
-            examService.deleteExamCacheBean(examId);
+            examService.updateExamCacheBean(examId);
             task = tbTaskHistoryService.getById(taskId);
             task.setStatus(TaskStatusEnum.RUNNING);
             tbTaskHistoryService.saveOrUpdate(task);
@@ -1533,7 +1533,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
             }
             teExamMapper.updateScoreStatus(ScoreStatusEnum.FINISH, examId);
             teExamMapper.updateScoreProgress(100.0, examId);
-            examService.deleteExamCacheBean(examId);
+            examService.updateExamCacheBean(examId);
             task.setSummary("处理成功");
             task.setProgress(100.0);
             task.setStatus(TaskStatusEnum.FINISH);

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java

@@ -209,7 +209,7 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
         teExamPaperService.disposePaperCacheOnPaperImport(teExam.getId(), paperIds);
 
         //清除考试科目缓存
-        teExamCourseService.deleteExamCourseCacheBean(teExam.getId(), courseCode);
+        teExamCourseService.updateExamCourseCacheBean(teExam.getId(), courseCode);
     }
 
     private Map<Long, Double> paperWeight(List<TEExamPaper> list) {