日志查询,可查看的用户筛选排除超级管理员

This commit is contained in:
furongxin 2024-04-16 17:03:59 +08:00
parent a1ff6a8378
commit a8fe45eadb

View File

@ -64,7 +64,7 @@
SELECT
role.id, role.data_scope, role.data_scope_dept_ids
FROM
( SELECT role_id FROM system_role_menu a LEFT JOIN system_menu role ON a.menu_id = role.id WHERE role.permission = 'system:view-log:query' ) menu
( SELECT role_id FROM system_role_menu a LEFT JOIN system_menu role ON a.menu_id = role.id WHERE role.permission = 'system:view-log:query' AND a.role_id != 1 ) menu
LEFT JOIN system_role role on role.id = menu.role_id
) role_id ON u_role.role_id = role_id.id
WHERE u_role.deleted = 0