feat: add platform dunning notifications

This commit is contained in:
Codex
2026-06-30 07:28:32 +08:00
parent e66623158d
commit 51f8cbdec8
26 changed files with 1782 additions and 24 deletions

View File

@@ -74,6 +74,13 @@ WORKER_PLATFORM_BILLING_ID=platform-billing-1
# 逾期催缴只标记 overdue、写 tenant_invoice_reminders 和审计,不自动停用租户。
WORKER_PLATFORM_DUNNING_BATCH_SIZE=100
WORKER_PLATFORM_DUNNING_ID=platform-dunning-1
# 逾期催缴外部通知会消费 tenant_invoice_reminders并发送到 generic/钉钉/飞书/企微 webhook。
WORKER_PLATFORM_DUNNING_NOTIFICATION_BATCH_SIZE=50
WORKER_PLATFORM_DUNNING_NOTIFICATION_MAX_ATTEMPTS=5
WORKER_PLATFORM_DUNNING_NOTIFICATION_BACKOFF_SECONDS=10,60,300,900,1800
WORKER_PLATFORM_DUNNING_NOTIFICATION_REQUEST_TIMEOUT_MS=10000
# 仅本地 fake webhook 测试允许 http://127.0.0.1;生产必须 false
WORKER_PLATFORM_DUNNING_NOTIFICATION_ALLOW_INSECURE_LOCALHOST=false
# Worker 配置:平台审计告警生成和外部通知。
WORKER_PLATFORM_AUDIT_ALERT_BATCH_SIZE=200