From 7618a12d245b9b2dd607b1a92b89652630b07b1c Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 28 Feb 2024 15:14:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96calcite=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=87=BD=E6=95=B0=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/engine/trans/CustomWhere2Str.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/CustomWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/CustomWhere2Str.java index c0f06dd061..80aaa6178a 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/CustomWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/CustomWhere2Str.java @@ -11,7 +11,6 @@ import io.dataease.engine.utils.Utils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; @@ -92,11 +91,11 @@ public class CustomWhere2Str { // 规定几种日期格式,一一匹配,匹配到就是该格式 if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) { String f = DateUtils.get_date_format(filterItemDTO.getValue()); - String n = String.format(SQLConstants.DE_CAST_DATE_FORMAT, whereName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : SQLConstants.DEFAULT_DATE_FORMAT, f); + String n = String.format(SQLConstants.DE_STR_TO_DATE, whereName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : SQLConstants.DEFAULT_DATE_FORMAT, f); whereNameReal = String.format(SQLConstants.UNIX_TIMESTAMP, n); } else { String f = DateUtils.get_date_format(filterItemDTO.getValue()); - String n = String.format(SQLConstants.DE_DATE_FORMAT, whereName, f); + String n = String.format(SQLConstants.DE_STR_TO_DATE, whereName, f); whereNameReal = String.format(SQLConstants.UNIX_TIMESTAMP, n); } } else {