From db7ff10c4090564126bf78447fb038406812f321 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期二, 04 六月 2024 11:54:58 +0800 Subject: [PATCH] feat:题目查询、新增,内容直接存题目表 --- src/main/java/com/ycl/jxkg/service/impl/ExamPaperAnswerServiceImpl.java | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/service/impl/ExamPaperAnswerServiceImpl.java b/src/main/java/com/ycl/jxkg/service/impl/ExamPaperAnswerServiceImpl.java index 461d096..d5c93e7 100644 --- a/src/main/java/com/ycl/jxkg/service/impl/ExamPaperAnswerServiceImpl.java +++ b/src/main/java/com/ycl/jxkg/service/impl/ExamPaperAnswerServiceImpl.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.jxkg.domain.*; +import com.ycl.jxkg.domain.entity.*; import com.ycl.jxkg.domain.enums.ExamPaperAnswerStatusEnum; import com.ycl.jxkg.domain.enums.ExamPaperTypeEnum; import com.ycl.jxkg.domain.enums.QuestionTypeEnum; @@ -19,14 +20,13 @@ import com.ycl.jxkg.utils.DateTimeUtil; import com.ycl.jxkg.utils.ExamUtil; import com.ycl.jxkg.utils.JsonUtil; -import com.ycl.jxkg.vo.admin.paper.ExamPaperAnswerPageRequestVO; -import com.ycl.jxkg.vo.student.exam.ExamPaperSubmitItemVO; -import com.ycl.jxkg.vo.student.exam.ExamPaperSubmitVO; -import com.ycl.jxkg.vo.student.exampaper.ExamPaperAnswerPageVO; +import com.ycl.jxkg.domain.vo.admin.paper.ExamPaperAnswerPageRequestVO; +import com.ycl.jxkg.domain.vo.student.exam.ExamPaperSubmitItemVO; +import com.ycl.jxkg.domain.vo.student.exam.ExamPaperSubmitVO; +import com.ycl.jxkg.domain.vo.student.exampaper.ExamPaperAnswerPageVO; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.RequiredArgsConstructor; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -37,7 +37,7 @@ @Service @RequiredArgsConstructor -public class ExamPaperAnswerServiceImpl extends ServiceImpl<ExamPaperAnswerMapper ,ExamPaperAnswer> implements ExamPaperAnswerService { +public class ExamPaperAnswerServiceImpl extends ServiceImpl<ExamPaperAnswerMapper , ExamPaperAnswer> implements ExamPaperAnswerService { private final ExamPaperAnswerMapper examPaperAnswerMapper; private final ExamPaperMapper examPaperMapper; @@ -61,7 +61,7 @@ ExamPaper examPaper = examPaperMapper.selectById(examPaperSubmitVO.getId()); ExamPaperTypeEnum paperTypeEnum = ExamPaperTypeEnum.fromCode(examPaper.getPaperType()); //浠诲姟璇曞嵎鍙兘鍋氫竴娆� - if (paperTypeEnum == ExamPaperTypeEnum.Task) { + if (paperTypeEnum == ExamPaperTypeEnum.RandomOrder) { ExamPaperAnswer examPaperAnswer = examPaperAnswerMapper.getByPidUid(examPaperSubmitVO.getId(), user.getId()); if (null != examPaperAnswer) return null; @@ -118,7 +118,7 @@ ExamPaperTypeEnum examPaperTypeEnum = ExamPaperTypeEnum.fromCode(examPaperAnswer.getPaperType()); switch (examPaperTypeEnum) { - case Task: + case RandomOrder: //浠诲姟璇曞嵎鎵规敼瀹屾垚鍚庯紝闇�瑕佹洿鏂颁换鍔$殑鐘舵�� ExamPaper examPaper = examPaperMapper.selectById(examPaperAnswer.getExamPaperId()); Integer taskId = examPaper.getTaskExamId(); @@ -192,7 +192,7 @@ examPaperQuestionCustomerAnswer.setCreateTime(now); examPaperQuestionCustomerAnswer.setCreateUser(user.getId()); examPaperQuestionCustomerAnswer.setQuestionType(question.getQuestionType()); - examPaperQuestionCustomerAnswer.setQuestionTextContentId(question.getInfoTextContentId()); + examPaperQuestionCustomerAnswer.setQuestionContent(question.getContent()); if (null == customerQuestionAnswer) { examPaperQuestionCustomerAnswer.setCustomerScore(0); } else { -- Gitblit v1.8.0