修复删除验证的提示问题; 修复Int类型查询问题

This commit is contained in:
2021-04-12 22:38:41 +08:00
parent 038ed84a1e
commit a8a13fd7f1
4 changed files with 14 additions and 5 deletions

View File

@@ -42,8 +42,12 @@ fun Query.where(
//日期类型特殊处理为String类型
val fieldType = onFieldType(key)
if (fieldType != null && value.javaClass != fieldType && fieldType == Date::class.java) {
value = DateTime(value.toString(), "yyyy-MM-dd HH:mm:ss").date
if (fieldType != null && value.javaClass != fieldType) {
when (fieldType) {
Date::class.java -> value = DateTime(value.toString(), "yyyy-MM-ddTHH:mm:ss").date
Int::class.java -> value = value.toString().toInt()
Integer::class.java -> value = value.toString().toInt()
}
}
val where = onWhere(key)