管理员用户&角色不允许操作

This commit is contained in:
RuoYi
2019-10-03 09:45:41 +08:00
parent ac97d15a7f
commit 661b6fe5d5
11 changed files with 82 additions and 18 deletions

View File

@ -52,6 +52,16 @@ public class SysRole extends BaseEntity
/** 部门组(数据权限) */
private Long[] deptIds;
public SysRole()
{
}
public SysRole(Long roleId)
{
this.roleId = roleId;
}
public Long getRoleId()
{
return roleId;
@ -62,6 +72,16 @@ public class SysRole extends BaseEntity
this.roleId = roleId;
}
public boolean isAdmin()
{
return isAdmin(this.roleId);
}
public static boolean isAdmin(Long roleId)
{
return roleId != null && 1L == roleId;
}
public String getDataScope()
{
return dataScope;

View File

@ -93,6 +93,16 @@ public class SysUser extends BaseEntity
/** 岗位组 */
private Long[] postIds;
public SysUser()
{
}
public SysUser(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;