feat: batch update - gift card breakdown spec, backend APIs, miniprogram pages, ETL finance recharge, docs & migrations

This commit is contained in:
Neo
2026-03-20 01:43:48 +08:00
parent 075caf067f
commit 79f9a0e1da
437 changed files with 118603 additions and 976 deletions

View File

@@ -859,6 +859,8 @@ dim_table ────────────────────┘
| 台费卡 | `2791990152417157` | `gift_card_balance` |
| 活动抵用券 | `2793266846533445` | `gift_card_balance` |
| 酒水卡 | `2794699703437125` | `gift_card_balance` |
| 年卡 | `2791987095408517` | ⚠️ 未统计(遗漏) |
| 月卡 | `2793306611533637` | ⚠️ 未统计(遗漏) |
`total_card_balance = cash_card_balance + gift_card_balance`
@@ -1209,6 +1211,8 @@ card_consume_total = recharge_card_consume + gift_card_consume
| 台费卡 | `2791990152417157` | `gift_card_balance` |
| 酒水卡 | `2794699703437125` | `gift_card_balance` |
| 活动抵用券 | `2793266846533445` | `gift_card_balance` |
| 年卡 | `2791987095408517` | ⚠️ 未统计(遗漏) |
| 月卡 | `2793306611533637` | ⚠️ 未统计(遗漏) |
```
total_card_balance = cash_card_balance + gift_card_balance
@@ -1772,3 +1776,12 @@ dwd_table_fee_log (ledger_count) ────────────┘
6. 计算占比:`percentage = duration_seconds / total_seconds`(四位小数)
7. 占比 ≥ 0.25 标记 `is_tagged = TRUE`
8. 过滤条件:`COALESCE(is_delete, 0) = 0`,营业日切点通过 `biz_date_sql_expr` 处理
<!--
AI_CHANGELOG:
- 日期: 2026-03-19
- Prompt: card_type_id 年卡/月卡映射同步
- 直接原因: 用户确认 2791987095408517=年卡、2793306611533637=月卡,同步到所有涉及 card_type_id 的文档
- 变更摘要: 两处卡类型映射表DWS_MEMBER_CONSUMPTION 和 DWS_FINANCE_RECHARGE补充年卡/月卡行,标注"⚠️ 未统计(遗漏)"
- 风险与验证: 纯文档变更,无运行时影响
-->