From b95be95910e08be90110debd90acdd3893f973ea Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Thu, 5 Jun 2025 18:04:02 +0800 Subject: [PATCH] =?UTF-8?q?add-options:=E5=A2=9E=E5=8A=A0=E9=A3=9E?= =?UTF-8?q?=E4=B9=A6=E9=85=8D=E7=BD=AE=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SjzyTrackApplicationModule.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs index 5d3c8f99..3a059835 100644 --- a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs +++ b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs @@ -139,7 +139,7 @@ public class SjzyTrackApplicationModule : AbpModule Console.WriteLine("-- 当前为VS本地环境,用内存存储和内存队列"); } - Action action = options => + Action action = options => { options.ConnectionString = $"amqp://{configuration["RabbitMQ:UserName"]}:{configuration["RabbitMQ:Password"]}@{configuration["RabbitMQ:HostName"]}:{configuration["RabbitMQ:Port"]}"; @@ -208,6 +208,14 @@ public class SjzyTrackApplicationModule : AbpModule // 注册预警任务后台服务 context.Services.AddHostedService(); + // 注册飞书服务(用于预警通知) + context.Services.AddFeishuNetSdk(o => + { + o.AppId = configuration.GetValue("FeiShu:AppId")!; + o.AppSecret = configuration.GetValue("FeiShu:AppSecret")!; + o.EnableLogging = configuration.GetValue("FeiShu:EnableLogging"); + }); + // 注册HangFire服务 context.Services.Configure(configuration.GetSection("WarningTask")); context.Services.AddHangfire(o =>