搭建消息告警模块以及跨网推送服务,支持企微,飞书,钉钉通知

This commit is contained in:
2026-09-03 14:02:35 +08:00
parent cfa8e78d33
commit 3927b0c201
40 changed files with 4360 additions and 7 deletions
@@ -0,0 +1,21 @@
using Model;
using Model.Dto.Inspection;
using System.Threading.Tasks;
namespace Service.Interface
{
/// <summary>
/// 告警中心服务接口(全系统统一告警上报入口)
/// 其它模块(规则引擎/自动巡检/看板/数采等)只需注入本接口调用 RaiseAsync 即可产生告警,
/// 去重合并、落库、通知分发、规则计数均由告警中心内部完成,调用方无需关心
/// </summary>
public interface IAlertCenterService
{
/// <summary>
/// 上报一条告警
/// </summary>
/// <param name="dto">告警上报参数(除设备标识外均可空)</param>
/// <returns>返回告警消息 Idstring,雪花 Id);合并到已有告警时返回已有告警的 Id</returns>
Task<Result<string>> RaiseAsync(AlertRaiseDto dto);
}
}