Merge branch 'refs/heads/feat-tool-mail' into release

This commit is contained in:
junleea 2025-03-03 15:28:37 +08:00
commit f92fd4767c
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ func SetDeviceStatusV2(c *gin.Context) {
// 继续处理请求
//是否是暂停之后第一次上线,如果是则发送邮件通知
device_status := worker.GetRedis("monitor_" + req.ID)
if device_status == "2" {
isExist := worker.IsContainKey("monitor_" + req.ID)
if device_status == "2" || !isExist {
//发送邮件通知
title := "设备上线"
content := "设备上线\n设备:" + req.ID + "\t状态:" + req.Status + "\t时间" + time.Now().String()