build: v1.7.4 release (^.^)YYa!!

This commit is contained in:
开源海哥 2023-11-20 19:23:02 +08:00
parent 168ef02b27
commit 68ca05849b
17 changed files with 50 additions and 24 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -23,7 +23,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-core</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
<exclusions>
<exclusion>
<groupId>com.mybatis-flex</groupId>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -101,7 +101,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-annotation</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
<scope>compile</scope>
</dependency>

View File

@ -27,7 +27,7 @@ public class FlexConsts {
}
public static final String NAME = "MyBatis-Flex";
public static final String VERSION = "1.7.3";
public static final String VERSION = "1.7.4";
public static final String SQL = "$$sql";

View File

@ -768,8 +768,12 @@ public class FlexDefaultResultSetHandler extends DefaultResultSetHandler {
List<Object> constructorArgs, Constructor<?> constructor, boolean foundValues) throws SQLException {
for (int i = 0; i < constructor.getParameterTypes().length; i++) {
Class<?> parameterType = constructor.getParameterTypes()[i];
Parameter parameter = constructor.getParameters()[i];
String columnName = StringUtil.camelToUnderline(parameter.getName());
// https://github.com/mybatis-flex/mybatis-flex/pull/201
// Parameter parameter = constructor.getParameters()[i];
// String columnName = StringUtil.camelToUnderline(parameter.getName());
String columnName = rsw.getColumnNames().get(i);
TypeHandler<?> typeHandler = rsw.getTypeHandler(parameterType, columnName);
Object value = typeHandler.getResult(rsw.getResultSet(), columnName);
constructorArgTypes.add(parameterType);

View File

@ -26,6 +26,7 @@ import java.util.List;
import java.util.Objects;
import static com.mybatisflex.core.query.QueryMethods.bracket;
import static com.mybatisflex.core.query.QueryMethods.raw;
import static com.mybatisflex.coretest.table.AccountTableDef.ACCOUNT;
import static org.junit.Assert.assertEquals;
@ -203,6 +204,27 @@ public class DynamicConditionTest {
"OR `birthday` <= '2023-10-28 22:13:36'", printSql);
System.out.println(printSql);
QueryWrapper queryWrapper2 = QueryWrapper.create()
.select()
.from(ACCOUNT)
.where(ACCOUNT.IS_DELETE.eq(0))
.and(ACCOUNT.ID.ge("1").and(ACCOUNT.AGE.ge(18).or(ACCOUNT.USER_NAME.ge("zs"))))
.or(ACCOUNT.BIRTHDAY.le("2023-10-28 22:13:36"));
System.out.println(queryWrapper2.toSQL());
assertEquals(printSql,queryWrapper2.toSQL());
}
@Test
public void test12() {
QueryWrapper qw = QueryWrapper.create()
.select().from(ACCOUNT)
.where(ACCOUNT.IS_DELETE.eq(0))
.or(raw("1 = 1").or(ACCOUNT.ID.eq(123)));
System.out.println(qw.toSQL());
}
}

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.mybatis-flex</groupId>
<artifactId>parent</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<artifactId>mybatis-flex-dependencies</artifactId>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -22,7 +22,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-annotation</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</dependency>
</dependencies>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -23,7 +23,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-spring</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</dependency>
<dependency>
@ -104,7 +104,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-core</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</dependency>
</dependencies>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -22,7 +22,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-core</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</dependency>
<dependency>
@ -42,7 +42,7 @@
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-annotation</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>mybatis-flex-test</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -4,7 +4,7 @@
<parent>
<artifactId>mybatis-flex-test</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>mybatis-flex-test</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -4,7 +4,7 @@
<parent>
<artifactId>mybatis-flex-test</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>mybatis-flex-test</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>com.mybatis-flex</groupId>
<version>1.7.3</version>
<version>1.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>