From 304a91f9eb9bb34996f84ba7278b109c6cf842eb Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 28 十一月 2023 21:27:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/resources/mapper/ExamTemplatesMapper.xml | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/resources/mapper/ExamTemplatesMapper.xml b/src/main/resources/mapper/ExamTemplatesMapper.xml index 0933165..c6a450a 100644 --- a/src/main/resources/mapper/ExamTemplatesMapper.xml +++ b/src/main/resources/mapper/ExamTemplatesMapper.xml @@ -32,17 +32,20 @@ <select id="gets" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.domain.vo.ExamTemplatesVO"> select - <include refid="Base_Column_List"/> - from t_exam_templates - where - <choose> - <when test="status != null"> - status = 0 - </when> - <otherwise> - status is null - </otherwise> - </choose> + e.* + from t_exam_templates e + inner join t_exam_templates_user u on e.id = u.templates_id + <where> + <if test="status != null"> + and e.status = 0 + </if> + <if test="status == null"> + and e.status is null + </if> + <if test="userId != null"> + and u.user_id = #{userId} + </if> + </where> </select> <select id="getById" resultMap="BaseResultMap"> -- Gitblit v1.8.0