From 09f35cfbd5751bb4f8ba61ae9250eb187ccf206f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=B5=B7=E5=93=A5?= Date: Fri, 1 Sep 2023 11:13:54 +0800 Subject: [PATCH] build: v1.6.3 release (^.^)YYa!! --- mybatis-flex-annotation/pom.xml | 2 +- mybatis-flex-codegen/pom.xml | 2 +- mybatis-flex-core/pom.xml | 2 +- .../java/com/mybatisflex/core/FlexConsts.java | 2 +- .../core/mybatis/FlexResultSetHandler.java | 24 +++++++++---------- mybatis-flex-dependencies/pom.xml | 2 +- mybatis-flex-processor/pom.xml | 2 +- mybatis-flex-solon-plugin/pom.xml | 2 +- mybatis-flex-spring-boot-starter/pom.xml | 2 +- mybatis-flex-spring/pom.xml | 2 +- .../mybatis-flex-native-test/pom.xml | 2 +- .../mybatis-flex-seata-test/pom.xml | 2 +- .../mybatis-flex-spring-boot-test/pom.xml | 2 +- .../mybatis-flex-spring-cloud-test/pom.xml | 2 +- .../mybatis-flex-spring-test/pom.xml | 2 +- mybatis-flex-test/pom.xml | 2 +- 16 files changed, 26 insertions(+), 28 deletions(-) diff --git a/mybatis-flex-annotation/pom.xml b/mybatis-flex-annotation/pom.xml index 5c3f98db..06948455 100644 --- a/mybatis-flex-annotation/pom.xml +++ b/mybatis-flex-annotation/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-codegen/pom.xml b/mybatis-flex-codegen/pom.xml index 0e5110ea..59009e20 100644 --- a/mybatis-flex-codegen/pom.xml +++ b/mybatis-flex-codegen/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-core/pom.xml b/mybatis-flex-core/pom.xml index f91dd913..b8a67585 100644 --- a/mybatis-flex-core/pom.xml +++ b/mybatis-flex-core/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java index 4f71aca3..95ab3fcc 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java @@ -27,7 +27,7 @@ public class FlexConsts { } public static final String NAME = "MyBatis-Flex"; - public static final String VERSION = "1.6.2"; + public static final String VERSION = "1.6.3"; public static final String SQL = "$$sql"; diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/FlexResultSetHandler.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/FlexResultSetHandler.java index c04c4f17..f38c1c9a 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/FlexResultSetHandler.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/FlexResultSetHandler.java @@ -65,7 +65,7 @@ public class FlexResultSetHandler extends FlexDefaultResultSetHandler { /** * 修复当实体类中存在 List 或者 List 等自动映射出错的问题 * 本质问题应该出现 mybatis 判断有误 - * + *

* https://gitee.com/mybatis-flex/mybatis-flex/issues/I7XBQS * https://gitee.com/mybatis-flex/mybatis-flex/issues/I7X7G7 * @@ -78,27 +78,25 @@ public class FlexResultSetHandler extends FlexDefaultResultSetHandler { protected Object createPrimitiveResultObject(ResultSetWrapper rsw, ResultMap resultMap, String columnPrefix) throws SQLException { final Class resultType = resultMap.getType(); - final String columnName; - final TypeHandler typeHandler; if (!resultMap.getResultMappings().isEmpty()) { final List resultMappingList = resultMap.getResultMappings(); final ResultMapping mapping = resultMappingList.get(0); - columnName = prependPrefix(mapping.getColumn(), columnPrefix); - typeHandler = mapping.getTypeHandler(); - } else { - columnName = rsw.getColumnNames().get(0); - typeHandler = rsw.getTypeHandler(resultType, columnName); - } + String columnName = prependPrefix(mapping.getColumn(), columnPrefix); + TypeHandler typeHandler = mapping.getTypeHandler(); - List mappedColumnNames = rsw.getMappedColumnNames(resultMap, columnPrefix); - if (columnName != null && mappedColumnNames.contains(columnName.toUpperCase(Locale.ENGLISH))) { + List mappedColumnNames = rsw.getMappedColumnNames(resultMap, columnPrefix); + if (columnName != null && mappedColumnNames.contains(columnName.toUpperCase(Locale.ENGLISH))) { + return typeHandler.getResult(rsw.getResultSet(), columnName); + } + return null; + } else { + String columnName = rsw.getColumnNames().get(0); + TypeHandler typeHandler = rsw.getTypeHandler(resultType, columnName); return typeHandler.getResult(rsw.getResultSet(), columnName); } - return null; } - static class FlexCursor implements Cursor { private final Cursor originalCursor; diff --git a/mybatis-flex-dependencies/pom.xml b/mybatis-flex-dependencies/pom.xml index 970cf1bb..3912f554 100644 --- a/mybatis-flex-dependencies/pom.xml +++ b/mybatis-flex-dependencies/pom.xml @@ -6,7 +6,7 @@ com.mybatis-flex parent - 1.6.2 + 1.6.3 mybatis-flex-dependencies diff --git a/mybatis-flex-processor/pom.xml b/mybatis-flex-processor/pom.xml index 158191a7..b756568e 100644 --- a/mybatis-flex-processor/pom.xml +++ b/mybatis-flex-processor/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-solon-plugin/pom.xml b/mybatis-flex-solon-plugin/pom.xml index 8de2289c..693a71ea 100644 --- a/mybatis-flex-solon-plugin/pom.xml +++ b/mybatis-flex-solon-plugin/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-spring-boot-starter/pom.xml b/mybatis-flex-spring-boot-starter/pom.xml index c597e77d..27b60bf0 100644 --- a/mybatis-flex-spring-boot-starter/pom.xml +++ b/mybatis-flex-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-spring/pom.xml b/mybatis-flex-spring/pom.xml index 50eadb04..a5b85ebf 100644 --- a/mybatis-flex-spring/pom.xml +++ b/mybatis-flex-spring/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/mybatis-flex-native-test/pom.xml b/mybatis-flex-test/mybatis-flex-native-test/pom.xml index 6e39c6b2..1f70da52 100644 --- a/mybatis-flex-test/mybatis-flex-native-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-native-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/mybatis-flex-seata-test/pom.xml b/mybatis-flex-test/mybatis-flex-seata-test/pom.xml index 1f0ae0de..ccbc4bb6 100644 --- a/mybatis-flex-test/mybatis-flex-seata-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-seata-test/pom.xml @@ -4,7 +4,7 @@ mybatis-flex-test com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml b/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml index dd1509ad..7264cc4e 100644 --- a/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/mybatis-flex-spring-cloud-test/pom.xml b/mybatis-flex-test/mybatis-flex-spring-cloud-test/pom.xml index 8f974d6c..8b0ec54c 100644 --- a/mybatis-flex-test/mybatis-flex-spring-cloud-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-spring-cloud-test/pom.xml @@ -4,7 +4,7 @@ mybatis-flex-test com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/mybatis-flex-spring-test/pom.xml b/mybatis-flex-test/mybatis-flex-spring-test/pom.xml index 96e86028..7fb06957 100644 --- a/mybatis-flex-test/mybatis-flex-spring-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-spring-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0 diff --git a/mybatis-flex-test/pom.xml b/mybatis-flex-test/pom.xml index 1212d139..3e733f80 100644 --- a/mybatis-flex-test/pom.xml +++ b/mybatis-flex-test/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.6.2 + 1.6.3 4.0.0