From 857a5b26e72193fa38d0ea884cf54d04cd2e1b0c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 4 Sep 2020 18:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E5=80=BC=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/datascope/aspect/DataScopeAspect.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java b/ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java index 0e5847a6..72aafcdd 100644 --- a/ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java +++ b/ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java @@ -81,11 +81,11 @@ public class DataScopeAspect } // 获取当前的用户 LoginUser loginUser = tokenService.getLoginUser(); - SysUser currentUser = loginUser.getSysUser(); - if (currentUser != null) + if (StringUtils.isNotNull(loginUser)) { + SysUser currentUser = loginUser.getSysUser(); // 如果是超级管理员,则不过滤数据 - if (!currentUser.isAdmin()) + if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) { dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias());