From f7196dff53805c9d5e6c945e5334ce4e4423d779 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 15 三月 2024 18:02:23 +0800
Subject: [PATCH] 题目导入模板,待完善
---
src/main/resources/mapper/QuestionMapper.xml | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/QuestionMapper.xml b/src/main/resources/mapper/QuestionMapper.xml
index 32bd2f8..ba39eaa 100644
--- a/src/main/resources/mapper/QuestionMapper.xml
+++ b/src/main/resources/mapper/QuestionMapper.xml
@@ -183,6 +183,7 @@
q.*
FROM t_question q
LEFT JOIN t_question_subject qs on q.id = qs.question_id
+ LEFT JOIN t_text_content t on q.info_text_content_id = t.id
<where>
and q.deleted=0 and qs.deleted = 0
<if test="id != null ">
@@ -192,13 +193,17 @@
and q.grade_level= #{level}
</if>
<if test="subjectId != null ">
- and qs.subject_id =
+ and qs.subject_id in
+ <foreach item="subjectId" collection="subjectId" open="(" separator=","
+ close=")">
#{subjectId}
-
-
+ </foreach>
</if>
<if test="questionType != null ">
and q.question_type= #{questionType}
+ </if>
+ <if test="questionName != null and questionName != ''">
+ and t.content->'$."titleContent"' LIKE concat('%',#{questionName},'%')
</if>
<if test="content != null">
and q.info_text_content_id in (SELECT id FROM t_text_content WHERE content like concat('%',#{content},'%') )
@@ -233,4 +238,8 @@
GROUP BY create_time
</select>
+ <select id="getAll" resultMap="BaseResultMap">
+ SELECT <include refid="Base_Column_List"/>
+ from t_question where deleted=0
+ </select>
</mapper>
--
Gitblit v1.8.0