From 943c48b801dcefd79d3c5d9088fcce8b73bb6f3b Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Thu, 16 Mar 2023 19:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8D=E9=99=90=E5=88=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=98=A0=E5=B0=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yulichang/interceptor/MPJInterceptor.java | 13 +- .../yulichang/wrapper/MPJLambdaWrapper.java | 6 +- .../wrapper/interfaces/QueryLabel.java | 31 ++- .../yulichang/wrapper/resultmap/Label.java | 16 ++ .../wrapper/resultmap/MybatisLabel.java | 42 ++- .../wrapper/resultmap/MybatisLabelFree.java | 245 ++++++++++++++++++ .../yulichang/wrapper/resultmap/Result.java | 13 +- .../wrapper/resultmap/ResultList.java | 21 ++ .../test/join/LambdaWrapperTest.java | 25 ++ 9 files changed, 389 insertions(+), 23 deletions(-) create mode 100644 mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/Label.java create mode 100644 mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabelFree.java create mode 100644 mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/ResultList.java diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java index de31730..f3e51eb 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java @@ -10,7 +10,7 @@ import com.github.yulichang.toolkit.Constant; import com.github.yulichang.toolkit.MPJReflectionKit; import com.github.yulichang.toolkit.TableHelper; import com.github.yulichang.wrapper.MPJLambdaWrapper; -import com.github.yulichang.wrapper.resultmap.MybatisLabel; +import com.github.yulichang.wrapper.resultmap.Label; import com.github.yulichang.wrapper.resultmap.Result; import com.github.yulichang.wrapper.segments.Select; import com.github.yulichang.wrapper.segments.SelectLabel; @@ -190,7 +190,7 @@ public class MPJInterceptor implements Interceptor { } if (wrapper.isResultMap()) { for (Object o : wrapper.getResultMapMybatisLabel()) { - MybatisLabel label = (MybatisLabel) o; + Label label = (Label) o; resultMappings.add(buildResult(ms, label, columnSet, columnList)); } } @@ -214,15 +214,13 @@ public class MPJInterceptor implements Interceptor { /** * @return 返回节点id */ - private ResultMapping buildResult(MappedStatement ms, MybatisLabel mybatisLabel, Set columnSet, + private ResultMapping buildResult(MappedStatement ms, Label mybatisLabel, Set columnSet, List