update 统一框架所有主键id均使用雪花id
This commit is contained in:
@@ -145,7 +145,7 @@ public class SysMenu extends BaseEntity {
|
||||
}
|
||||
// 非外链并且是一级目录(类型为目录)
|
||||
if (Constants.TOP_PARENT_ID.equals(getParentId()) && SystemConstants.TYPE_DIR.equals(getMenuType())
|
||||
&& SystemConstants.NO_FRAME.equals(getIsFrame())) {
|
||||
&& SystemConstants.NO.equals(getIsFrame())) {
|
||||
routerPath = "/" + this.path;
|
||||
}
|
||||
// 非外链并且是一级目录(类型为菜单)
|
||||
@@ -174,14 +174,14 @@ public class SysMenu extends BaseEntity {
|
||||
* 是否为菜单内部跳转
|
||||
*/
|
||||
public boolean isMenuFrame() {
|
||||
return Constants.TOP_PARENT_ID.equals(getParentId()) && SystemConstants.TYPE_MENU.equals(menuType) && isFrame.equals(SystemConstants.NO_FRAME);
|
||||
return Constants.TOP_PARENT_ID.equals(getParentId()) && SystemConstants.TYPE_MENU.equals(menuType) && isFrame.equals(SystemConstants.NO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为内链组件
|
||||
*/
|
||||
public boolean isInnerLink() {
|
||||
return isFrame.equals(SystemConstants.NO_FRAME) && StringUtils.ishttp(path);
|
||||
return isFrame.equals(SystemConstants.NO) && StringUtils.ishttp(path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,7 +109,7 @@ public class SysUser extends BaseEntity {
|
||||
}
|
||||
|
||||
public boolean isSuperAdmin() {
|
||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.userId);
|
||||
return SystemConstants.SUPER_ADMIN_USER_ID.equals(this.userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ public class SysRoleBo implements Serializable {
|
||||
}
|
||||
|
||||
public boolean isSuperAdmin() {
|
||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.roleId);
|
||||
return SystemConstants.SUPER_ADMIN_ROLE_ID.equals(this.roleId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ public class SysUserBo implements Serializable {
|
||||
}
|
||||
|
||||
public boolean isSuperAdmin() {
|
||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.userId);
|
||||
return SystemConstants.SUPER_ADMIN_USER_ID.equals(this.userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class SysRoleVo implements Serializable {
|
||||
private boolean flag = false;
|
||||
|
||||
public boolean isSuperAdmin() {
|
||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.roleId);
|
||||
return SystemConstants.SUPER_ADMIN_ROLE_ID.equals(this.roleId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
||||
*/
|
||||
@Override
|
||||
public void checkRoleAllowed(SysRoleBo role) {
|
||||
if (ObjectUtil.isNotNull(role.getRoleId()) && LoginHelper.isSuperAdmin(role.getRoleId())) {
|
||||
if (ObjectUtil.isNotNull(role.getRoleId()) && SystemConstants.SUPER_ADMIN_ROLE_ID.equals(role.getRoleId())) {
|
||||
throw new ServiceException("不允许操作超级管理员角色");
|
||||
}
|
||||
String[] keys = new String[]{SystemConstants.SUPER_ADMIN_ROLE_KEY};
|
||||
|
||||
+1
-1
@@ -463,7 +463,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
|
||||
// 非超级管理员,禁止包含超级管理员角色
|
||||
if (!LoginHelper.isSuperAdmin(userId)) {
|
||||
roleList.remove(SystemConstants.SUPER_ADMIN_ID);
|
||||
roleList.remove(SystemConstants.SUPER_ADMIN_ROLE_ID);
|
||||
}
|
||||
|
||||
// 移除超管角色后若无剩余角色,说明仅选了超管角色且不允许分配,显式报错
|
||||
|
||||
Reference in New Issue
Block a user