From b2e15ea67c6c73003f1c17c51451d62c586cf5c6 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 22 五月 2024 02:45:47 +0800
Subject: [PATCH] 修改设备通知的频率判断

---
 service/subscribe.go |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/service/subscribe.go b/service/subscribe.go
index e00f151..ccc9b5c 100644
--- a/service/subscribe.go
+++ b/service/subscribe.go
@@ -149,13 +149,8 @@
 	for _, subType := range subDetails {
 		triggerTime := time.Now().Format("20060102150405")
 
-		// 涓婃姤璁惧
-		if subType == vo.SubscribeApe {
-			// 璁惧閫氱煡鎺у埗棰戠巼, 閬垮厤棰戠箒, 涓婄骇涓�鑸細涓嬪彂绉掔骇鐨勪换鍔�, 浣嗚澶囦笉浼氶绻佹洿鏂�,
-			if time.Now().Unix()-task.lastExecTime < 60*10 {
-				continue
-			}
-
+		// 涓婃姤璁惧 鎺у埗璁惧閫氱煡鎺у埗棰戠巼, 閬垮厤棰戠箒, 涓婄骇涓�鑸細涓嬪彂绉掔骇鐨勪换鍔�, 浣嗚澶囦笉浼氶绻佹洿鏂�,
+		if subType == vo.SubscribeApe && time.Now().Unix()-task.lastExecTime > 60*10 {
 			var notification = vo.DeviceNotification{
 				NotificationID:   triggerTime + snowflake.GenerateIdStr(),
 				SubscribeID:      task.conf.Id,

--
Gitblit v1.8.0