From 7516e99d816b7f1610e6cc73fed23fc3d8ede1e3 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 17 六月 2024 09:16:17 +0800
Subject: [PATCH] 随序试卷生成题目

---
 src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java b/src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java
index 4ceda84..9e6a0d2 100644
--- a/src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java
+++ b/src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java
@@ -5,8 +5,8 @@
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.ycl.jxkg.domain.entity.Question;
-import com.ycl.jxkg.domain.enums.QuestionTypeEnum;
-import com.ycl.jxkg.domain.enums.general.StatusEnum;
+import com.ycl.jxkg.enums.QuestionTypeEnum;
+import com.ycl.jxkg.enums.general.StatusEnum;
 import com.ycl.jxkg.domain.other.KeyValue;
 import com.ycl.jxkg.domain.question.QuestionItemObject;
 import com.ycl.jxkg.domain.question.QuestionObject;
@@ -18,6 +18,7 @@
 import com.ycl.jxkg.service.QuestionService;
 import com.ycl.jxkg.utils.DateTimeUtil;
 import com.ycl.jxkg.utils.ExamUtil;
+import com.ycl.jxkg.utils.HtmlUtil;
 import com.ycl.jxkg.utils.JsonUtil;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
@@ -60,6 +61,9 @@
         question.setDifficult(model.getDifficult());
         question.setContent(questionObject);
         question.setCreateUser(userId);
+        question.setTitle(HtmlUtil.clear(model.getTitle()));
+        question.setAudioFile(model.getAudioFile());
+        question.setOriginalFile(model.getOriginalFile());
         questionMapper.insert(question);
         return question;
     }
@@ -74,6 +78,9 @@
         //棰樺共銆佽В鏋愩�侀�夐」绛� 鏇存柊
         String questionObject = setQuestionInfoFromVM(model);
         question.setContent(questionObject);
+        question.setTitle(HtmlUtil.clear(model.getTitle()));
+        question.setAudioFile(model.getAudioFile());
+        question.setOriginalFile(model.getOriginalFile());
         questionMapper.updateById(question);
         return question;
     }

--
Gitblit v1.8.0