USE ywm_ssm;
根据id 查询该角色的权限id |
select r.roleid,r.rolename, rp.perms_id from t_roles r left join t_roles_perms rp on r.roleid = rp.role_id where r.roleid=1 |
|
查所有角色的权限 |
select r.roleid,r.rolename, rp.perms_id,p.perms_code,p.perms_name from t_roles r left join t_roles_perms rp on r.roleid = rp.role_id left join t_perms p on rp.perms_id = p.perms_id |
|
根据id查某个角色的权限 |
select r.roleid,r.rolename, rp.perms_id,p.perms_code,p.perms_name from t_roles r left join t_roles_perms rp on r.roleid = rp.role_id left join t_perms p on rp.perms_id = p.perms_id where r.roleid=1 |
|