ソースを参照

Merge remote-tracking branch 'origin/dev' into dev

wangliang 4 年 前
コミット
b8a02d9aa5

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

@@ -1,5 +1,16 @@
 package com.qmth.themis.business.service.impl;
 
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
@@ -8,16 +19,6 @@ import com.qmth.themis.business.dto.response.TEExamActivityDto;
 import com.qmth.themis.business.dto.response.TEExamActivityQueryDto;
 import com.qmth.themis.business.entity.TEExamActivity;
 import com.qmth.themis.business.service.TEExamActivityService;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.CachePut;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 /**
  * @Description: 考试场次 服务实现类
@@ -127,7 +128,6 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
      * @param examActivityId
      * @return
      */
-    @Async
     @Override
     @CachePut(value = "exam_activity", key = "#examActivityId", condition = "#result != null")
     public ExamActivityCacheBean updateExamActivityCacheBean(Long examActivityId) {
@@ -139,7 +139,6 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
      *
      * @param examActivityId
      */
-    @Async
     @Override
     @CacheEvict(value = "exam_activity", key = "#examActivityId")
     public void deleteExamActivityCacheBean(Long examActivityId) {

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

@@ -1,5 +1,17 @@
 package com.qmth.themis.business.service.impl;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.cache.bean.ExamCourseCacheBean;
@@ -10,17 +22,6 @@ import com.qmth.themis.business.entity.TEExamCourse;
 import com.qmth.themis.business.entity.TEExamPaper;
 import com.qmth.themis.business.service.TEExamCourseService;
 import com.qmth.themis.common.exception.BusinessException;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.CachePut;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 考试科目 服务实现类
@@ -80,7 +81,6 @@ public class TEExamCourseServiceImpl extends ServiceImpl<TEExamCourseMapper, TEE
      * @param courseCode
      * @return
      */
-    @Async
     @Override
     @CachePut(value = "exam_course", key = "#examId+'_'+#courseCode", condition = "#result != null")
     public ExamCourseCacheBean updateExamCourseCacheBean(Long examId, String courseCode) {
@@ -93,7 +93,6 @@ public class TEExamCourseServiceImpl extends ServiceImpl<TEExamCourseMapper, TEE
      * @param examId
      * @param courseCode
      */
-    @Async
     @Override
     @CacheEvict(value = "exam_course", key = "#examId+'_'+#courseCode")
     public void deleteExamCourseCacheBean(Long examId, String courseCode) {

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

@@ -12,7 +12,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -72,7 +71,6 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
      * @param paperId
      * @return
      */
-    @Async
     @Override
     @CachePut(value = "exam_paper", key = "#paperId", condition = "#result != null")
     public ExamPaperCacheBean updateExamPaperCacheBean(Long paperId) {
@@ -84,7 +82,6 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
      *
      * @param paperId
      */
-    @Async
     @Override
     @CacheEvict(value = "exam_paper", key = "#paperId")
     public void deleteExamPaperCacheBean(Long paperId) {
@@ -127,7 +124,6 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
      *
      * @param paperId
      */
-    @Async
     @Override
     @CacheEvict(value = "objective_answer", key = "#paperId")
     public void deleteObjectiveAnswerCacheBean(Long paperId) {

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

@@ -8,7 +8,6 @@ import javax.annotation.Resource;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -66,7 +65,6 @@ public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, T
      * @param examStudentId
      * @return
      */
-    @Async
     @Override
     @CachePut(value = "exam_student", key = "#examStudentId", condition = "#result != null")
     public ExamStudentCacheBean updateExamStudentCacheBean(Long examStudentId) {
@@ -78,7 +76,6 @@ public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, T
      *
      * @param examStudentId
      */
-    @Async
     @Override
     @CacheEvict(value = "exam_student", key = "#examStudentId")
     public void deleteExamStudentCacheBean(Long examStudentId) {