diff --git a/gradle.properties b/gradle.properties index 5d5b3f9..3321fcf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,10 +16,10 @@ # ProjectName mingli-utils # ModuleName mingli-utils # CurrentFile gradle.properties -# LastUpdate 2025-09-15 12:45:46 +# LastUpdate 2025-09-15 13:54:50 # UpdateUser MingLiPro # JDKVERSIONS=1.8 GROUPSID=com.mingliqiye.utils ARTIFACTID=mingli-utils -VERSIONS=4.0.3 +VERSIONS=4.0.4 diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt index 1a35a28..7790be7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile DateTimeTypeHandler.kt - * LastUpdate 2025-09-14 18:19:29 + * LastUpdate 2025-09-15 13:53:53 * UpdateUser MingLiPro */ @file:JvmName("DateTimeConvertor") @@ -65,8 +65,8 @@ class DateTimeTypeHandler : BaseTypeHandler() { override fun setNonNullParameter( ps: PreparedStatement, i: Int, - parameter: DateTime, // 移除了 ?,因为这是 non-null 方法 - jdbcType: JdbcType + parameter: DateTime, + jdbcType: JdbcType? ) { // 使用 setObject 允许传入 null,由数据库处理 ps.setObject(i, toLocalDateTime(parameter)) diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/UUIDTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/UUIDTypeHandler.kt index 9b369ab..d65a758 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/UUIDTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/UUIDTypeHandler.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile UUIDTypeHandler.kt - * LastUpdate 2025-09-14 18:19:29 + * LastUpdate 2025-09-15 13:54:18 * UpdateUser MingLiPro */ @file:JvmName("UUIDConvertor") @@ -112,7 +112,7 @@ class UUIDBinaryTypeHandler : BaseTypeHandler() { * @param jdbcType JDBC类型 */ override fun setNonNullParameter( - ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType + ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType? ) { ps.setBytes(i, uuidToByteArray(parameter)) } @@ -172,7 +172,7 @@ class UUIDStringTypeHandler : BaseTypeHandler() { * @param jdbcType JDBC类型 */ override fun setNonNullParameter( - ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType + ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType? ) { ps.setString(i, uuidToString(parameter)) } @@ -234,7 +234,7 @@ class UUIDTypeHandler : BaseTypeHandler() { * @param jdbcType JDBC类型 */ override fun setNonNullParameter( - ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType + ps: PreparedStatement, i: Int, parameter: UUID, jdbcType: JdbcType? ) { ps.setObject(i, parameter.getUuid()) } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/mysql/MysqlUUIDBinaryTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/mysql/MysqlUUIDBinaryTypeHandler.kt index 7270599..c74d44f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/mysql/MysqlUUIDBinaryTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/uuid/mysql/MysqlUUIDBinaryTypeHandler.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile MysqlUUIDBinaryTypeHandler.kt - * LastUpdate 2025-09-14 18:19:29 + * LastUpdate 2025-09-15 13:54:29 * UpdateUser MingLiPro */ @@ -72,7 +72,7 @@ class MysqlUUIDBinaryTypeHandler : BaseTypeHandler() { ps: PreparedStatement, i: Int, parameter: UUID, - jdbcType: JdbcType + jdbcType: JdbcType? ) { ps.setBytes(i, toByteArray(parameter)) }