add-options:增加飞书配置节

This commit is contained in:
hardstylewyl 2025-06-05 18:04:02 +08:00
parent 0a4103abf5
commit b95be95910

View File

@ -208,6 +208,14 @@ public class SjzyTrackApplicationModule : AbpModule
// 注册预警任务后台服务
context.Services.AddHostedService<WarningTaskComponentBackgroundService>();
// 注册飞书服务(用于预警通知)
context.Services.AddFeishuNetSdk(o =>
{
o.AppId = configuration.GetValue<string>("FeiShu:AppId")!;
o.AppSecret = configuration.GetValue<string>("FeiShu:AppSecret")!;
o.EnableLogging = configuration.GetValue<bool>("FeiShu:EnableLogging");
});
// 注册HangFire服务
context.Services.Configure<TrackWarningTaskOptions>(configuration.GetSection("WarningTask"));
context.Services.AddHangfire(o =>