From 86d5a1d19074b75eff9999fd99ae085487af43f7 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 17 二月 2022 10:31:52 +0800
Subject: [PATCH] update 更新 所有 oss 均支持 https 配置

---
 ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java b/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java
index aa18339..a152208 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java
@@ -118,4 +118,19 @@
         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;
+    }
+
 }

--
Gitblit v1.9.3