From 6077089c5f6ced73cf46a0abdca2c6d77a3b3878 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 12 三月 2025 14:53:32 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/utils/IndSqlUtils.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/utils/IndSqlUtils.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/utils/IndSqlUtils.java index 64a70b6..127c42e 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/utils/IndSqlUtils.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/utils/IndSqlUtils.java @@ -167,7 +167,7 @@ whereSql.append(indItem.getTimeLabel()); whereSql.append("' < '"); whereSql.append(DateUtils.format(calendar.getTime(), PATTERN_MON)); - whereSql.append("' AND '"); + whereSql.append("' AND "); whereSql.append(indItem.getTimeLabel()); whereSql.append(" >= '"); calendar.add(Calendar.MONTH, -1); @@ -178,7 +178,7 @@ whereSql.append(indItem.getTimeLabel()); whereSql.append(" <= '"); whereSql.append(DateUtils.format(calendar.getTime(), PATTERN_MON)); - whereSql.append("' AND '"); + whereSql.append("' AND "); whereSql.append(indItem.getTimeLabel()); whereSql.append("' >= '"); calendar.add(Calendar.MONTH, -12); @@ -210,6 +210,17 @@ whereSql.append(DateUtils.format(calendar.getTime(), PATTERN_YEAR)); whereSql.append("'"); break; + case LAST_HOUR_24: + whereSql.append(indItem.getTimeLabel()); + whereSql.append(" <= '"); + whereSql.append(DateUtils.format(calendar.getTime(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); + whereSql.append("' AND "); + whereSql.append(indItem.getTimeLabel()); + whereSql.append(" >= '"); + calendar.add(Calendar.HOUR_OF_DAY, -24); + whereSql.append(DateUtils.format(calendar.getTime(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); + whereSql.append("'"); + break; case CUSTOM: whereSql.append(indItem.getTimeLabel()); whereSql.append(" <= '"); -- Gitblit v1.9.3