1
mirror of https://github.com/CarmJos/EasySQL.git synced 2024-09-19 21:35:47 +00:00

[0.3.6] 枚举参数默认采用 name() 方法

This commit is contained in:
Carm Jos 2022-02-05 12:07:45 +08:00
parent f7d85ddf94
commit 7a2d1841db
8 changed files with 13 additions and 7 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<version>0.3.5</version>
<version>0.3.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.5</version>
<version>0.3.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -197,6 +197,12 @@ public class StatementUtil {
// 其它数字类型按照默认类型传入
}
if (param instanceof Enum) {
//枚举类采用 name()
preparedStatement.setString(paramIndex, ((Enum<?>) param).name());
return;
}
// 其它参数类型直接传入
preparedStatement.setObject(paramIndex, param);
}

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.5</version>
<version>0.3.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.5</version>
<version>0.3.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -17,7 +17,7 @@
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-parent</artifactId>
<packaging>pom</packaging>
<version>0.3.5</version>
<version>0.3.6</version>
<modules>
<module>easysql-api</module>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.5</version>
<version>0.3.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easysql-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>0.3.5</version>
<version>0.3.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>