From 5003fa84a71e34c597df503558dbc4378e7002db Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 8 Sep 2021 17:45:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20doris=E6=97=A5=E6=9C=9F=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/provider/doris/DorisQueryProvider.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java index a45b00a682..dc04e54f20 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java @@ -849,7 +849,13 @@ public class DorisQueryProvider extends QueryProvider { whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1)); } } else { - whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0)); + if (request.getDatasetTableField().getDeType() == 1) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String time = simpleDateFormat.format(new Date(Long.parseLong(value.get(0)))); + whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, time); + } else { + whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0)); + } } list.add(SQLObj.builder() .whereField(whereName)