Ver Fonte

字段修改

wangliang há 4 anos atrás
pai
commit
3df639611a

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamStudentController.java

@@ -121,7 +121,7 @@ public class TEExamStudentController {
         if (Objects.isNull(teExamStudentList) || teExamStudentList.size() == 0) {
             throw new BusinessException(ExceptionResultEnum.EXAM_STUDENT_INFO_IS_NULL);
         }
-        teExamStudentService.updateBatchById(teExamStudentList);
+        teExamStudentService.saveOrUpdateBatch(teExamStudentList);
         teExamStudentList.forEach(s -> {
             teExamStudentService.updateExamStudentCacheBean(s.getId());
         });

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

@@ -126,7 +126,7 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
      * @return
      */
     @Override
-    @CachePut(value = "exam_activity", key = "#examActivityId", unless = "#result == null")
+    @CachePut(value = "exam_activity", key = "#examActivityId", condition = "#result != null")
     public ExamActivityCacheBean updateExamActivityCacheBean(Long examActivityId) {
         return cacheOperation(examActivityId);
     }

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

@@ -78,7 +78,7 @@ public class TEExamCourseServiceImpl extends ServiceImpl<TEExamCourseMapper, TEE
      * @return
      */
     @Override
-    @CachePut(value = "exam_course", key = "#examId+'_'+#courseCode", unless = "#result == null")
+    @CachePut(value = "exam_course", key = "#examId+'_'+#courseCode", condition = "#result != null")
     public ExamCourseCacheBean updateExamCourseCacheBean(Long examId, String courseCode) {
         return cacheOperation(examId, courseCode);
     }

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

@@ -69,7 +69,7 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
      * @return
      */
     @Override
-    @CachePut(value = "exam_paper", key = "#paperId", unless = "#result == null")
+    @CachePut(value = "exam_paper", key = "#paperId", condition = "#result != null")
     public ExamPaperCacheBean updateExamPaperCacheBean(Long paperId) {
         return cacheOperation(paperId);
     }

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

@@ -674,7 +674,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
      * @return
      */
     @Override
-    @CachePut(value = "exam", key = "#examId", unless = "#result == null")
+    @CachePut(value = "exam", key = "#examId", condition = "#result != null")
     public ExamCacheBean updateExamCacheBean(Long examId) {
         return cacheOperation(examId);
     }

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

@@ -60,7 +60,7 @@ public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, T
      * @return
      */
     @Override
-    @CachePut(value = "exam_student", key = "#examStudentId", unless = "#result == null")
+    @CachePut(value = "exam_student", key = "#examStudentId", condition = "#result != null")
     public ExamStudentCacheBean updateExamStudentCacheBean(Long examStudentId) {
         return cacheOperation(examStudentId);
     }