在准备环境前提交次全部更改。
This commit is contained in:
54
docs/audit/changes/2026-02-14__json-refresh-md-patch.md
Normal file
54
docs/audit/changes/2026-02-14__json-refresh-md-patch.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 审计记录:全量 JSON 刷新 + MD 文档补全 + 数据路径修正
|
||||
|
||||
- 日期:2026-02-14(Asia/Shanghai)
|
||||
- Prompt-ID:P20260214-060000、P20260214-061000
|
||||
- 原始原因:用户发现 JSON 样本为单条快照,缺少条件性字段,导致 .md 文档与实际 API 返回不一致。要求重新获取 100 条数据、遍历所有记录提取最全字段、补全 .md 文档、更新比对报告。
|
||||
- 直接原因:旧 JSON 样本仅含 1 条记录,无法覆盖所有可能字段;api_registry.json 中 17 个端点的 data_path 与实际 API 返回路径不一致。
|
||||
|
||||
## Changed
|
||||
|
||||
| 文件 | 变更类型 | 说明 |
|
||||
|------|----------|------|
|
||||
| `scripts/refresh_json_and_audit.py` | 新建 | 全量 JSON 刷新 + MD 比对 + 自动补全脚本 |
|
||||
| `docs/api-reference/api_registry.json` | 修改 | 17 个端点的 data_path 修正为实际 API 返回路径 |
|
||||
| `docs/api-reference/samples/*.json` | 修改 | 全部 24 个 JSON 样本刷新为 100 条数据 |
|
||||
| `docs/api-reference/*.md`(24 个) | 修改 | 新增"响应数据路径"行;10 个文档补全共 39 个缺失字段 |
|
||||
| `docs/reports/json_refresh_audit.json` | 新建 | JSON vs MD 比对结果(24/24 通过) |
|
||||
| `docs/reports/api_ods_comparison_v3_fixed.md` | 更新 | 重新生成比对报告(API独有 0→4,ODS独有 47→12,完全对齐 9→15) |
|
||||
| `docs/reports/api_ods_comparison_v3_fixed.json` | 更新 | 对应 JSON 格式报告 |
|
||||
|
||||
## 补全字段的 10 个文档
|
||||
|
||||
| 文档 | 补全字段数 |
|
||||
|------|-----------|
|
||||
| table_fee_transactions.md | 3(activity_discount_amount, order_consumption_type, real_service_money) |
|
||||
| tenant_goods_master.md | 1(commoditycode) |
|
||||
| store_goods_sales_records.md | 7(ordergoodsid, siteid, sitename 等) |
|
||||
| store_goods_master.md | 11(goodsstockwarninginfo, time_slot_sale, audit_status 等) |
|
||||
| member_profiles.md | 2(person_tenant_org_id, person_tenant_org_name) |
|
||||
| member_stored_value_cards.md | 7(assistantcarddeduct, cardsettlededuct 等) |
|
||||
| member_balance_changes.md | 3(cardtypename, principalbalance, tenantname) |
|
||||
| group_buy_packages.md | 2(tableareanamelist, tenanttableareaidlist) |
|
||||
| group_buy_redemption_records.md | 2(coupon_channel, coupon_remark) |
|
||||
| site_tables_master.md | 1(tableprofile) |
|
||||
|
||||
## api_registry.json data_path 修正(17 个)
|
||||
|
||||
修正前多数为 `data.list`,修正后为实际 API 返回路径,例如:
|
||||
- assistant_accounts_master: `data.list` → `data.assistantInfos`
|
||||
- settlement_records: `data.list` → `data.settleList`
|
||||
- member_profiles: `data.list` → `data.tenantMemberInfos`
|
||||
- 等(详见 refresh_json_and_audit.py 运行日志)
|
||||
|
||||
## 变更影响审查
|
||||
|
||||
- `api_registry.json` 的 data_path 仅被 `scripts/compare_api_ods*.py` 和 `scripts/refresh_json_and_audit.py` 读取,不被 ETL 运行时代码使用
|
||||
- 无逻辑改动,无运行时影响
|
||||
- 不需要更新 product.md / tech.md / README.md
|
||||
|
||||
## Risk / Verify
|
||||
|
||||
- 风险:纯文档和脚本变更,无运行时影响
|
||||
- 验证:`python scripts/refresh_json_and_audit.py` 输出 24/24 通过
|
||||
- 验证:`python scripts/run_compare_v3_fixed.py` 重新生成比对报告
|
||||
- 回归范围:无(不影响 ETL Connector 或数据库)
|
||||
Reference in New Issue
Block a user