Merge pull request #7345 from dataease/pr@dev-v2@fix_filter

fix: 修复过滤组件过滤时间戳不显示的问题 #7313
This commit is contained in:
Junjun 2023-12-26 10:01:58 +08:00 committed by GitHub
commit 3a484735b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -87,6 +87,8 @@ public class SQLConstants {
public static final String WHERE_BETWEEN = "'%s' AND '%s'"; public static final String WHERE_BETWEEN = "'%s' AND '%s'";
public static final String WHERE_CALUE_BETWEEN = "%s AND %s";
public static final String BRACKETS = "(%s)"; public static final String BRACKETS = "(%s)";
public static final String ROUND = "ROUND(%s,%s)"; public static final String ROUND = "ROUND(%s,%s)";

View File

@ -107,7 +107,7 @@ public class ExtWhere2Str {
if (request.getDatasetTableField().getDeExtractType() == 2 if (request.getDatasetTableField().getDeExtractType() == 2
|| request.getDatasetTableField().getDeExtractType() == 3 || request.getDatasetTableField().getDeExtractType() == 3
|| request.getDatasetTableField().getDeExtractType() == 4) { || request.getDatasetTableField().getDeExtractType() == 4) {
whereValue = String.format(SQLConstants.WHERE_BETWEEN, value.get(0), value.get(1)); whereValue = String.format(SQLConstants.WHERE_CALUE_BETWEEN, value.get(0), value.get(1));
} else { } else {
whereName = String.format(SQLConstants.UNIX_TIMESTAMP, whereName); whereName = String.format(SQLConstants.UNIX_TIMESTAMP, whereName);
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Long.parseLong(value.get(0)), Long.parseLong(value.get(1))); whereValue = String.format(SQLConstants.WHERE_BETWEEN, Long.parseLong(value.get(0)), Long.parseLong(value.get(1)));