From 5b7c787b31e7119d09266819e12c7ad6a1eb7cf7 Mon Sep 17 00:00:00 2001 From: JackyTang Date: Thu, 20 Apr 2023 10:49:29 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BD=BF=E7=94=A8instanceof=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=8C=B9=E9=85=8D,=20=E5=87=8F=E5=B0=91=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/interceptor/PlusDataPermissionInterceptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlusDataPermissionInterceptor.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlusDataPermissionInterceptor.java index e49c95b9..b7a6ae78 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlusDataPermissionInterceptor.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlusDataPermissionInterceptor.java @@ -66,8 +66,8 @@ public class PlusDataPermissionInterceptor extends JsqlParserSupport implements @Override protected void processSelect(Select select, int index, String sql, Object obj) { SelectBody selectBody = select.getSelectBody(); - if (selectBody instanceof PlainSelect) { - this.setWhere((PlainSelect) selectBody, (String) obj); + if (selectBody instanceof PlainSelect plainSelect) { + this.setWhere(plainSelect, (String) obj); } else if (selectBody instanceof SetOperationList setOperationList) { List selectBodyList = setOperationList.getSelects(); selectBodyList.forEach(s -> this.setWhere((PlainSelect) s, (String) obj));