From 0a51f7d743ec0459726368fb65fc2af9813239f6 Mon Sep 17 00:00:00 2001 From: tzg Date: Wed, 2 Sep 2020 14:55:49 +0800 Subject: [PATCH] =?UTF-8?q?=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 --- .../main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 222888cf9..80c1fda0d 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -79,6 +79,9 @@ public class DataScopeAspect } // 获取当前的用户 LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); + if (loginUser == null) { + return; + } SysUser currentUser = loginUser.getUser(); if (currentUser != null) {