From 09d4d5630456136ae96ec97f9d6cfae6741a0557 Mon Sep 17 00:00:00 2001 From: yinli <1484667486@qq.com> Date: Tue, 22 Aug 2023 17:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/db/DataPermissionDatabaseInterceptor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/db/DataPermissionDatabaseInterceptor.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/db/DataPermissionDatabaseInterceptor.java index 95a1515ae..50485cb93 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/db/DataPermissionDatabaseInterceptor.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/db/DataPermissionDatabaseInterceptor.java @@ -507,6 +507,9 @@ public class DataPermissionDatabaseInterceptor extends JsqlParserSupport impleme // 单条规则的条件 String tableName = MyBatisUtils.getTableName(table); Expression oneExpress = rule.getExpression(tableName, table.getAlias()); + if(oneExpress == null){ + continue; + } // 拼接到 allExpression 中 allExpression = allExpression == null ? oneExpress : new AndExpression(allExpression, oneExpress);