From 7457e3aa4f2e0f640a08b35f47de1eabd555d7bf Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 05 六月 2024 17:00:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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