mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-03 11:05:58 +00:00
update 优化 角色权限支持仅本人权限查看 解决无法查看自己创建的角色问题
This commit is contained in:
@@ -19,7 +19,8 @@ import java.util.List;
|
||||
public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRole> {
|
||||
|
||||
@DataPermission({
|
||||
@DataColumn(key = "deptName", value = "d.dept_id")
|
||||
@DataColumn(key = "deptName", value = "d.dept_id"),
|
||||
@DataColumn(key = "userName", value = "us.user_id")
|
||||
})
|
||||
Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
|
||||
|
||||
@@ -30,7 +31,8 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
|
||||
* @return 角色数据集合信息
|
||||
*/
|
||||
@DataPermission({
|
||||
@DataColumn(key = "deptName", value = "d.dept_id")
|
||||
@DataColumn(key = "deptName", value = "d.dept_id"),
|
||||
@DataColumn(key = "userName", value = "us.user_id")
|
||||
})
|
||||
List<SysRole> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
|
||||
|
||||
|
@@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from sys_role r
|
||||
left join sys_user_role sur on sur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = sur.user_id
|
||||
left join sys_user us on us.user_name = r.create_by
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
|
Reference in New Issue
Block a user