1.修改系统用户查询接口,SysUserController-108行添加
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String account =sysUser.getUsername();
//登录用户不是超管,不显示超管账号
if(!account.equals("admin")){
queryWrapper.ne("username","admin");
}
2.修改角色查询接口,SysRoleController-98行添加
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String account =sysUser.getUsername();
//登录用户不是超管,不显示超管账号
if(!account.equals("admin")){
queryWrapper.ne("role_code","admin");
}
3.修改用户编辑角色查询接口,SysRoleController-208行添加
QueryWrapper queryWrapper = new QueryWrapper();
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String account =sysUser.getUsername();
//登录用户不是超管,不显示超管账号
if(!account.equals("admin")){
queryWrapper.ne("role_code","admin");
}
List<SysRole> list = sysRoleService.list(queryWrapper);
- THE END -
最后修改:2023年4月13日