|
@@ -15,15 +15,14 @@ import com.qmth.themis.business.dto.response.MonitorStreamDto;
|
|
|
import com.qmth.themis.business.dto.response.TEExamActivityDto;
|
|
|
import com.qmth.themis.business.dto.response.TEExamActivityQueryDto;
|
|
|
import com.qmth.themis.business.dto.response.TEExamActivityWaitDto;
|
|
|
-import com.qmth.themis.business.entity.TBUser;
|
|
|
-import com.qmth.themis.business.entity.TEAudio;
|
|
|
-import com.qmth.themis.business.entity.TEExam;
|
|
|
-import com.qmth.themis.business.entity.TEExamActivity;
|
|
|
+import com.qmth.themis.business.entity.*;
|
|
|
import com.qmth.themis.business.enums.*;
|
|
|
import com.qmth.themis.business.service.*;
|
|
|
import com.qmth.themis.business.util.*;
|
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.CachePut;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
@@ -48,6 +47,7 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Service
|
|
|
public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper, TEExamActivity> implements TEExamActivityService {
|
|
|
+ private final static Logger log = LoggerFactory.getLogger(TEExamActivityServiceImpl.class);
|
|
|
|
|
|
@Resource
|
|
|
private TEExamActivityMapper teExamActivityMapper;
|
|
@@ -76,6 +76,9 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
|
|
|
@Resource
|
|
|
TEAudioService teAudioService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TSLogService tsLogService;
|
|
|
+
|
|
|
/**
|
|
|
* 表是否存在
|
|
|
*
|
|
@@ -358,6 +361,14 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
|
|
|
if (count == 0) {
|
|
|
teAudioList.add(new TEAudio(tbUser.getOrgId(), s.getId(), 2L, AudioTypeEnum.AFTER.getTitle(), AudioTypeEnum.AFTER, AudioDefaultEnum.SYS, tbUser.getId(), SystemConstant.AFTER_AUDIO_SECOND));//考试结束前语音
|
|
|
}
|
|
|
+ TEExamActivity teExamActivityDb = this.getById(s.getId());
|
|
|
+ s.setCode(teExamActivityDb.getCode());
|
|
|
+ if (!s.equals(teExamActivityDb)) {//不一样则日志记录
|
|
|
+ tsLogService.save(new TSLog(LogEnum.EXAM_ACTIVITY, s.getCode(),
|
|
|
+ JacksonUtil.parseJson(teExamActivityDb),
|
|
|
+ JacksonUtil.parseJson(s),
|
|
|
+ tbUser.getId(), s.getId()));
|
|
|
+ }
|
|
|
} else {
|
|
|
s.setId(uidUtil.getId());
|
|
|
s.setCreateId(tbUser.getId());
|