From f1e20b08fcc05d78e3d25921494f92f5b9ca49cf Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 16 五月 2024 17:19:40 +0800
Subject: [PATCH] 部门管理员权限

---
 src/main/resources/mapper/QuestionMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/QuestionMapper.xml b/src/main/resources/mapper/QuestionMapper.xml
index 7cdd3b5..b47999b 100644
--- a/src/main/resources/mapper/QuestionMapper.xml
+++ b/src/main/resources/mapper/QuestionMapper.xml
@@ -192,7 +192,7 @@
             <if test="level != null ">
                 and q.grade_level= #{level}
             </if>
-            <if test="subjectId != null ">
+            <if test="subjectId != null and subjectId.length > 0">
                 and qs.subject_id in
                 <foreach item="subjectId" collection="subjectId" open="(" separator=","
                          close=")">
@@ -317,15 +317,17 @@
             tq.id,
             tq.question_type as questionType,
             tq.difficult,
-            ttc.content as contentJson
+            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="string">
+    <select id="getAnswer" resultType="com.mindskip.xzs.domain.vo.QuestionVO">
         SELECT
-            ttc.content
+            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

--
Gitblit v1.8.0