update 使用 satoken 自带的 BCrypt 工具 替换 Security 加密工具 减少依赖

This commit is contained in:
疯狂的狮子li
2022-02-11 15:04:25 +08:00
parent ef3b77f8a8
commit b12b98ab1c
9 changed files with 31 additions and 66 deletions

View File

@@ -118,4 +118,19 @@ public class LoginHelper {
return UserType.getUserType(loginId);
}
/**
* 是否为管理员
*
* @param userId 用户ID
* @return 结果
*/
public static boolean isAdmin(Long userId) {
return userId != null && 1L == userId;
}
public static boolean isAdmin() {
Long userId = getUserId();
return userId != null && 1L == userId;
}
}