|
@@ -311,13 +311,18 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
new ExamProcessRecordReport(examRecordData.getId(), ExamProcess.START, examRecordData.getEnterExamTime())
|
|
|
);
|
|
|
|
|
|
- StartExamInfo startExamInfo = buildStartExamInfo(examRecordData.getId(), examingSession, examBean, courseBean);
|
|
|
- return startExamInfo;
|
|
|
-
|
|
|
+ return buildStartExamInfo(examRecordData.getId(), examingSession, examBean, courseBean);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public StartAnswerInfo startAnswer(Long examRecordDataId) {
|
|
|
+ public StartAnswerInfo startAnswer(Long examRecordDataId, Long userId) {
|
|
|
+ Check.isNull(examRecordDataId, "examRecordDataId不能为空");
|
|
|
+ Check.isNull(userId, "userId不能为空");
|
|
|
+
|
|
|
+ String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + userId;
|
|
|
+ // 开始考试上锁,分布式锁,系统在请求结束后会,自动释放锁,无需手动解锁
|
|
|
+ SequenceLockHelper.getLock(sequenceLockKey);
|
|
|
+
|
|
|
Date now = new Date();
|
|
|
|
|
|
ExamRecordData examRecordData = examRecordDataService.getExamRecordDataCache(examRecordDataId);
|