From c46f49af9e766aed0ba583fce0efab98ebcdf76c Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 18 六月 2024 17:12:06 +0800
Subject: [PATCH] 管理员增加学生端权限

---
 src/main/java/com/ycl/jxkg/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java b/src/main/java/com/ycl/jxkg/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
index bad9048..d738ccf 100644
--- a/src/main/java/com/ycl/jxkg/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
+++ b/src/main/java/com/ycl/jxkg/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
@@ -1,21 +1,22 @@
 package com.ycl.jxkg.service.impl;
 
-import com.ycl.jxkg.domain.ExamPaperQuestionCustomerAnswer;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ycl.jxkg.domain.entity.ExamPaperQuestionCustomerAnswer;
 import com.ycl.jxkg.domain.other.ExamPaperAnswerUpdate;
 import com.ycl.jxkg.domain.other.KeyValue;
-import com.ycl.jxkg.domain.TextContent;
-import com.ycl.jxkg.domain.enums.QuestionTypeEnum;
+import com.ycl.jxkg.domain.entity.TextContent;
+import com.ycl.jxkg.enums.QuestionTypeEnum;
 import com.ycl.jxkg.mapper.ExamPaperQuestionCustomerAnswerMapper;
 import com.ycl.jxkg.service.ExamPaperQuestionCustomerAnswerService;
 import com.ycl.jxkg.service.TextContentService;
 import com.ycl.jxkg.utils.DateTimeUtil;
 import com.ycl.jxkg.utils.ExamUtil;
 import com.ycl.jxkg.utils.JsonUtil;
-import com.ycl.jxkg.vo.student.exam.ExamPaperSubmitItemVO;
-import com.ycl.jxkg.vo.student.question.answer.QuestionPageStudentRequestVO;
+import com.ycl.jxkg.domain.vo.student.exam.ExamPaperSubmitItemVO;
+import com.ycl.jxkg.domain.vo.student.question.answer.QuestionPageStudentRequestVO;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
@@ -23,17 +24,11 @@
 import java.util.stream.Collectors;
 
 @Service
-public class ExamPaperQuestionCustomerAnswerServiceImpl extends BaseServiceImpl<ExamPaperQuestionCustomerAnswer> implements ExamPaperQuestionCustomerAnswerService {
+@RequiredArgsConstructor
+public class ExamPaperQuestionCustomerAnswerServiceImpl extends ServiceImpl<ExamPaperQuestionCustomerAnswerMapper, ExamPaperQuestionCustomerAnswer> implements ExamPaperQuestionCustomerAnswerService {
 
     private final ExamPaperQuestionCustomerAnswerMapper examPaperQuestionCustomerAnswerMapper;
     private final TextContentService textContentService;
-
-    @Autowired
-    public ExamPaperQuestionCustomerAnswerServiceImpl(ExamPaperQuestionCustomerAnswerMapper examPaperQuestionCustomerAnswerMapper, TextContentService textContentService) {
-        super(examPaperQuestionCustomerAnswerMapper);
-        this.examPaperQuestionCustomerAnswerMapper = examPaperQuestionCustomerAnswerMapper;
-        this.textContentService = textContentService;
-    }
 
 
     @Override
@@ -97,13 +92,13 @@
                 examPaperSubmitItemVO.setContentArray(ExamUtil.contentToArray(examPaperQuestionCustomerAnswer.getAnswer()));
                 break;
             case GapFilling:
-                TextContent textContent = textContentService.selectById(examPaperQuestionCustomerAnswer.getTextContentId());
+                TextContent textContent = textContentService.getById(examPaperQuestionCustomerAnswer.getTextContentId());
                 List<String> correctAnswer = JsonUtil.toJsonListObject(textContent.getContent(), String.class);
                 examPaperSubmitItemVO.setContentArray(correctAnswer);
                 break;
             default:
                 if (QuestionTypeEnum.needSaveTextContent(examPaperQuestionCustomerAnswer.getQuestionType())) {
-                    TextContent content = textContentService.selectById(examPaperQuestionCustomerAnswer.getTextContentId());
+                    TextContent content = textContentService.getById(examPaperQuestionCustomerAnswer.getTextContentId());
                     examPaperSubmitItemVO.setContent(content.getContent());
                 } else {
                     examPaperSubmitItemVO.setContent(examPaperQuestionCustomerAnswer.getAnswer());

--
Gitblit v1.8.0