From fe29db7a08e9da70ca3c78db27a11e48fa5f6f43 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 15 五月 2024 22:24:47 +0800
Subject: [PATCH] springboot静态文件配置。删除dist

---
 src/main/resources/mapper/QuestionMapper.xml |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/QuestionMapper.xml b/src/main/resources/mapper/QuestionMapper.xml
index 0764bb9..7acf77b 100644
--- a/src/main/resources/mapper/QuestionMapper.xml
+++ b/src/main/resources/mapper/QuestionMapper.xml
@@ -297,4 +297,40 @@
         </foreach>
     </select>
 
+    <select id="selectQuestion" resultType="com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM">
+        select a.id,
+               a.question_type,
+               JSON_VALUE(d.content, '$.titleContent') as shortTitle,
+               GROUP_CONCAT(c.name)                    as subjectName
+        from t_question a
+                 inner join t_question_subject b on a.id = b.question_id and b.deleted = 0
+                 inner join t_subject c on b.subject_id = c.id and c.deleted = 0
+                 inner join t_text_content d on a.info_text_content_id = d.id
+        where a.deleted = 0
+        group by a.id, question_type, a.create_time
+        HAVING GROUP_CONCAT(c.name) like concat('%', #{subjectName}, '%')
+        order by a.create_time
+    </select>
+
+    <select id="selectContentById" resultType="com.mindskip.xzs.domain.vo.QuestionVO">
+        SELECT
+            tq.id,
+            tq.question_type as questionType,
+            tq.difficult,
+            ttc.content as contentJson,
+            tq.correct
+        FROM
+            t_question tq
+            INNER JOIN t_text_content ttc ON tq.info_text_content_id = ttc.id AND tq.id = #{id}
+    </select>
+
+    <select id="getAnswer" resultType="com.mindskip.xzs.domain.vo.QuestionVO">
+        SELECT
+            tq.correct,
+            ttc.content as contentJson
+        FROM
+            t_question tq
+                INNER JOIN t_text_content ttc ON tq.info_text_content_id = ttc.id AND tq.id = #{id} AND tq.deleted = 0
+    </select>
+
 </mapper>

--
Gitblit v1.8.0