Pārlūkot izejas kodu

!172 修复 JSqlParser 版本升级引起的代码错误问题。
Merge pull request !172 from 你有医保你先上/3.0

青苗 3 gadi atpakaļ
vecāks
revīzija
df39d6d067

+ 2 - 2
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/handler/sharding/ShardingNodeExtractor.java

@@ -216,8 +216,8 @@ public class ShardingNodeExtractor extends TablesNamesFinder {
     @Override
     public void visit(InExpression inExpression) {
         inExpression.getLeftExpression().accept(this);
-        if (null != inExpression.getLeftItemsList()) {
-            inExpression.getLeftItemsList().accept(this);
+        if (null != inExpression.getLeftExpression()) {
+            inExpression.getLeftExpression().accept(this);
         }
         if (null != inExpression.getRightItemsList()) {
             inExpression.getRightItemsList().accept(this);

+ 2 - 2
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/TenantLineInnerInterceptor.java

@@ -94,7 +94,7 @@ public class TenantLineInnerInterceptor extends JsqlParserSupport implements Inn
             processPlainSelect((PlainSelect) selectBody);
         } else if (selectBody instanceof WithItem) {
             WithItem withItem = (WithItem) selectBody;
-            processSelectBody(withItem.getSelectBody());
+            processSelectBody(withItem.getSubSelect().getSelectBody());
         } else {
             SetOperationList operationList = (SetOperationList) selectBody;
             List<SelectBody> selectBodys = operationList.getSelects();
@@ -424,7 +424,7 @@ public class TenantLineInnerInterceptor extends JsqlParserSupport implements Inn
     @Override
     public void setProperties(Properties properties) {
         PropertyMapper.newInstance(properties)
-            .whenNotBlank("tenantLineHandler", ClassUtils::newInstance, this::setTenantLineHandler);
+                .whenNotBlank("tenantLineHandler", ClassUtils::newInstance, this::setTenantLineHandler);
     }
 }