From 7ef1b8aed9f16fcce231801410e53798900bb25b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 17 Jul 2019 20:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E4=B8=BA?= =?UTF-8?q?=E4=BB=85=E6=9C=AC=E4=BA=BA=E4=B8=94=E6=B2=A1=E6=9C=89userAlias?= =?UTF-8?q?=E5=88=AB=E5=90=8D=E4=B8=8D=E6=9F=A5=E8=AF=A2=E4=BB=BB=E4=BD=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= 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, 2 insertions(+), 1 deletion(-) 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 8f8872d5..977ed9e9 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 @@ -131,7 +131,8 @@ public class DataScopeAspect } else { - sqlString.append(StringUtils.format(" OR {}.dept_id IS NULL ", deptAlias)); + // 数据权限为仅本人且没有userAlias别名不查询任何数据 + sqlString.append(" OR 1=0 "); } } }