mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08: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 @@
 | 
			
		||||
        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