mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 优化 框架代码书写格式
This commit is contained in:
@ -131,8 +131,8 @@ public interface UserConstants {
|
||||
int PASSWORD_MAX_LENGTH = 20;
|
||||
|
||||
/**
|
||||
* 管理员ID
|
||||
* 超级管理员ID
|
||||
*/
|
||||
Long ADMIN_ID = 1L;
|
||||
Long SUPER_ADMIN_ID = 1L;
|
||||
|
||||
}
|
||||
|
@ -14,11 +14,11 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 登录鉴权助手
|
||||
*
|
||||
* <p>
|
||||
* user_type 为 用户类型 同一个用户表 可以有多种用户类型 例如 pc,app
|
||||
* deivce 为 设备类型 同一个用户类型 可以有 多种设备类型 例如 web,ios
|
||||
* 可以组成 用户类型与设备类型多对多的 权限灵活控制
|
||||
*
|
||||
* <p>
|
||||
* 多用户体系 针对 多种用户类型 但权限控制不一致
|
||||
* 可以组成 多用户类型表与多设备类型 分别控制权限
|
||||
*
|
||||
@ -125,7 +125,7 @@ public class LoginHelper {
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isAdmin(Long userId) {
|
||||
return UserConstants.ADMIN_ID.equals(userId);
|
||||
return UserConstants.SUPER_ADMIN_ID.equals(userId);
|
||||
}
|
||||
|
||||
public static boolean isAdmin() {
|
||||
|
Reference in New Issue
Block a user