From 4541c15031415abd89a9bb11294161311954bcfa Mon Sep 17 00:00:00 2001 From: 18209 Date: Mon, 21 Jul 2025 14:45:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerSavoirTheme.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumers/consumerSavoirTheme.go b/consumers/consumerSavoirTheme.go index 8782bae..f7d6f41 100644 --- a/consumers/consumerSavoirTheme.go +++ b/consumers/consumerSavoirTheme.go @@ -144,9 +144,9 @@ func (the *consumerSavoirTheme) judgeOffline() { } log.Printf("查询相关测点数=%d", len(allThemes)) for _, theme := range allThemes { - offlineMin := now.Sub(theme.CollectTime).Minutes() + offlineMin := now.Sub(theme.CreateTime).Minutes() log.Printf("s:%d,f:%d,sensor:%d 离线%f min", gap.StructId, gap.FactorId, theme.Sensor, offlineMin) - log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CollectTime, now) + log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CreateTime, now) //拿到当前es最后一条数据和当前数据库的配置之后去查是否产生告警 StrValue := "80040003"