|
@@ -13,6 +13,7 @@ import cn.com.qmth.examcloud.core.oe.student.bean.ExamStudentQuestionAnswerInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.bean.ExamStudentQuestionInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.ExamRecordQuestionTempRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamQuestionTempEntity;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.service.ExamControlService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordDataService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordQuestionsService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamingSessionService;
|
|
@@ -79,6 +80,9 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
@Autowired
|
|
|
private ExamRecordDataService examRecordDataService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamControlService examControlService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private CryptoFactory cryptoFactory;
|
|
|
|
|
@@ -294,7 +298,7 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void submitQuestionAnswer(Long studentId, List<ExamStudentQuestionInfo> examQuestionInfos, String referer, String agent) {
|
|
|
+ public void submitQuestionAnswer(Long studentId, List<ExamStudentQuestionInfo> examQuestionInfos, String referer, String agent, String ip) {
|
|
|
if (CollectionUtils.isEmpty(examQuestionInfos)) {
|
|
|
log.warn("submitQuestionAnswer is empty. studentId = {} ", studentId);
|
|
|
return;
|
|
@@ -346,7 +350,7 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void submitQuestionAnswerWithCrypto(ExamStudentQuestionAnswerInfo data, User user, String referer, String agent, String timestampStr) {
|
|
|
+ public void submitQuestionAnswerWithCrypto(ExamStudentQuestionAnswerInfo data, User user, String referer, String agent, String timestampStr, String ip) {
|
|
|
long timestamp;
|
|
|
try {
|
|
|
timestamp = CryptoHelper.parseTimestamp(timestampStr);
|
|
@@ -373,7 +377,7 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
|
|
|
List<ExamStudentQuestionInfo> answers = new JsonMapper().toList(data.getAnswers(), ExamStudentQuestionInfo.class);
|
|
|
|
|
|
- this.submitQuestionAnswer(user.getUserId(), answers, referer, agent);
|
|
|
+ this.submitQuestionAnswer(user.getUserId(), answers, referer, agent, ip);
|
|
|
}
|
|
|
|
|
|
@Override
|