From 03f1e635215bdefd1b649a10675278567b5b8800 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 15 三月 2024 11:01:18 +0800 Subject: [PATCH] 试卷不返回答案,空指针修复 --- src/main/java/com/mindskip/xzs/controller/student/QuestionAnswerController.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mindskip/xzs/controller/student/QuestionAnswerController.java b/src/main/java/com/mindskip/xzs/controller/student/QuestionAnswerController.java index a703e38..8e13452 100644 --- a/src/main/java/com/mindskip/xzs/controller/student/QuestionAnswerController.java +++ b/src/main/java/com/mindskip/xzs/controller/student/QuestionAnswerController.java @@ -9,9 +9,11 @@ import com.mindskip.xzs.utility.HtmlUtil; import com.mindskip.xzs.utility.JsonUtil; import com.mindskip.xzs.utility.PageInfoHelper; +import com.mindskip.xzs.viewmodel.admin.question.ExamQuestionVO; import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM; import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM; import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVM; +import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVO; import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM; import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM; import com.github.pagehelper.PageInfo; @@ -67,11 +69,11 @@ @RequestMapping(value = "/select/{id}", method = RequestMethod.POST) - public RestResponse<QuestionAnswerVM> select(@PathVariable Integer id) { - QuestionAnswerVM vm = new QuestionAnswerVM(); + public RestResponse<QuestionAnswerVO> select(@PathVariable Integer id) { + QuestionAnswerVO vm = new QuestionAnswerVO(); ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer = examPaperQuestionCustomerAnswerService.selectById(id); ExamPaperSubmitItemVM questionAnswerVM = examPaperQuestionCustomerAnswerService.examPaperQuestionCustomerAnswerToVM(examPaperQuestionCustomerAnswer); - QuestionEditRequestVM questionVM = questionService.getQuestionEditRequestVM(examPaperQuestionCustomerAnswer.getQuestionId()); + ExamQuestionVO questionVM = questionService.getQuestionEditRequestVM(examPaperQuestionCustomerAnswer.getQuestionId()); vm.setQuestionVM(questionVM); vm.setQuestionAnswerVM(questionAnswerVM); return RestResponse.ok(vm); -- Gitblit v1.8.0