Ver Fonte

修改学生端答题业务接口,补全数据入库的业务代码

zhaosongshan há 7 meses atrás
pai
commit
d417967388

+ 1 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/ExamPaperAnswerService.java

@@ -22,7 +22,7 @@ public interface ExamPaperAnswerService extends BaseService<ExamPaperAnswer> {
     Page<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM);
 
     /**
-     * 计算试卷提交结果(不入库)
+     * 计算试卷提交结果
      *
      * @param examPaperSubmitVM
      * @param user

+ 2 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/impl/ExamPaperAnswerServiceImpl.java

@@ -93,11 +93,12 @@ public class ExamPaperAnswerServiceImpl extends BaseServiceImpl<ExamPaperAnswer>
                             return ExamPaperQuestionCustomerAnswerFromVM(question, customerQuestionAnswer, examPaper, q.getItemOrder(), user, now);
                         })
                 ).collect(Collectors.toList());
-
         ExamPaperAnswer examPaperAnswer = ExamPaperAnswerFromVM(examPaperSubmitVM, examPaper, examPaperQuestionCustomerAnswers, user, now);
         examPaperAnswerInfo.setExamPaper(examPaper);
         examPaperAnswerInfo.setExamPaperAnswer(examPaperAnswer);
         examPaperAnswerInfo.setExamPaperQuestionCustomerAnswers(examPaperQuestionCustomerAnswers);
+        examPaperQuestionCustomerAnswerService.insertList(examPaperQuestionCustomerAnswers);
+        examPaperAnswerMapper.insertSelective(examPaperAnswer);
         return examPaperAnswerInfo;
     }