44 lines
2.6 KiB
Markdown
44 lines
2.6 KiB
Markdown
# 替换 role_area_association 为 member_consumption_statistics + 文档更新 — 审计记录
|
||
|
||
> Prompt-ID: P20260214-083000
|
||
|
||
## 日期
|
||
|
||
2026-02-14(Asia/Shanghai)
|
||
|
||
## 原始原因
|
||
|
||
用户 Prompt(P20260214-083000,已脱敏):
|
||
> role_area_association 替换成:统计某种卡的合计余额。卡种为 cardTypeId,cardTypeId 不传此值则全部卡。
|
||
> fetch("https://pc.ficoo.vip/apiprod/admin/v1/MemberProfile/QueryMemberConsumptionStatistics", {...})
|
||
> 重新获取,放入示例库,撰写文档。tenant_member_balance_overview:recharge_card_list 和 give_card_list 要展开。
|
||
> 完成以上任务,给我 2 个表的新的设计方案。
|
||
>
|
||
> (Authorization Bearer token 已脱敏为 [REDACTED])
|
||
|
||
## 直接原因
|
||
|
||
1. role_area_association 是权限配置查询,非业务数据,不适合入 ODS。用户要求替换为 QueryMemberConsumptionStatistics(会员消费统计),该接口按门店维度统计卡种资金流向,有明确的 ODS 入库价值。
|
||
2. tenant_member_balance_overview 的 rechargeCardList / giveCardList 需要展开为独立列(而非 JSONB),以便 DWS 层直接查询。
|
||
|
||
## Changed
|
||
|
||
| 文件 | 变更类型 | 说明 |
|
||
|------|----------|------|
|
||
| `docs/api-reference/samples/member_consumption_statistics.json` | 新建 | 新 API 的 JSON 样本 |
|
||
| `docs/api-reference/samples/role_area_association.json` | 删除 | 旧 API 样本 |
|
||
| `docs/api-reference/member_consumption_statistics.md` | 新建 | 新 API 参考文档(11 个字段详解) |
|
||
| `docs/api-reference/role_area_association.md` | 删除 | 旧 API 文档 |
|
||
| `docs/api-reference/endpoints/role_area_association.md` | 删除 | 旧 API 文档副本 |
|
||
| `docs/api-reference/api_registry.json` | 修改 | 替换 role_area_association 条目为 member_consumption_statistics;tenant_member_balance_overview 的 ods_table 从 null 改为表名 |
|
||
| `docs/api-reference/README.md` | 修改 | 索引表更新 |
|
||
| `docs/api-reference/tenant_member_balance_overview.md` | 修改 | ODS 表标注从"无"改为"待建" |
|
||
|
||
## Risk / Verify
|
||
|
||
- 风险:纯文档变更,无运行时影响。role_area_association 的旧文档已删除,如需恢复可从 git 历史找回。
|
||
- 验证步骤:
|
||
1. `ls docs/api-reference/samples/member_consumption_statistics.json` → 文件存在
|
||
2. `ls docs/api-reference/member_consumption_statistics.md` → 文件存在
|
||
3. `python -c "import json; d=json.load(open('docs/api-reference/api_registry.json')); ids=[x['id'] for x in d]; assert 'member_consumption_statistics' in ids; assert 'role_area_association' not in ids; print('OK')"` → OK
|