|
@@ -1,16 +1,5 @@
|
|
|
package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-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 org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
@@ -19,6 +8,15 @@ import com.qmth.themis.business.dto.response.RoomCodeQueryDto;
|
|
|
import com.qmth.themis.business.dto.response.TEExamStudentDto;
|
|
|
import com.qmth.themis.business.entity.TEExamStudent;
|
|
|
import com.qmth.themis.business.service.TEExamStudentService;
|
|
|
+import org.springframework.cache.annotation.CacheEvict;
|
|
|
+import org.springframework.cache.annotation.CachePut;
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description: 考生库 服务实现类
|
|
@@ -49,8 +47,8 @@ public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, T
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public IPage<TEExamStudentDto> examStudentQuery(IPage<Map> iPage, Long examId, Long activityId, String identity, String name, String roomCode, String courseCode, String grade, Integer enable, String classNo,Integer hasPhoto) {
|
|
|
- return teExamStudentMapper.examStudentQuery(iPage, examId, activityId, identity, name, roomCode, courseCode, grade, enable, classNo,hasPhoto);
|
|
|
+ public IPage<TEExamStudentDto> examStudentQuery(IPage<Map> iPage, Long examId, Long activityId, String identity, String name, String roomCode, String courseCode, String grade, Integer enable, String classNo, Integer hasPhoto) {
|
|
|
+ return teExamStudentMapper.examStudentQuery(iPage, examId, activityId, identity, name, roomCode, courseCode, grade, enable, classNo, hasPhoto);
|
|
|
}
|
|
|
|
|
|
@Cacheable(value = "exam_student", key = "#examStudentId", unless = "#result == null")
|
|
@@ -121,26 +119,27 @@ public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, T
|
|
|
ret.setCurrentRecordId(es.getCurrentRecordId());
|
|
|
ret.setIdentity(es.getIdentity());
|
|
|
ret.setName(es.getName());
|
|
|
+ ret.setEnable(es.getEnable());
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<TEExamStudentDto> examStudentList(Long examId, Long activityId, String identity, String name,
|
|
|
- String roomCode, String courseCode, String grade, Integer enable, String classNo, Integer hasPhoto) {
|
|
|
- return teExamStudentMapper.examStudentList(examId, activityId, identity, name, roomCode, courseCode, grade, enable, classNo,hasPhoto);
|
|
|
- }
|
|
|
-
|
|
|
- @Transactional
|
|
|
- @Override
|
|
|
- public void updateByMqMsg(Map<String, Object> param) {
|
|
|
- Long examStudentId=(Long)param.get("examStudentId");
|
|
|
- Integer alreadyExamCount=(Integer)param.get("alreadyExamCount");
|
|
|
- Long currentRecordId=(Long)param.get("currentRecordId");
|
|
|
- if(alreadyExamCount!=null) {
|
|
|
- teExamStudentMapper.updateAlreadyExamCount(examStudentId,alreadyExamCount);
|
|
|
+ @Override
|
|
|
+ public List<TEExamStudentDto> examStudentList(Long examId, Long activityId, String identity, String name,
|
|
|
+ String roomCode, String courseCode, String grade, Integer enable, String classNo, Integer hasPhoto) {
|
|
|
+ return teExamStudentMapper.examStudentList(examId, activityId, identity, name, roomCode, courseCode, grade, enable, classNo, hasPhoto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Transactional
|
|
|
+ @Override
|
|
|
+ public void updateByMqMsg(Map<String, Object> param) {
|
|
|
+ Long examStudentId = (Long) param.get("examStudentId");
|
|
|
+ Integer alreadyExamCount = (Integer) param.get("alreadyExamCount");
|
|
|
+ Long currentRecordId = (Long) param.get("currentRecordId");
|
|
|
+ if (alreadyExamCount != null) {
|
|
|
+ teExamStudentMapper.updateAlreadyExamCount(examStudentId, alreadyExamCount);
|
|
|
}
|
|
|
- if(currentRecordId!=null) {
|
|
|
- teExamStudentMapper.updateCurrentRecordId(examStudentId,currentRecordId);
|
|
|
+ if (currentRecordId != null) {
|
|
|
+ teExamStudentMapper.updateCurrentRecordId(examStudentId, currentRecordId);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|