From 98317dce1fe22132950904e7d21300f966cf68d6 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Tue, 18 Nov 2025 14:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/domain/task/device_threshold_check_task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/domain/task/device_threshold_check_task.go b/internal/domain/task/device_threshold_check_task.go index 4e62fb8..a175e28 100644 --- a/internal/domain/task/device_threshold_check_task.go +++ b/internal/domain/task/device_threshold_check_task.go @@ -90,7 +90,7 @@ func (d *DeviceThresholdCheckTask) Execute(ctx context.Context) error { if isExceeded { // 状态一:检查未通过,确保告警开启 - summary := fmt.Sprintf("设备 %d(%s) 不满足阈值条件 (%s %.2f)", d.params.DeviceID, d.params.SensorType, d.params.Operator, d.params.Thresholds) + summary := fmt.Sprintf("设备 %d(%s) 触发阈值告警条件 (%s %.2f)", d.params.DeviceID, d.params.SensorType, d.params.Operator, d.params.Thresholds) details := fmt.Sprintf("当前检测值: %.2f", currentValue) logger.Infof("任务 %v: %s。%s", d.taskLog.TaskID, summary, details) @@ -111,7 +111,7 @@ func (d *DeviceThresholdCheckTask) Execute(ctx context.Context) error { } else { // 状态二:检查已通过,确保告警关闭 resolveMethod := "系统自动解决:阈值恢复正常" - logger.Infof("任务 %v: 设备 %d 的 %s 阈值已恢复正常,正在尝试关闭告警。", d.taskLog.TaskID, d.params.DeviceID, d.params.SensorType) + logger.Infof("任务 %v: 设备 %d 的 %s 已恢复正常,正在尝试关闭告警。", d.taskLog.TaskID, d.params.DeviceID, d.params.SensorType) if err := d.alarmService.CloseAlarm(taskCtx, models.AlarmSourceTypeDevice, d.params.DeviceID, alarmCode, resolveMethod, nil); err != nil { logger.Errorf("任务 %v: 关闭告警失败: %v", d.taskLog.TaskID, err)