From a82f508a32a2318d2aba4ce3771e21c81e06d5a1 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Wed, 7 Jun 2023 18:27:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E8=BF=87=E6=BB=A4):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6=E5=90=8C=E6=AD=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=97=B6=E9=97=B4=E8=BF=87=E6=BB=A4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=B1=E6=95=88=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/provider/engine/doris/DorisQueryProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java index 6caf017d19..3a9582c031 100644 --- a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java @@ -1074,7 +1074,7 @@ public class DorisQueryProvider extends QueryProvider { if (field.getDeType() == 1) { String format = transDateFormat(request.getDateStyle(), request.getDatePattern()); if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) { - whereName = String.format(DorisConstants.STR_TO_DATE, originName, format); + whereName = String.format(DorisConstants.DATE_FORMAT, originName, format); } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { String cast = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_INT_FORMAT) + "/1000"; @@ -1115,7 +1115,7 @@ public class DorisQueryProvider extends QueryProvider { whereName = "upper(" + whereName + ")"; } else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) { if (request.getDatasetTableField().getDeType() == 1) { - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0)))); String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1)))); whereValue = String.format(DorisConstants.WHERE_BETWEEN, startTime, endTime);