feat(资产钱包自动续费): 新增全局配置、每日扫描续购与可靠复机
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 10m15s

- 新增单行配置表 tb_asset_auto_renewal_config 与尝试记录表 tb_asset_auto_renewal_attempt(迁移 000229/000230)
- 每日按上海自然日扫描,窗口内以同一资产钱包可用余额续购当前主套餐,资金/订单/套餐/审计同一事务闭合
- 唯一键保证每资产每日至多一次尝试,占位中断由后续扫描收敛,当日不重试
- 四类失败原因向客户与店铺各投递每日至多一条站内通知,并注册通知类型与个人客户白名单
- 续费成功后按条件经 Outbox 可靠投递复机,新增恢复扫描只查询回填,不使用即发即弃调用
- 配置读写仅超级管理员与平台账号,保存记录操作者、前后值快照并登记统一审计
- tasks 7.1–7.15 全部验证通过(本机隔离 PostgreSQL/Redis,零外部渠道调用)
This commit is contained in:
2026-09-17 16:39:26 +08:00
parent 70e6b186df
commit d52be16802
54 changed files with 5164 additions and 97 deletions

View File

@@ -4437,5 +4437,39 @@
"priority-polling-queue::优先轮询事实与查询的可追溯"
],
"classification": "behavior"
},
{
"entry_type": "async",
"entry": "constants.OutboxEventTypeAssetAutoRenewalResumeRequested",
"capability": "asset-auto-renewal",
"requirements": [
"asset-auto-renewal::成功后的可靠复机"
],
"classification": "behavior"
},
{
"entry_type": "async",
"entry": "constants.TaskTypeAssetAutoRenewalScan",
"capability": "asset-auto-renewal",
"requirements": [
"asset-auto-renewal::自动续费配置与权限",
"asset-auto-renewal::每日扫描与续购资格",
"asset-auto-renewal::每日一次尝试与尝试记录终态收敛",
"asset-auto-renewal::资金、价格与单事务闭合",
"asset-auto-renewal::失败通知与接收人",
"asset-auto-renewal::尝试记录与可追溯字段",
"asset-auto-renewal::手动续购优先",
"asset-auto-renewal::不得因钱包余额跳过停机判定"
],
"classification": "behavior"
},
{
"entry_type": "async",
"entry": "constants.TaskTypeAssetAutoRenewalRecovery",
"capability": "asset-auto-renewal",
"requirements": [
"asset-auto-renewal::成功后的可靠复机"
],
"classification": "behavior"
}
]