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; }