From 31562676ca5b6b91b7eac7c593d6fb7f45ec9150 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 27 Dec 2023 12:33:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=BF=87=E6=BB=A4=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98=20#7313?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/engine/trans/ExtWhere2Str.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index 643a722f60..3c5865dc87 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -64,7 +64,10 @@ public class ExtWhere2Str { whereName = String.format(SQLConstants.DE_CAST_DATE_FORMAT, originName, StringUtils.isEmpty(field.getDateFormat()) ? SQLConstants.DEFAULT_DATE_FORMAT : field.getDateFormat(), date_format); } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { - whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); + String cast = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); + // 此处获取标准格式的日期 + whereName = String.format(SQLConstants.FROM_UNIXTIME, cast, date_format); + whereName = String.format(SQLConstants.UNIX_TIMESTAMP, whereName); } if (field.getDeExtractType() == 1) { // 此处获取标准格式的日期