From 3446b38cbbe59150942f5b83740a1c71a1798b4a Mon Sep 17 00:00:00 2001
From: hewenqiang <1527468660@qq.com>
Date: 星期五, 18 二月 2022 16:18:38 +0800
Subject: [PATCH] update 修正 StringUtils.format() 注释错误问题

---
 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