From e42fbc536f2760f2fef430b1ad2917d580598278 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 05 六月 2024 16:04:55 +0800
Subject: [PATCH] feat:题目表移除分数字段、新增题目状态、条件多选

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

diff --git a/src/main/resources/mapper/QuestionMapper.xml b/src/main/resources/mapper/QuestionMapper.xml
index 7a5a642..8840a15 100644
--- a/src/main/resources/mapper/QuestionMapper.xml
+++ b/src/main/resources/mapper/QuestionMapper.xml
@@ -32,20 +32,20 @@
         LEFT JOIN t_subject ts ON tq.subject_id = ts.id
         LEFT JOIN t_user tu ON tq.create_user = tu.id
         <where>
-            and tq.deleted=0
-            <if test="id != null ">
-                and tq.id= #{id}
+            and tq.deleted = 0
+            <if test="id != null">
+                and tq.id = #{id}
             </if>
-            <if test="level != null ">
-                and tq.grade_level= #{level}
+            <if test="status != null">
+                and tq.status = #{status}
             </if>
-            <if test="subjectId != null ">
-                and tq.subject_id= #{subjectId}
+            <if test="subjectId != null and subjectId.size() > 0">
+                and tq.subject_id in <foreach collection="subjectId" item="item" separator="," open="(" close=")"> #{item} </foreach>
             </if>
-            <if test="questionType != null ">
-                and tq.question_type= #{questionType}
+            <if test="questionType != null and questionType.size() > 0">
+                and tq.question_type in <foreach collection="questionType" item="item" separator="," open="(" close=")"> #{item} </foreach>
             </if>
-            <if test="content != null">
+            <if test="content != null and content != ''">
                 and instr(tq.content, #{content})
             </if>
         </where>

--
Gitblit v1.8.0