DeviceAlertProperties.java 980 B

123456789101112131415161718192021222324252627282930313233343536
  1. package com.haha.service.config;
  2. import lombok.Data;
  3. import org.springframework.boot.context.properties.ConfigurationProperties;
  4. import org.springframework.stereotype.Component;
  5. /**
  6. * 设备告警配置属性类
  7. * 用于配置设备离线/信号弱等告警参数及企业微信通知
  8. */
  9. @Data
  10. @Component
  11. @ConfigurationProperties(prefix = "device.alert")
  12. public class DeviceAlertProperties {
  13. /** 是否启用设备告警 */
  14. private boolean enabled = true;
  15. /** 同设备同类型告警冷却时间(分钟) */
  16. private int cooldownMinutes = 30;
  17. /** 定时巡检间隔(分钟) */
  18. private int scanIntervalMinutes = 5;
  19. /** 信号弱阈值(signal_val <= 此值视为信号弱) */
  20. private int weakSignalThreshold = 2;
  21. /** 企业微信配置 */
  22. private WeChatWork wechatWork = new WeChatWork();
  23. @Data
  24. public static class WeChatWork {
  25. /** 群机器人Webhook地址 */
  26. private String webhookUrl;
  27. }
  28. }