# AI 变更日志

本文件记录所有由 AI 辅助完成的代码变更，按时间倒序排列。

---

## 2026-03-19 18:46:00 — card_type_id 年卡/月卡映射文档同步

**Prompt-ID**: P20260319-174017 | **审计记录**: [docs/audit/changes/2026-03-19__card-type-id-doc-sync.md](docs/audit/changes/2026-03-19__card-type-id-doc-sync.md)

- `apps/etl/connectors/feiqiu/docs/api-reference/endpoints/member_stored_value_cards.md`：card_type_id 枚举改为表格，补充年卡/月卡
- `apps/etl/connectors/feiqiu/docs/api-reference/endpoints/member_balance_changes.md`：card_type_id 枚举补充年卡/月卡，"四种卡型"→"六种卡型"
- `apps/etl/connectors/feiqiu/docs/api-reference/summary/member_balance_changes.md`：card_type_id 和 memberCardTypeName 枚举补充年卡/月卡
- `apps/etl/connectors/feiqiu/docs/database/DWS/main/BD_manual_dws_finance_recharge_summary.md`：新增"其他卡类型"段落标注年卡/月卡未被统计
- `apps/etl/connectors/feiqiu/docs/etl_tasks/dws_tasks.md`：两处卡类型映射表补充年卡/月卡行
- `docs/prd/specs/P12-gift-card-breakdown.md`：新增 P12 礼品卡矩阵细分 PRD

## 2026-03-19 17:40:17 — fdw_queries level 映射硬编码修复（P2-9）

**Prompt-ID**: P20260319-174017 | **审计记录**: [docs/audit/changes/2026-03-19__level-map-hardcode-fix.md](docs/audit/changes/2026-03-19__level-map-hardcode-fix.md)

- `apps/backend/app/services/fdw_queries.py`：新增 `get_level_map()` 从 `v_cfg_assistant_level_price` 动态读取等级映射；`get_assistant_info()` 和 `get_all_assistants()` 删除硬编码 `_level_map`，改用动态查询

---

## 2026-03-19 16:45:10 — coach_service 绩效档位硬编码修复

**Prompt-ID**: P20260319-163903 | **审计记录**: [docs/audit/changes/2026-03-19__coach-tier-hardcode-fix.md](docs/audit/changes/2026-03-19__coach-tier-hardcode-fix.md)

- `apps/backend/app/services/coach_service.py`：删除 `DEFAULT_TIER_NODES` 硬编码，替换为 `_FALLBACK_TIER_NODES`（降级用）；`_build_tier_nodes()` 改为从 `cfg_performance_tier` 配置表动态读取；`perf_target` 改为根据 tier_nodes 动态推算
- `apps/backend/app/services/fdw_queries.py`：更新 `get_salary_calc()` 中 tier_nodes 注释，明确由 coach_service 从配置表读取
