SELECT b.displayName AS 一级目录, c.displayName as 二级目录, d.displayName as 报表名称, COALESCE(b.DESCRIPTION,c.DESCRIPTION,d.DESCRIPTION) 描述, '' 角色,'' 用户 FROM FINE_AUTHORITY a LEFT JOIN fine_authority_object b ON a.authorityentityid = b.parentid LEFT JOIN ( SELECT * FROM fine_authority_object WHERE expandtype IN ( 3, 102 ) ) c on b.id = c.parentid LEFT JOIN ( SELECT * FROM fine_authority_object WHERE expandtype =102 ) d on c.id = d.parentid WHERE a.authority = 2 -- /*允许的*/ AND b.expandtype IN ( 3, 102 ) -- /*目录和报表模板*/ ORDER BY b.sortindex,c.sortindex,d.sortindex; 这个是我目前写出来的,我现在还需要找到这个报表能看到的角色有哪些,然后这个角色里面是那些用户 |