Browse Source

角色列表筛选

5 năm trước cách đây
mục cha
commit
832a6f6da5
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      cloud-model/src/main/resources/mapper/UserMapper.xml

+ 4 - 1
cloud-model/src/main/resources/mapper/UserMapper.xml

@@ -59,7 +59,10 @@
         LEFT JOIN tb_role r
         ON r.`id` = u.`role_type`
         <where>
-            u.parent_id = #{user.id}
+            u.id != #{user.id}
+            <if test="user.id != 1">
+                AND u.parent_id = #{user.id}
+            </if>
             <if test="flag==0 and keyName != '' and keyName !=null">
                AND u.username like concat('%',#{keyName},'%')
             </if>