|
@@ -333,6 +333,23 @@ public class RealExamServiceImpl implements RealExamService {
|
|
|
record.setStatus(1);
|
|
record.setStatus(1);
|
|
|
examRecordMapper.updateById(record);
|
|
examRecordMapper.updateById(record);
|
|
|
|
|
|
|
|
|
|
+ // 同步写入做题记录表,使错题本能记录真题模考的错题
|
|
|
|
|
+ if (correctCount + wrongCount > 0) {
|
|
|
|
|
+ QuizUserRecord userRecord = QuizUserRecord.builder()
|
|
|
|
|
+ .userId(userId)
|
|
|
|
|
+ .subjectId(record.getSubjectId())
|
|
|
|
|
+ .answerType(3)
|
|
|
|
|
+ .totalCount(correctCount + wrongCount)
|
|
|
|
|
+ .correctCount(correctCount)
|
|
|
|
|
+ .wrongCount(wrongCount)
|
|
|
|
|
+ .answers(answerRecords)
|
|
|
|
|
+ .status(1)
|
|
|
|
|
+ .startTime(record.getStartTime())
|
|
|
|
|
+ .endTime(LocalDateTime.now())
|
|
|
|
|
+ .build();
|
|
|
|
|
+ userRecordMapper.insert(userRecord);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return SubmitExamVO.builder()
|
|
return SubmitExamVO.builder()
|
|
|
.recordId(record.getId())
|
|
.recordId(record.getId())
|
|
|
.totalScore(totalScore)
|
|
.totalScore(totalScore)
|