余额告警独立页面与多渠道通知:钉钉/飞书/企业微信/Bark,支持通知频率策略

- 告警设置拆分为独立页面,支持钉钉/飞书/企业微信/Bark/通用Webhook 多渠道
- 通知策略:低于阈值后按间隔重复提醒,达到最大次数停止,余额恢复自动重置
- 旧 webhook 配置自动迁移为通用渠道,渠道支持测试发送
- 优化告警话术:去商户ID展示、数字千分位格式化
This commit is contained in:
yml2213
2026-08-04 13:56:26 +08:00
parent 941e7ad79a
commit ca58c2bcaa
13 changed files with 1154 additions and 156 deletions
@@ -0,0 +1,15 @@
-- ============================================================================
-- 余额告警通知频率策略:通知间隔、最大通知次数与当前通知状态
-- ============================================================================
ALTER TABLE merchant_alert_configs
ADD COLUMN IF NOT EXISTS notify_interval_minutes INT NOT NULL DEFAULT 60;
ALTER TABLE merchant_alert_configs
ADD COLUMN IF NOT EXISTS max_notifications INT NOT NULL DEFAULT 5;
ALTER TABLE merchant_alert_configs
ADD COLUMN IF NOT EXISTS last_notified_at TIMESTAMPTZ;
ALTER TABLE merchant_alert_configs
ADD COLUMN IF NOT EXISTS notification_count INT NOT NULL DEFAULT 0;