SELECT
username as 用户名,
realname as 姓名,
e.name+'-'+f.name as 部门职务,
c.name 角色,
email as 邮箱,
mobile as 手机,
enable as 状态
FROM
PUBLIC.FINE_USER a
left join
PUBLIC.FINE_USER_ROLE_MIDDLE b on a.id = b.userId
left join
PUBLIC.FINE_CUSTOM_ROLE c on b. roleId = c.id
left join
PUBLIC.FINE_DEP_ROLE d on b.roleid=d.id
left join
PUBLIC.FINE_DEPARTMENT e on d.departmentid=e.id
left join
PUBLIC.FINE_POST f on d.postid=f.id