提交 d995dd10 authored 作者: junjie's avatar junjie

fix: 过滤时间类型字段可能出错

上级 5cb91c80
......@@ -679,6 +679,9 @@ public class MysqlQueryProvider extends QueryProvider {
String cast = String.format(MySQLConstants.CAST, originName, MySQLConstants.DEFAULT_INT_FORMAT) + "/1000";
whereName = String.format(MySQLConstants.FROM_UNIXTIME, cast, MySQLConstants.DEFAULT_DATE_FORMAT);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......@@ -734,6 +737,9 @@ public class MysqlQueryProvider extends QueryProvider {
String cast = String.format(MySQLConstants.CAST, originName, MySQLConstants.DEFAULT_INT_FORMAT) + "/1000";
whereName = String.format(MySQLConstants.FROM_UNIXTIME, cast, MySQLConstants.DEFAULT_DATE_FORMAT);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......
......@@ -714,6 +714,9 @@ public class OracleQueryProvider extends QueryProvider {
String cast = String.format(OracleConstants.CAST, originName, OracleConstants.DEFAULT_INT_FORMAT) + "/1000";
whereName = String.format(OracleConstants.FROM_UNIXTIME, cast, OracleConstants.DEFAULT_DATE_FORMAT);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......@@ -773,6 +776,9 @@ public class OracleQueryProvider extends QueryProvider {
String cast = String.format(OracleConstants.CAST, originName, OracleConstants.DEFAULT_INT_FORMAT) + "/1000";
whereName = String.format(OracleConstants.FROM_UNIXTIME, cast, OracleConstants.DEFAULT_DATE_FORMAT);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......
......@@ -706,6 +706,9 @@ public class PgQueryProvider extends QueryProvider {
String cast = String.format(PgConstants.CAST, originName, "bigint");
whereName = String.format(PgConstants.FROM_UNIXTIME, cast);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......@@ -761,6 +764,9 @@ public class PgQueryProvider extends QueryProvider {
String cast = String.format(PgConstants.CAST, originName, "bigint");
whereName = String.format(PgConstants.FROM_UNIXTIME, cast);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......
......@@ -661,6 +661,9 @@ public class SqlserverQueryProvider extends QueryProvider {
String cast = String.format(SqlServerSQLConstants.LONG_TO_DATE, originName + "/1000");
whereName = String.format(SqlServerSQLConstants.FROM_UNIXTIME, cast);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......@@ -707,6 +710,9 @@ public class SqlserverQueryProvider extends QueryProvider {
String cast = String.format(SqlServerSQLConstants.LONG_TO_DATE, originName + "/1000");
whereName = String.format(SqlServerSQLConstants.FROM_UNIXTIME, cast);
}
if (field.getDeExtractType() == 1) {
whereName = originName;
}
} else {
whereName = originName;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论