From 686bdd038c415211423358f7909bc23b5cd133a4 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 5 Nov 2024 16:57:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E9=98=88=E5=80=BC=E5=91=8A?= =?UTF-8?q?=E8=AD=A6-=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E4=B8=8E=E5=9B=BE=E8=A1=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/chart/manage/ChartViewThresholdManage.java | 8 +++++--- de-xpack | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java index 21b31efe2e..7513d8dbcb 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java @@ -362,9 +362,9 @@ public class ChartViewThresholdManage { } } else { if (timeFlag == 4) { - return now.withDayOfMonth(1).format(formatter); + return now.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).format(formatter); } else if (timeFlag == 5) { - return now.plusMonths(1).withDayOfMonth(1).minusDays(1).format(formatter); + return now.plusMonths(1).withDayOfMonth(1).minusDays(1).withHour(0).withMinute(0).withSecond(0).format(formatter); } else { return getCustomTimeValue(format, 3, suffix, count, true); } @@ -381,7 +381,9 @@ public class ChartViewThresholdManage { LocalDateTime now = LocalDateTime.now(); String fullFormat = "yyyy-MM-dd HH:mm:ss"; int len = format.length(); - if (!hasTime) { + if (hasTime) { + now = now.withHour(0).withMinute(0).withSecond(0); + } else { len = Math.min(len, 10); } DateTimeFormatter formatter = DateTimeFormatter.ofPattern(fullFormat.substring(0, len)); diff --git a/de-xpack b/de-xpack index 15fd94f9b3..7d763d1a73 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 15fd94f9b316a6956be8eddaf4ba6196dcccb7a2 +Subproject commit 7d763d1a73750889a5a6abc6faf658aab3c48099