From 3297ee90eb4a2ff8c6718d9bbc1fec8a1f448d2e Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 11 二月 2025 15:04:59 +0800
Subject: [PATCH] 修改时间判断
---
models/accessRegularity.go | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/models/accessRegularity.go b/models/accessRegularity.go
index 70e23d8..dfb3986 100644
--- a/models/accessRegularity.go
+++ b/models/accessRegularity.go
@@ -208,7 +208,7 @@
if !isCrossDay {
// 鍒ゆ柇鏃堕棿鑼冨洿锛屽苟褰掑睘鍒版煇涓�澶�
- if hour >= startHour && hour <= endHour {
+ if hour >= startHour && hour < endHour {
key = t.Format("2006-01-02")
} else {
continue // 涓嶅湪缁熻鑼冨洿鍐�
@@ -217,7 +217,7 @@
// 鍒ゆ柇鏃堕棿鑼冨洿锛屽苟褰掑睘鍒版煇涓�澶�
if hour >= startHour { // 21:00-23:59 褰掑睘褰撳ぉ
key = t.Format("2006-01-02")
- } else if hour <= endHour { // 00:00-02:59 褰掑睘鍓嶄竴澶�
+ } else if hour < endHour { // 00:00-02:59 褰掑睘鍓嶄竴澶�
key = t.AddDate(0, 0, -1).Format("2006-01-02")
} else {
continue // 涓嶅湪缁熻鑼冨洿鍐�
--
Gitblit v1.8.0