select
a.realname,
a.username,
a.id,
b.roleid,/*权限id*/
c.name,
e.path,
e.displayname,
e.devicetype
from fine_user a
join fine_user_role_middle b on a.id=b.userid
join fine_custom_role c on b.roleid=c.id
join fine_authority d on b.roleid=d.roleid
and d.authority=2 /*允许的*/
and d.roletype=2/*自定义角色的*/
and d.authoritytype=1/*只要授权查看的*/
join fine_authority_object e on d.authorityentityid=e.parentid
where a.username='zhangshan'/*你要的人员名称*/
order by a.username,c.name
/*这个就是帆软的内置数据表。你得配置一个链接就行了*/
![1647396825384636.png image.png](/upload/wenda/20220316/1647396825384636.png)