| 123456789101112131415161718192021222324252627282930313233343536 |
- package com.haha.service.config;
- import lombok.Data;
- import org.springframework.boot.context.properties.ConfigurationProperties;
- import org.springframework.stereotype.Component;
- /**
- * 设备告警配置属性类
- * 用于配置设备离线/信号弱等告警参数及企业微信通知
- */
- @Data
- @Component
- @ConfigurationProperties(prefix = "device.alert")
- public class DeviceAlertProperties {
- /** 是否启用设备告警 */
- private boolean enabled = true;
- /** 同设备同类型告警冷却时间(分钟) */
- private int cooldownMinutes = 30;
- /** 定时巡检间隔(分钟) */
- private int scanIntervalMinutes = 5;
- /** 信号弱阈值(signal_val <= 此值视为信号弱) */
- private int weakSignalThreshold = 2;
- /** 企业微信配置 */
- private WeChatWork wechatWork = new WeChatWork();
- @Data
- public static class WeChatWork {
- /** 群机器人Webhook地址 */
- private String webhookUrl;
- }
- }
|