init: 项目初始提交 - NeoZQYY Monorepo 完整代码
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# ODS 清理与文档标注 — 审计记录
|
||||
|
||||
> Prompt-ID: P20260214-070000
|
||||
|
||||
## 日期
|
||||
|
||||
2026-02-14(Asia/Shanghai)
|
||||
|
||||
## 原始原因
|
||||
|
||||
用户 Prompt(5 项任务合并执行):
|
||||
1. table_fee_discount_records — 添加 8 个 tableProfile 展开字段到 .md 文档
|
||||
2. store_goods_sales_records — 删除 ODS 的 option_name 列
|
||||
3. store_goods_master — 标记 goodsstockwarninginfo 和 time_slot_sale 为忽略
|
||||
4. member_stored_value_cards — 删除 ODS 的 able_site_transfer 列
|
||||
5. group_buy_packages — 标记 tableareanamelist 和 tenanttableareaidlist 为忽略
|
||||
|
||||
## 直接原因
|
||||
|
||||
API vs ODS 比对报告(v3-fixed)中发现:
|
||||
- 2 个 ODS 列(option_name、able_site_transfer)在 API JSON 中不存在且全 NULL → 删除
|
||||
- 4 个 API 独有字段(goodsstockwarninginfo、time_slot_sale、tableareanamelist、tenanttableareaidlist)暂无入 ODS 需求 → 文档标记忽略
|
||||
- 8 个 tableProfile 展开字段已存在于 ODS 但未在 API 文档中记录 → 补充文档
|
||||
|
||||
## Changed
|
||||
|
||||
| 文件 | 变更类型 | 说明 |
|
||||
|------|----------|------|
|
||||
| `billiards_ods.store_goods_sales_records` | DB DROP COLUMN | 删除 `option_name` 列 |
|
||||
| `billiards_ods.member_stored_value_cards` | DB DROP COLUMN | 删除 `able_site_transfer` 列 |
|
||||
| `database/migrations/20260214_drop_ods_option_name_able_site_transfer.sql` | 新建 | 迁移脚本 |
|
||||
| `database/schema_ODS_doc.sql` | 修改 | 注释化两列定义 |
|
||||
| `docs/api-reference/table_fee_discount_records.md` | 修改 | 新增 4.7 ODS 展开字段章节 + AI_CHANGELOG |
|
||||
| `docs/api-reference/store_goods_master.md` | 修改 | goodsstockwarninginfo/time_slot_sale 标记"暂不入 ODS" |
|
||||
| `docs/api-reference/group_buy_packages.md` | 修改 | tableareanamelist/tenanttableareaidlist 标记"暂不入 ODS" |
|
||||
| `scripts/run_compare_v3_fixed.py` | 修改 | 移除 option_name/able_site_transfer 的分类条目 |
|
||||
| `scripts/ods_columns.json` | 修改 | 移除两列 |
|
||||
| `docs/reports/api_ods_comparison_v3_fixed.md` | 重新生成 | ODS 独有 12→2,完全对齐 15→18 |
|
||||
| `docs/bd_manual/ODS/20260214_drop_ods_option_name_able_site_transfer.md` | 已创建 | BD Manual 变更记录 |
|
||||
|
||||
## Risk / Verify
|
||||
|
||||
- 风险:ODS 入库 INSERT/UPSERT 语句中若包含 option_name/able_site_transfer 需移除(已确认 DWD 层无映射)
|
||||
- 回归范围:ODS 抓取任务(store_goods_sales_records、member_stored_value_cards)
|
||||
- 验证步骤:
|
||||
1. `SELECT column_name FROM information_schema.columns WHERE table_schema='billiards_ods' AND table_name='store_goods_sales_records' AND column_name='option_name';` → 0 行
|
||||
2. `SELECT column_name FROM information_schema.columns WHERE table_schema='billiards_ods' AND table_name='member_stored_value_cards' AND column_name='able_site_transfer';` → 0 行
|
||||
3. `python scripts/run_compare_v3_fixed.py` → API独有=4, ODS独有=2
|
||||
|
||||
## DB 结构变更回滚
|
||||
|
||||
```sql
|
||||
ALTER TABLE billiards_ods.store_goods_sales_records ADD COLUMN option_name TEXT;
|
||||
ALTER TABLE billiards_ods.member_stored_value_cards ADD COLUMN able_site_transfer INTEGER;
|
||||
```
|
||||
|
||||
注意:回滚后两列数据均为 NULL(与删除前一致),无数据丢失。
|
||||
|
||||
## 变更影响审查结论
|
||||
|
||||
- 判定:本轮为「逻辑改动」(DB schema 变更:删除 2 个 ODS 列)
|
||||
- 评估范围:product.md / tech.md / structure.md / README.md / gui/README.md / docs/README.md / scripts/README.md / tasks/README.md / tests/README.md / database/README.md
|
||||
- 需更新:`database/README.md`(迁移脚本列表新增 `20260214_drop_ods_option_name_able_site_transfer.sql`)
|
||||
- 无需更新:其余 9 个文档(本次变更不影响产品功能、技术栈、项目结构、运行方式)
|
||||
- BD Manual:已在 `docs/bd_manual/ODS/20260214_drop_ods_option_name_able_site_transfer.md` 中同步
|
||||
Reference in New Issue
Block a user