From b62527f337ca28eebda7232d4e757db3a1cd1da1 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Thu, 3 Apr 2025 15:59:16 +0800 Subject: [PATCH] =?UTF-8?q?options:=E5=B0=86=E9=85=8D=E7=BD=AE=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E5=A4=96=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Hangfire/WarningNotifyAggregator.cs | 7 +++++-- .../Options/TrackWarningTaskOptions.cs | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs b/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs index 352430bf..4864c4ca 100644 --- a/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs +++ b/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs @@ -263,6 +263,7 @@ public sealed class WarningNotifyAggregator : ITransientDependency private List BuildNotifyConfigs(List needNotifyTasks) { + var systemId = _optionsMonitor.CurrentValue.MiddleSystemId; var result = new List(); if (needNotifyTasks.Count == 0) return result; @@ -302,11 +303,13 @@ public sealed class WarningNotifyAggregator : ITransientDependency //接收完整预警,命中规则1,通知方式(飞书) ,命中规则2,通知方式(飞书,站内信) //此时聚合后,消息为:总共6条预警消息,其中回传xx条,运输xx条,完整xx条 //同时使用飞书和站内信两种方式通知 - result.Add(NotifyConfig.CreateConfig(userId, notifyMessage, new List + var config = NotifyConfig.CreateConfig(userId, notifyMessage, new List { 1, 2 - })); + }); + config.SystemId = systemId; + result.Add(config); } return result; diff --git a/src/SJZY.Track.Application/Options/TrackWarningTaskOptions.cs b/src/SJZY.Track.Application/Options/TrackWarningTaskOptions.cs index c75f7c6a..61ccfc0d 100644 --- a/src/SJZY.Track.Application/Options/TrackWarningTaskOptions.cs +++ b/src/SJZY.Track.Application/Options/TrackWarningTaskOptions.cs @@ -2,6 +2,11 @@ namespace SJZY.Track.Application.Options; public sealed class TrackWarningTaskOptions { + /// + /// 所属子系统id(业务中台id) + /// + public int MiddleSystemId { get; set; } + /// 通知任务扫描优先级 public int ScanWarningNotifyTaskLevel { get; set; }