update 优化 角色权限支持仅本人权限查看 解决无法查看自己创建的角色问题
This commit is contained in:
parent
b6daa886e0
commit
db0c882f1b
@ -19,7 +19,8 @@ import java.util.List;
|
|||||||
public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRole> {
|
public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRole> {
|
||||||
|
|
||||||
@DataPermission({
|
@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);
|
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 角色数据集合信息
|
* @return 角色数据集合信息
|
||||||
*/
|
*/
|
||||||
@DataPermission({
|
@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);
|
List<SysRole> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
from sys_role r
|
from sys_role r
|
||||||
left join sys_user_role sur on sur.role_id = r.role_id
|
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 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
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user