From 7f03c1aa378b33379cd15f035904888bbcbf8bac Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 17 五月 2024 20:30:17 +0800 Subject: [PATCH] 学员查询数据权限 --- src/main/resources/mapper/ExamPaperMapper.xml | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/ExamPaperMapper.xml b/src/main/resources/mapper/ExamPaperMapper.xml index c04d6c7..93ad348 100644 --- a/src/main/resources/mapper/ExamPaperMapper.xml +++ b/src/main/resources/mapper/ExamPaperMapper.xml @@ -461,8 +461,11 @@ <if test="tagId != null and tagId != ''"> and b.tag_id = #{tagId} </if> - <if test="deptId != null and deptId != ''"> - and c.department_id = #{deptId} + <if test="deptIds != null and deptIds.size > 0"> + and c.department_id in + <foreach collection="deptIds" open="(" separator="," close=")" item="deptId"> + #{deptId} + </foreach> </if> group by a.id, a.real_name order by a.id -- Gitblit v1.8.0