diff --git a/README.md b/README.md
index a0b2b6b..d08e17e 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ mpp的lambda方式(1.7.0中使用@com.MPP@col)
com.github.jeffreyning
mybatisplus-plus
- 1.7.3-RELEASE
+ 1.7.4-RELEASE
````
@@ -386,6 +386,9 @@ _启动时日志中有mpp.entityBasePath is null skip scan result map_
_提示java.lang.RuntimeException: not found column for 'xxx'_
是由于设置了@MppMultiId的字段没有同时设置@TableField(value = "xxx")导致的
+_使用@UpdateFill和@InsertFill自动填充时报错提示Cause: java.lang.IllegalArgumentException: argument type mismatch_
+由于对某些entity中的字段类型没有做转换如LocalDateTime导致自动填充的sql的返回值类型与entity字段类型不相符,mpp1.7.4版本已经解决了此问题,旧版本需修改entity字段类型与sql返回类型一致。
+
_如何整合pagehelper插件_
mybatisplus本身有分页常见,如果一定要使用pagehelper插件的话,与原生的mybatisplus有冲突
@@ -403,9 +406,12 @@ mybatisplus本身有分页常见,如果一定要使用pagehelper插件的话
```
**版本说明**
+mybatisplus-plus1.7.4优化自动填充时的字段类型转换功能
+mybatisplus-plus1.7.3兼容mybatisplus3.5.1+
mybatisplus-plus1.7.2支持mpp的多主键@MppMultiId可以和mp的单主键@TableId兼容,同时修饰同一个field
mybatisplus-plus1.7.1支持继承多主键entity
+
**兼容性说明**
mybatisplus-plus1.5.0兼容mybatisplus3.3.1(mybatis3.5.3)到最新版mybatisplus3.4.2(mybatis3.5.6)
diff --git a/pom.xml b/pom.xml
index 2532fba..e25215e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
com.github.jeffreyning
mybatisplus-plus
- 1.7.3-RELEASE
+ 1.7.4-RELEASE
com.baomidou
diff --git a/src/main/java/com/github/jeffreyning/mybatisplus/util/ReadValueUtil.java b/src/main/java/com/github/jeffreyning/mybatisplus/util/ReadValueUtil.java
index 8342ea1..aef4106 100644
--- a/src/main/java/com/github/jeffreyning/mybatisplus/util/ReadValueUtil.java
+++ b/src/main/java/com/github/jeffreyning/mybatisplus/util/ReadValueUtil.java
@@ -3,10 +3,18 @@
import org.apache.ibatis.type.*;
import java.math.BigDecimal;
+import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.time.*;
+import java.util.Date;
-
+/**
+ * 自动填充时sql返回值与entity字段类型转换
+ * @author ninghao
+ * @version 1.7.4
+ */
public class ReadValueUtil {
public static Object readValue(ResultSet rs, Class fieldType) throws SQLException {
@@ -34,6 +42,48 @@ public static Object readValue(ResultSet rs, Class fieldType) throws SQLExceptio
}else if(fieldType.equals(BigDecimal.class)) {
BigDecimalTypeHandler typeHandler=new BigDecimalTypeHandler();
return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(String.class)) {
+ StringTypeHandler typeHandler=new StringTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(BigInteger.class)) {
+ BigIntegerTypeHandler typeHandler=new BigIntegerTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(Character.class)) {
+ CharacterTypeHandler typeHandler=new CharacterTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(Date.class)) {
+ DateTypeHandler typeHandler=new DateTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(LocalDateTime.class)) {
+ LocalDateTimeTypeHandler typeHandler=new LocalDateTimeTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(LocalDate.class)) {
+ LocalDateTypeHandler typeHandler=new LocalDateTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(LocalTime.class)) {
+ LocalTimeTypeHandler typeHandler=new LocalTimeTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(Month.class)) {
+ MonthTypeHandler typeHandler=new MonthTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(java.sql.Date.class)) {
+ SqlDateTypeHandler typeHandler=new SqlDateTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(java.sql.Timestamp.class)) {
+ SqlTimestampTypeHandler typeHandler=new SqlTimestampTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(java.sql.Time.class)) {
+ SqlTimeTypeHandler typeHandler=new SqlTimeTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(YearMonth.class)) {
+ YearMonthTypeHandler typeHandler=new YearMonthTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(Year.class)) {
+ YearTypeHandler typeHandler=new YearTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
+ }else if(fieldType.equals(ZonedDateTime.class)) {
+ ZonedDateTimeTypeHandler typeHandler=new ZonedDateTimeTypeHandler();
+ return typeHandler.getNullableResult(rs,1);
}else{
return rs.getObject(1);
}