update 统一框架所有主键id均使用雪花id

This commit is contained in:
疯狂的狮子Li
2026-04-08 14:55:14 +08:00
parent a74eb4046f
commit cb7ce69bc0
27 changed files with 1721 additions and 1711 deletions

View File

@@ -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);
}
}

View File

@@ -93,7 +93,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);
}
/**

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -226,7 +226,7 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
*/
@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};

View File

@@ -479,7 +479,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
// 非超级管理员,禁止包含超级管理员角色
if (!LoginHelper.isSuperAdmin(userId)) {
roleList.remove(SystemConstants.SUPER_ADMIN_ID);
roleList.remove(SystemConstants.SUPER_ADMIN_ROLE_ID);
}
// 移除超管角色后若无剩余角色,说明仅选了超管角色且不允许分配,显式报错