From 03a9cd21c1589e98978dc7296bb7fb48f1dcd7fe Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期五, 17 五月 2024 16:13:45 +0800 Subject: [PATCH] feat:创建试卷时新增选择用户查询条件 --- src/main/resources/mapper/ExamPaperMapper.xml | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/ExamPaperMapper.xml b/src/main/resources/mapper/ExamPaperMapper.xml index f24b711..c04d6c7 100644 --- a/src/main/resources/mapper/ExamPaperMapper.xml +++ b/src/main/resources/mapper/ExamPaperMapper.xml @@ -449,4 +449,23 @@ order by create_time desc </select> + <select id="selectStudent" resultType="com.mindskip.xzs.domain.vo.UserVO" parameterType="com.mindskip.xzs.domain.vo.UserVO"> + SELECT + a.id, a.real_name + FROM + t_user a + left join t_user_tag b on a.id = b.user_id + left join t_user_department c on a.id = c.user_id + where + user_name != 'admin' + <if test="tagId != null and tagId != ''"> + and b.tag_id = #{tagId} + </if> + <if test="deptId != null and deptId != ''"> + and c.department_id = #{deptId} + </if> + group by a.id, a.real_name + order by a.id + </select> + </mapper> -- Gitblit v1.8.0