init: 项目初始提交 - NeoZQYY Monorepo 完整代码

This commit is contained in:
Neo
2026-02-15 14:58:14 +08:00
commit ded6dfb9d8
769 changed files with 182616 additions and 0 deletions

View File

@@ -0,0 +1,421 @@
{
"generated_at": "2026-02-13 03:43:23",
"summary": {
"total_entities": 23,
"ok_count": 22,
"error_count": 1,
"total_new_fields": 51,
"total_removed_fields": 0,
"entities_with_drift": 13
},
"entities": [
{
"table": "assistant_accounts_master",
"endpoint": "/PersonnelManagement/SearchAssistantInfo",
"status": "ok",
"local_field_count": 62,
"api_field_count": 62,
"common_fields": 62,
"new_fields": [],
"removed_fields": []
},
{
"table": "settlement_records",
"endpoint": "/Site/GetAllOrderSettleList",
"status": "ok",
"local_field_count": 86,
"api_field_count": 91,
"common_fields": 86,
"new_fields": [
{"name": "electricityAdjustMoney", "type": "float"},
{"name": "electricityMoney", "type": "float"},
{"name": "merVouSalesAmount", "type": "float"},
{"name": "plCouponSaleAmount", "type": "float"},
{"name": "realElectricityMoney", "type": "float"}
],
"removed_fields": [],
"note": "首次比对因使用 pageSize 参数导致 HTTP 1400改用 limit 参数后成功"
},
{
"table": "table_fee_transactions",
"endpoint": "/Site/GetSiteTableOrderDetails",
"status": "ok",
"local_field_count": 39,
"api_field_count": 42,
"common_fields": 39,
"new_fields": [
{
"name": "activity_discount_amount",
"type": "float"
},
{
"name": "order_consumption_type",
"type": "int"
},
{
"name": "real_service_money",
"type": "float"
}
],
"removed_fields": []
},
{
"table": "assistant_service_records",
"endpoint": "/AssistantPerformance/GetOrderAssistantDetails",
"status": "ok",
"local_field_count": 64,
"api_field_count": 66,
"common_fields": 64,
"new_fields": [
{
"name": "assistantTeamName",
"type": "string"
},
{
"name": "real_service_money",
"type": "float"
}
],
"removed_fields": []
},
{
"table": "assistant_cancellation_records",
"endpoint": "/AssistantPerformance/GetAbolitionAssistant",
"status": "ok",
"local_field_count": 13,
"api_field_count": 13,
"common_fields": 13,
"new_fields": [],
"removed_fields": []
},
{
"table": "store_goods_sales_records",
"endpoint": "/TenantGoods/GetGoodsSalesList",
"status": "ok",
"local_field_count": 50,
"api_field_count": 51,
"common_fields": 50,
"new_fields": [
{"name": "coupon_share_money", "type": "float"}
],
"removed_fields": [],
"note": "需传 isSalesBind/goodsSalesType/startTime/endTime/page/limit 参数"
},
{
"table": "payment_transactions",
"endpoint": "/PayLog/GetPayLogListPage",
"status": "ok",
"local_field_count": 10,
"api_field_count": 10,
"common_fields": 10,
"new_fields": [],
"removed_fields": [],
"note": "首次比对因使用 pageSize 参数导致 HTTP 1400改用 limit 参数后成功;不含 siteProfile 嵌套对象"
},
{
"table": "refund_transactions",
"endpoint": "/Order/GetRefundPayLogList",
"status": "ok",
"local_field_count": 32,
"api_field_count": 32,
"common_fields": 32,
"new_fields": [],
"removed_fields": []
},
{
"table": "platform_coupon_redemption_records",
"endpoint": "/Promotion/GetOfflineCouponConsumePageList",
"status": "ok",
"local_field_count": 26,
"api_field_count": 26,
"common_fields": 26,
"new_fields": [],
"removed_fields": []
},
{
"table": "member_profiles",
"endpoint": "/MemberProfile/GetTenantMemberList",
"status": "ok",
"local_field_count": 15,
"api_field_count": 20,
"common_fields": 15,
"new_fields": [
{
"name": "pay_money_sum",
"type": "float"
},
{
"name": "person_tenant_org_id",
"type": "int"
},
{
"name": "person_tenant_org_name",
"type": "string"
},
{
"name": "recharge_money_sum",
"type": "float"
},
{
"name": "register_source",
"type": "int"
}
],
"removed_fields": []
},
{
"table": "member_stored_value_cards",
"endpoint": "/MemberProfile/GetTenantMemberCardList",
"status": "ok",
"local_field_count": 68,
"api_field_count": 75,
"common_fields": 68,
"new_fields": [
{
"name": "able_share_member_discount",
"type": "int"
},
{
"name": "electricityCardDeduct",
"type": "float"
},
{
"name": "electricity_deduct_radio",
"type": "float"
},
{
"name": "electricity_discount",
"type": "float"
},
{
"name": "member_grade",
"type": "int"
},
{
"name": "principal_balance",
"type": "float"
},
{
"name": "rechargeFreezeBalance",
"type": "float"
}
],
"removed_fields": []
},
{
"table": "member_balance_changes",
"endpoint": "/MemberProfile/GetMemberCardBalanceChange",
"status": "ok",
"local_field_count": 25,
"api_field_count": 28,
"common_fields": 25,
"new_fields": [
{
"name": "principal_after",
"type": "float"
},
{
"name": "principal_before",
"type": "float"
},
{
"name": "principal_data",
"type": "float"
}
],
"removed_fields": []
},
{
"table": "recharge_settlements",
"endpoint": "/Site/GetRechargeSettleList",
"status": "ok",
"local_field_count": 86,
"api_field_count": 91,
"common_fields": 86,
"new_fields": [
{"name": "electricityAdjustMoney", "type": "float"},
{"name": "electricityMoney", "type": "float"},
{"name": "merVouSalesAmount", "type": "float"},
{"name": "plCouponSaleAmount", "type": "float"},
{"name": "realElectricityMoney", "type": "float"}
],
"removed_fields": [],
"note": "首次比对因使用 pageSize 参数导致 HTTP 1400改用 limit 参数后成功"
},
{
"table": "group_buy_packages",
"endpoint": "/PackageCoupon/QueryPackageCouponList",
"status": "ok",
"local_field_count": 35,
"api_field_count": 40,
"common_fields": 35,
"new_fields": [
{
"name": "is_first_limit",
"type": "int"
},
{
"name": "sort",
"type": "int"
},
{
"name": "tableAreaNameList",
"type": "array"
},
{
"name": "tenantCouponSaleOrderItemId",
"type": "int"
},
{
"name": "tenantTableAreaIdList",
"type": "array"
}
],
"removed_fields": []
},
{
"table": "group_buy_redemption_records",
"endpoint": "/Site/GetSiteTableUseDetails",
"status": "ok",
"local_field_count": 43,
"api_field_count": 52,
"common_fields": 43,
"new_fields": [
{
"name": "assistant_service_share_money",
"type": "float"
},
{
"name": "assistant_share_money",
"type": "float"
},
{
"name": "coupon_sale_id",
"type": "int"
},
{
"name": "good_service_share_money",
"type": "float"
},
{
"name": "goods_share_money",
"type": "float"
},
{
"name": "member_discount_money",
"type": "float"
},
{
"name": "recharge_share_money",
"type": "float"
},
{
"name": "table_service_share_money",
"type": "float"
},
{
"name": "table_share_money",
"type": "float"
}
],
"removed_fields": []
},
{
"table": "goods_stock_summary",
"endpoint": "/TenantGoods/GetGoodsStockReport",
"status": "ok",
"local_field_count": 14,
"api_field_count": 14,
"common_fields": 14,
"new_fields": [],
"removed_fields": []
},
{
"table": "goods_stock_movements",
"endpoint": "/GoodsStockManage/QueryGoodsOutboundReceipt",
"status": "ok",
"local_field_count": 19,
"api_field_count": 19,
"common_fields": 19,
"new_fields": [],
"removed_fields": []
},
{
"table": "site_tables_master",
"endpoint": "/Table/GetSiteTables",
"status": "ok",
"local_field_count": 25,
"api_field_count": 26,
"common_fields": 25,
"new_fields": [
{
"name": "order_id",
"type": "int"
}
],
"removed_fields": []
},
{
"table": "stock_goods_category_tree",
"endpoint": "/TenantGoodsCategory/QueryPrimarySecondaryCategory",
"status": "ok",
"local_field_count": 11,
"api_field_count": 11,
"common_fields": 11,
"new_fields": [],
"removed_fields": []
},
{
"table": "store_goods_master",
"endpoint": "/TenantGoods/GetGoodsInventoryList",
"status": "ok",
"local_field_count": 45,
"api_field_count": 49,
"common_fields": 45,
"new_fields": [
{"name": "commodity_code", "type": "string"},
{"name": "goodsStockWarningInfo", "type": "object"},
{"name": "not_sale", "type": "int"},
{"name": "time_slot_sale", "type": "int"}
],
"removed_fields": [],
"note": "siteId 必须为数组格式 [sid],还需 goodsSecondCategoryId/goodsState/enableStatus/existsGoodsStock/page/limit"
},
{
"table": "table_fee_discount_records",
"endpoint": "/Site/GetTaiFeeAdjustList",
"status": "ok",
"local_field_count": 20,
"api_field_count": 20,
"common_fields": 20,
"new_fields": [],
"removed_fields": []
},
{
"table": "tenant_goods_master",
"endpoint": "/TenantGoods/QueryTenantGoods",
"status": "ok",
"local_field_count": 31,
"api_field_count": 32,
"common_fields": 31,
"new_fields": [
{
"name": "not_sale",
"type": "int"
}
],
"removed_fields": []
},
{
"table": "settlement_ticket_details",
"endpoint": "/Order/GetOrderSettleTicketNew",
"status": "api_unreachable",
"local_field_count": 38,
"api_field_count": 0,
"new_fields": [],
"removed_fields": [],
"note": "上游 API 返回 HTTP 1400可能是请求头过大"
}
]
}

View File

@@ -0,0 +1,182 @@
# API 字段漂移报告
> 生成时间: 2026-02-13 03:43:23最后更新2026-02-13 16:30 — 修正全部 5 个 HTTP 1400 端点)
## 摘要
| 指标 | 值 |
|------|-----|
| 实体总数 | 23 |
| 成功比对 | 22 |
| 不可达/跳过 | 1 |
| 新增字段总数 | 51 |
| 移除字段总数 | 0 |
| 有漂移的实体 | 13 |
## 字段漂移详情
### settlement_records
- 端点: `/Site/GetAllOrderSettleList`(需使用 `limit` 参数,不支持 `pageSize`/`pageNo`
- 本地: 86 字段 | API: 91 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `electricityAdjustMoney` | float |
| `electricityMoney` | float |
| `merVouSalesAmount` | float |
| `plCouponSaleAmount` | float |
| `realElectricityMoney` | float |
### recharge_settlements
- 端点: `/Site/GetRechargeSettleList`(需使用 `limit` 参数,不支持 `pageSize`/`pageNo`
- 本地: 86 字段 | API: 91 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `electricityAdjustMoney` | float |
| `electricityMoney` | float |
| `merVouSalesAmount` | float |
| `plCouponSaleAmount` | float |
| `realElectricityMoney` | float |
### store_goods_sales_records
- 端点: `/TenantGoods/GetGoodsSalesList`(需传 `isSalesBind`/`goodsSalesType`/`startTime`/`endTime`/`page`/`limit`
- 本地: 50 字段 | API: 51 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `coupon_share_money` | float |
### store_goods_master
- 端点: `/TenantGoods/GetGoodsInventoryList``siteId` 必须为数组格式 `[sid]`,还需 `goodsSecondCategoryId`/`goodsState`/`enableStatus`/`existsGoodsStock`/`page`/`limit`
- 本地: 45 字段 | API: 49 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `commodity_code` | string |
| `goodsStockWarningInfo` | object |
| `not_sale` | int |
| `time_slot_sale` | int |
### table_fee_transactions
- 端点: `/Site/GetSiteTableOrderDetails`
- 本地: 39 字段 | API: 42 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `activity_discount_amount` | float |
| `order_consumption_type` | int |
| `real_service_money` | float |
### assistant_service_records
- 端点: `/AssistantPerformance/GetOrderAssistantDetails`
- 本地: 64 字段 | API: 66 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `assistantTeamName` | string |
| `real_service_money` | float |
### member_profiles
- 端点: `/MemberProfile/GetTenantMemberList`
- 本地: 15 字段 | API: 20 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `pay_money_sum` | float |
| `person_tenant_org_id` | int |
| `person_tenant_org_name` | string |
| `recharge_money_sum` | float |
| `register_source` | int |
### member_stored_value_cards
- 端点: `/MemberProfile/GetTenantMemberCardList`
- 本地: 68 字段 | API: 75 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `able_share_member_discount` | int |
| `electricityCardDeduct` | float |
| `electricity_deduct_radio` | float |
| `electricity_discount` | float |
| `member_grade` | int |
| `principal_balance` | float |
| `rechargeFreezeBalance` | float |
### member_balance_changes
- 端点: `/MemberProfile/GetMemberCardBalanceChange`
- 本地: 25 字段 | API: 28 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `principal_after` | float |
| `principal_before` | float |
| `principal_data` | float |
### group_buy_packages
- 端点: `/PackageCoupon/QueryPackageCouponList`
- 本地: 35 字段 | API: 40 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `is_first_limit` | int |
| `sort` | int |
| `tableAreaNameList` | array |
| `tenantCouponSaleOrderItemId` | int |
| `tenantTableAreaIdList` | array |
### group_buy_redemption_records
- 端点: `/Site/GetSiteTableUseDetails`
- 本地: 43 字段 | API: 52 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `assistant_service_share_money` | float |
| `assistant_share_money` | float |
| `coupon_sale_id` | int |
| `good_service_share_money` | float |
| `goods_share_money` | float |
| `member_discount_money` | float |
| `recharge_share_money` | float |
| `table_service_share_money` | float |
| `table_share_money` | float |
### site_tables_master
- 端点: `/Table/GetSiteTables`
- 本地: 25 字段 | API: 26 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `order_id` | int |
### tenant_goods_master
- 端点: `/TenantGoods/QueryTenantGoods`
- 本地: 31 字段 | API: 32 字段
**🆕 API 新增(本地样本不存在):**
| 字段名 | 类型 |
|--------|------|
| `not_sale` | int |
## 字段一致的实体
| 实体 | 端点 | 字段数 |
|------|------|--------|
| assistant_accounts_master | `/PersonnelManagement/SearchAssistantInfo` | 62 |
| assistant_cancellation_records | `/AssistantPerformance/GetAbolitionAssistant` | 13 |
| payment_transactions | `/PayLog/GetPayLogListPage`(需 `limit` 参数) | 10 |
| refund_transactions | `/Order/GetRefundPayLogList` | 32 |
| platform_coupon_redemption_records | `/Promotion/GetOfflineCouponConsumePageList` | 26 |
| goods_stock_summary | `/TenantGoods/GetGoodsStockReport` | 14 |
| goods_stock_movements | `/GoodsStockManage/QueryGoodsOutboundReceipt` | 19 |
| stock_goods_category_tree | `/TenantGoodsCategory/QueryPrimarySecondaryCategory` | 11 |
| table_fee_discount_records | `/Site/GetTaiFeeAdjustList` | 20 |
## 不可达/跳过的实体
| 实体 | 端点 | 状态 | 说明 |
|------|------|------|------|
| settlement_ticket_details | `/Order/GetOrderSettleTicketNew` | 跳过 | 暂不处理(先不管) |
## API 分页参数兼容性说明
| 端点 | `pageSize`/`pageNo` | `page`/`limit` | 备注 |
|------|:---:|:---:|------|
| `/Site/GetAllOrderSettleList` | ❌ 1400 | ✅ | 需同时传 `rangeStartTime`/`rangeEndTime` |
| `/Site/GetRechargeSettleList` | ❌ 1400 | ✅ | 需同时传 `rangeStartTime`/`rangeEndTime` |
| `/PayLog/GetPayLogListPage` | ❌ 1400 | ✅ | 无需时间参数 |
| `/TenantGoods/GetGoodsInventoryList` | ❌ 1400 | ✅ | `siteId` 必须为数组 `[sid]`;需传 `goodsSecondCategoryId`/`goodsState`/`enableStatus`/`existsGoodsStock` |
| `/TenantGoods/GetGoodsSalesList` | ❌ 空数据 | ✅ | 需传 `isSalesBind`/`goodsSalesType`/`startTime`/`endTime` |
| 其余端点 | ✅ | ✅ | 两种参数均可 |
---
<!-- AI_CHANGELOG
- 日期: 2026-02-13
- Prompt: P20260213-153000 / P20260213-163000 — 完成 API 字段漂移报告全量更新
- 直接原因: 首次比对时多个端点因参数不正确导致失败,分批修正后完成全部 22/23 实体比对
- 变更摘要:
- P20260213-153000: 修正 settlement_records / recharge_settlements / payment_transactions改用 limit 参数)
- P20260213-163000: 修正 store_goods_sales_records补充 isSalesBind/goodsSalesType 等必需参数)和 store_goods_mastersiteId 改为数组格式 + 补充必需参数)
- 最终统计ok 22, error 1(跳过), drift 13, new_fields 51
- 风险与验证: 纯文档更新,用浏览器抓包参数验证 API 调用正确性
-->

View File

@@ -0,0 +1,431 @@
# API JSON 字段 vs MD 文档对比报告
生成时间2026-02-14 10:30:00 (Asia/Shanghai)
数据范围2026-01-01 00:00:00 ~ 2026-02-13 00:00:00
每接口获取100 条
> 本报告于 2026-02-14 更新:修正占位符描述为正式中文说明,合并 member_stored_value_cards 大小写重复字段,去除 group_buy_packages 重复 type 行。
## 汇总
| 状态 | 数量 |
|------|------|
| ✅ 完全一致 | 17 |
| ⚠️ 有新字段(已补充) | 7 |
| ⏭️ 跳过 | 1 |
| 💥 错误 | 0 |
| 合计 | 25 |
## 各接口详情
### assistant_accounts_master (助教账号主数据)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 69 |
| JSON 顶层字段数 | 62 |
| MD 响应字段数 | 62 |
| 数据路径 | `data.assistantInfos` |
| 前5条最全记录字段数 | [62, 62, 62, 62, 62] |
### settlement_records (结账记录)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 2 |
| MD 响应字段数 | 91 |
| 数据路径 | `data.settleList` |
| 前5条最全记录字段数 | [2, 2, 2, 2, 2] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `settleList` | object | None | 100 |
| `siteProfile` | object | None | 100 |
MD 中有但本次 JSON 未出现的字段(可能为条件性字段):`activityDiscount`, `address`, `adjustAmount`, `allCouponDiscount`, `assistantCxMoney`, `assistantManualDiscount`, `assistantPdMoney`, `assistantPromotionMoney`, `attendance_distance`, `attendance_enabled`, `auto_light`, `avatar`, `balanceAmount`, `business_tel`, `canBeRevoked`, `cardAmount`, `cashAmount`, `consumeMoney`, `couponAmount`, `couponSaleAmount`, `createTime`, `customer_service_qrcode`, `customer_service_wechat`, `electricityAdjustMoney`, `electricityMoney`, `fixed_pay_qrCode`, `full_address`, `giftCardAmount`, `goodsMoney`, `goodsPromotionMoney`, `id`, `isActivity`, `isBindMember`, `isFirst`, `isUseCoupon`, `isUseDiscount`, `latitude`, `light_status`, `light_token`, `light_type`, `longitude`, `memberCardTypeName`, `memberDiscountAmount`, `memberId`, `memberName`, `memberPhone`, `merVouSalesAmount`, `onlineAmount`, `operatorId`, `operatorName`, `orderRemark`, `org_id`, `payAmount`, `payTime`, `paymentMethod`, `plCouponSaleAmount`, `pointAmount`, `pointDiscountCost`, `pointDiscountPrice`, `prepayMoney`, `prod_env`, `realElectricityMoney`, `realGoodsMoney`, `rechargeCardAmount`, `refundAmount`, `revokeOrderId`, `revokeOrderName`, `revokeTime`, `roundingAmount`, `salesManName`, `salesManUserId`, `serialNumber`, `serviceMoney`, `settleName`, `settleRelateId`, `settleStatus`, `settleType`, `shop_name`, `shop_status`, `siteId`, `siteName`, `site_label`, `site_type`, `tableChargeMoney`, `tableId`, `tenantId`, `tenantMemberCardId`, `tenant_id`, `tenant_site_region_id`, `wifi_name`, `wifi_password`
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
嵌套对象 `settleList` 含 66 个子字段MD 中已记录为 object不逐字段展开
### assistant_service_records (助教服务流水)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 66 |
| MD 响应字段数 | 64 |
| 数据路径 | `data.orderAssistantDetails` |
| 前5条最全记录字段数 | [66, 66, 66, 66, 66] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `assistantTeamName` | string | 1组 | 100 |
| `real_service_money` | number | None | 100 |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### assistant_cancellation_records (助教撤销记录)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 37 |
| JSON 顶层字段数 | 13 |
| MD 响应字段数 | 13 |
| 数据路径 | `data.abolitionAssistants` |
| 前5条最全记录字段数 | [13, 13, 13, 13, 13] |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### table_fee_transactions (台费流水)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 42 |
| MD 响应字段数 | 39 |
| 数据路径 | `data.siteTableUseDetailsList` |
| 前5条最全记录字段数 | [42, 42, 42, 42, 42] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `activity_discount_amount` | number | None | 100 |
| `order_consumption_type` | integer | 1 | 100 |
| `real_service_money` | number | None | 100 |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### table_fee_discount_records (台费优惠记录)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 20 |
| MD 响应字段数 | 20 |
| 数据路径 | `data.taiFeeAdjustInfos` |
| 前5条最全记录字段数 | [20, 20, 20, 20, 20] |
嵌套对象 `tableProfile` 含 11 个子字段MD 中已记录为 object不逐字段展开
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### payment_transactions (支付流水)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 11 |
| MD 响应字段数 | 11 |
| 数据路径 | `data.list` |
| 前5条最全记录字段数 | [11, 11, 11, 11, 11] |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### refund_transactions (退款流水)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 13 |
| JSON 顶层字段数 | 32 |
| MD 响应字段数 | 32 |
| 数据路径 | `data.list` |
| 前5条最全记录字段数 | [32, 32, 32, 32, 32] |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### platform_coupon_redemption_records (平台券核销记录)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 26 |
| MD 响应字段数 | 26 |
| 数据路径 | `data.list` |
| 前5条最全记录字段数 | [26, 26, 26, 26, 26] |
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
### tenant_goods_master (租户商品主数据)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 32 |
| MD 响应字段数 | 32 |
| 数据路径 | `data.tenantGoodsList` |
| 前5条最全记录字段数 | [32, 32, 32, 32, 32] |
### store_goods_sales_records (门店商品销售记录)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 51 |
| MD 响应字段数 | 51 |
| 数据路径 | `data.orderGoodsLedgers` |
| 前5条最全记录字段数 | [51, 51, 51, 51, 51] |
### store_goods_master (门店商品库存主数据)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 49 |
| MD 响应字段数 | 45 |
| 数据路径 | `data.orderGoodsList` |
| 前5条最全记录字段数 | [49, 49, 49, 49, 49] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `commodity_code` | string | 10000002 | 100 |
| `goodsStockWarningInfo` | object | None | 100 |
| `not_sale` | integer | 2 | 100 |
| `time_slot_sale` | integer | 2 | 100 |
嵌套对象 `goodsStockWarningInfo` 含 5 个子字段MD 中已记录为 object不逐字段展开
### stock_goods_category_tree (商品分类树)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 9 |
| JSON 顶层字段数 | 11 |
| MD 响应字段数 | 13 |
| 数据路径 | `data.goodsCategoryList` |
| 前5条最全记录字段数 | [11, 11, 11, 11, 11] |
MD 中有但本次 JSON 未出现的字段(可能为条件性字段):`goodsCategoryList`, `total`
### goods_stock_movements (库存出入库流水)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 19 |
| MD 响应字段数 | 19 |
| 数据路径 | `data.queryDeliveryRecordsList` |
| 前5条最全记录字段数 | [19, 19, 19, 19, 19] |
### member_profiles (会员档案)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 20 |
| MD 响应字段数 | 20 |
| 数据路径 | `data.tenantMemberInfos` |
| 前5条最全记录字段数 | [20, 20, 20, 20, 20] |
### member_stored_value_cards (会员储值卡)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 75 |
| MD 响应字段数 | 75 |
| 数据路径 | `data.tenantMemberCards` |
| 前5条最全记录字段数 | [75, 75, 75, 75, 75] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `able_share_member_discount` | integer | 1 | 100 |
| `electricity_deduct_radio` | number | 100.0 | 100 |
| `electricity_discount` | number | 10.0 | 100 |
| `member_grade` | integer | 2790683528022856 | 100 |
| `principal_balance` | number | 0.0 | 100 |
> 注:`electricityCardDeduct` / `rechargeFreezeBalance` 为已有字段 `electricitycarddeduct` / `rechargefreezebalance` 的驼峰写法变体,已合并去重。
MD 中有但本次 JSON 未出现的字段(可能为条件性字段):无
### recharge_settlements (充值结算记录)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 90 |
| JSON 顶层字段数 | 2 |
| MD 响应字段数 | 66 |
| 数据路径 | `data.settleList` |
| 前5条最全记录字段数 | [2, 2, 2, 2, 2] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `settleList` | object | None | 90 |
| `siteProfile` | object | None | 90 |
MD 中有但本次 JSON 未出现的字段(可能为条件性字段):`activityDiscount`, `adjustAmount`, `allCouponDiscount`, `assistantCxMoney`, `assistantManualDiscount`, `assistantPdMoney`, `assistantPromotionMoney`, `balanceAmount`, `canBeRevoked`, `cardAmount`, `cashAmount`, `consumeMoney`, `couponAmount`, `couponSaleAmount`, `createTime`, `electricityAdjustMoney`, `electricityMoney`, `giftCardAmount`, `goodsMoney`, `goodsPromotionMoney`, `id`, `isActivity`, `isBindMember`, `isFirst`, `isUseCoupon`, `isUseDiscount`, `memberCardTypeName`, `memberDiscountAmount`, `memberId`, `memberName`, `memberPhone`, `merVouSalesAmount`, `onlineAmount`, `operatorId`, `operatorName`, `orderRemark`, `payAmount`, `payTime`, `paymentMethod`, `plCouponSaleAmount`, `pointAmount`, `pointDiscountCost`, `pointDiscountPrice`, `prepayMoney`, `realElectricityMoney`, `realGoodsMoney`, `rechargeCardAmount`, `refundAmount`, `revokeOrderId`, `revokeOrderName`, `revokeTime`, `roundingAmount`, `salesManName`, `salesManUserId`, `serialNumber`, `serviceMoney`, `settleName`, `settleRelateId`, `settleStatus`, `settleType`, `siteId`, `siteName`, `tableChargeMoney`, `tableId`, `tenantId`, `tenantMemberCardId`
嵌套对象 `siteProfile` 含 26 个子字段MD 中已记录为 object不逐字段展开
嵌套对象 `settleList` 含 66 个子字段MD 中已记录为 object不逐字段展开
### member_balance_changes (会员余额变动)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 28 |
| MD 响应字段数 | 28 |
| 数据路径 | `data.tenantMemberCardLogs` |
| 前5条最全记录字段数 | [28, 28, 28, 28, 28] |
### group_buy_packages (团购套餐定义)
| 项目 | 值 |
|------|-----|
| 状态 | ⚠️ gap |
| 获取记录数 | 12 |
| JSON 顶层字段数 | 40 |
| MD 响应字段数 | 34 |
| 数据路径 | `data.packageCouponList` |
| 前5条最全记录字段数 | [40, 40, 40, 40, 40] |
新发现字段(已补充到 MD
| 字段名 | 类型 | 示例 | 出现次数 |
|--------|------|------|----------|
| `is_first_limit` | integer | 1 | 12 |
| `sort` | integer | 100 | 12 |
| `tableAreaNameList` | array | None | 12 |
| `tenantCouponSaleOrderItemId` | integer | None | 12 |
| `tenantTableAreaIdList` | array | None | 12 |
> 注:`type` 字段已存在于原始文档中(#15本次刷新确认其仍在返回无需重复添加。
### group_buy_redemption_records (团购核销记录)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 52 |
| MD 响应字段数 | 52 |
| 数据路径 | `data.siteTableUseDetailsList` |
| 前5条最全记录字段数 | [52, 52, 52, 52, 52] |
### goods_stock_summary (库存汇总报表)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 100 |
| JSON 顶层字段数 | 14 |
| MD 响应字段数 | 14 |
| 数据路径 | `data.list` |
| 前5条最全记录字段数 | [14, 14, 14, 14, 14] |
### site_tables_master (台桌主数据)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 74 |
| JSON 顶层字段数 | 26 |
| MD 响应字段数 | 26 |
| 数据路径 | `data.siteTables` |
| 前5条最全记录字段数 | [26, 26, 26, 26, 26] |
### settlement_ticket_details (结账小票明细)
| 项目 | 值 |
|------|-----|
| 状态 | ⏭️ skipped |
| 获取记录数 | 0 |
| JSON 顶层字段数 | 0 |
| MD 响应字段数 | 0 |
| 数据路径 | `None` |
### member_consumption_statistics (会员消费统计)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 2 |
| JSON 顶层字段数 | 12 |
| MD 响应字段数 | 12 |
| 数据路径 | `data.memberConsumptionStatisticsList` |
| 前5条最全记录字段数 | [12, 12] |
### tenant_member_balance_overview (会员余额总览)
| 项目 | 值 |
|------|-----|
| 状态 | ✅ ok |
| 获取记录数 | 1 |
| JSON 顶层字段数 | 9 |
| MD 响应字段数 | 12 |
| 数据路径 | `data` |
| 前5条最全记录字段数 | [9] |
MD 中有但本次 JSON 未出现的字段(可能为条件性字段):`balance`, `cardTypeName`, `principalBalance`
## 附录siteProfile 通用字段参考
以下字段在大多数接口的 `siteProfile` 嵌套对象中出现,为门店信息快照(冗余),各接口结构一致:
| 字段 | 类型 | 说明 |
|------|------|------|
| `id` | integer | 门店 ID |
| `org_id` | integer | 组织 ID |
| `shop_name` | string | 门店名称 |
| `avatar` | string | 门店头像 URL |
| `business_tel` | string | 门店电话 |
| `full_address` | string | 完整地址 |
| `address` | string | 简短地址 |
| `longitude` | number | 经度 |
| `latitude` | number | 纬度 |
| `tenant_site_region_id` | integer | 区域 ID |
| `tenant_id` | integer | 租户 ID |
| `auto_light` | integer | 自动开灯 |
| `attendance_distance` | integer | 考勤距离 |
| `attendance_enabled` | integer | 考勤启用 |
| `wifi_name` | string | WiFi 名称 |
| `wifi_password` | string | WiFi 密码 |
| `customer_service_qrcode` | string | 客服二维码 |
| `customer_service_wechat` | string | 客服微信 |
| `fixed_pay_qrCode` | string | 固定支付二维码 |
| `prod_env` | integer | 生产环境标识 |
| `light_status` | integer | 灯光状态 |
| `light_type` | integer | 灯光类型 |
| `light_token` | string | 灯光控制 token |
| `site_type` | integer | 门店类型 |
| `site_label` | string | 门店标签 |
| `shop_status` | integer | 门店状态 |
<!--
AI_CHANGELOG:
- 日期: 2026-02-14
- Prompt: P20260214-103000 — 上下文传递续接,修正占位符描述并更新报告
- 直接原因: 修正 member_stored_value_cards 大小写重复字段误报、group_buy_packages 重复 type 行,更新报告时间戳
- 变更摘要: 更新时间戳至 10:30:00修正 member_stored_value_cards 新字段列表(去除假重复,列出 5 个真正新字段),修正 group_buy_packages 去除 type 并添加注释
- 风险与验证: 纯文档修正,无运行时影响;验证:报告中各接口字段数与 JSON 样本一致
-->

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
# API JSON 字段 vs ODS 表列 对比报告
> 自动生成于 2026-02-13 | 数据来源:数据库实际表结构 + API 参考文档
> 比对逻辑camelCase → snake_case 归一化匹配 + 去下划线纯小写兜底
## 汇总
| 指标 | 值 |
|------|----|
| 比对表数 | 22 |
| 完全一致(含大小写归一化) | 21 |
| 脚本标记差异 | 1`stock_goods_category_tree`,经人工确认为响应结构差异,无需操作) |
| ODS 真正缺失字段 | 0 |
| ODS 多余列总数 | 66多数为 ETL 自行添加的辅助列,如 `tenant_id``settlelist` 等) |
| 需要执行的 ALTER SQL | 0 |
| **结论** | **22 张 ODS 表全部与 API JSON 字段对齐,无需迁移** |
## 逐表对比总览
| # | API ID | 中文名 | ODS 表 | 状态 | API字段 | ODS列 | 精确匹配 | 大小写匹配 | ODS缺失 | ODS多余 |
|---|--------|--------|--------|------|---------|-------|----------|-----------|---------|--------|
| 1 | assistant_accounts_master | 助教账号主数据 | assistant_accounts_master | ✅ | 61 | 62 | 61 | 0 | 0 | 1 |
| 2 | assistant_cancellation_records | 助教撤销记录 | assistant_cancellation_records | ✅ | 13 | 14 | 1 | 12 | 0 | 1 |
| 3 | assistant_service_records | 助教服务流水 | assistant_service_records | ✅ | 64 | 66 | 58 | 6 | 0 | 2 |
| 4 | goods_stock_movements | 库存出入库流水 | goods_stock_movements | ✅ | 19 | 19 | 3 | 16 | 0 | 0 |
| 5 | goods_stock_summary | 库存汇总报表 | goods_stock_summary | ✅ | 14 | 14 | 0 | 14 | 0 | 0 |
| 6 | group_buy_packages | 团购套餐定义 | group_buy_packages | ✅ | 35 | 38 | 35 | 0 | 0 | 3 |
| 7 | group_buy_redemption_records | 团购核销记录 | group_buy_redemption_records | ✅ | 43 | 52 | 39 | 4 | 0 | 9 |
| 8 | member_balance_changes | 会员余额变动 | member_balance_changes | ✅ | 25 | 28 | 20 | 5 | 0 | 3 |
| 9 | member_profiles | 会员档案 | member_profiles | ✅ | 15 | 20 | 15 | 0 | 0 | 5 |
| 10 | member_stored_value_cards | 会员储值卡 | member_stored_value_cards | ✅ | 68 | 76 | 52 | 16 | 0 | 8 |
| 11 | payment_transactions | 支付流水 | payment_transactions | ✅ | 11 | 12 | 10 | 1 | 0 | 1 |
| 12 | platform_coupon_redemption_records | 平台券核销记录 | platform_coupon_redemption_records | ✅ | 26 | 26 | 25 | 1 | 0 | 0 |
| 13 | recharge_settlements | 充值结算记录 | recharge_settlements | ✅ | 66 | 67 | 1 | 65 | 0 | 1 |
| 14 | refund_transactions | 退款流水 | refund_transactions | ✅ | 32 | 32 | 30 | 2 | 0 | 0 |
| 15 | settlement_records | 结账记录 | settlement_records | ✅ | 66 | 67 | 1 | 65 | 0 | 1 |
| 16 | site_tables_master | 台桌主数据 | site_tables_master | ✅ | 25 | 26 | 21 | 4 | 0 | 1 |
| 17 | stock_goods_category_tree | 商品分类树 | stock_goods_category_tree | ⚠️ | 2 | 11 | 0 | 0 | 2 | 11 |
| 18 | store_goods_master | 门店商品库存主数据 | store_goods_master | ✅ | 45 | 47 | 41 | 4 | 0 | 2 |
| 19 | store_goods_sales_records | 门店商品销售记录 | store_goods_sales_records | ✅ | 50 | 52 | 46 | 2 | 0 | 4 |
| 20 | table_fee_discount_records | 台费优惠记录 | table_fee_discount_records | ✅ | 20 | 28 | 18 | 2 | 0 | 8 |
| 21 | table_fee_transactions | 台费流水 | table_fee_transactions | ✅ | 39 | 42 | 38 | 1 | 0 | 3 |
| 22 | tenant_goods_master | 租户商品主数据 | tenant_goods_master | ✅ | 31 | 32 | 28 | 2 | 0 | 2 |
## 差异详情
### 商品分类树(`stock_goods_category_tree`)— 无需操作
> 此表的 API 响应结构特殊:`data` 直接返回 `{goodsCategoryList: [...], total: N}`
> 而非标准的 `data.list`。ODS 表存储的是 `goodsCategoryList` 数组内展开的每条分类记录
> `id`, `category_name`, `pid`, `categoryboxes` 等 11 个字段),而非响应包装层字段。
>
> 因此 `goodsCategoryList`(数组容器)和 `total`(计数)不应作为 ODS 列,
> ODS 表中的 11 个"多余"列实际上就是数组内记录的字段。**无需任何 ALTER 操作。**
**脚本报告的"缺失"字段(实为响应包装层,不需要加列):**
| 字段名 | 说明 |
|--------|------|
| `goodsCategoryList` | 响应包装层分类记录数组容器ODS 已展开存储 |
| `total` | 响应包装层:记录总数,非业务字段 |
**脚本报告的"多余"列(实为数组内记录字段,完全正确):**
| 列名 | 说明 |
|------|------|
| `id`, `tenant_id`, `category_name`, `alias_name`, `pid` | 分类节点标识与层级 |
| `business_name`, `tenant_goods_business_id` | 业务大类维度 |
| `open_salesman`, `is_warehousing`, `sort` | 业务开关与排序 |
| `categoryboxes` | 子分类数组(树形展开) |

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,227 @@
# API 参考文档 vs ODS 实际表结构 对比报告 (v2)
> 生成时间2026-02-13 10:07:41
> 数据来源:`docs/api-reference/*.md` JSON 样例 vs `billiards_ods` 实际列
---
## 一、汇总
| API 接口 | 中文名 | ODS 表 | 状态 | API 字段数 | ODS 业务列数 | 匹配 | API 独有 | ODS 独有 |
|----------|--------|--------|------|-----------|-------------|------|---------|---------|
| assistant_accounts_master | 助教账号主数据 | assistant_accounts_master | ✅ 对齐 | 61 | 62 | 61 | 0 | 1 |
| settlement_records | 结账记录 | settlement_records | ✅ 对齐 | 66 | 67 | 66 | 0 | 1 |
| assistant_service_records | 助教服务流水 | assistant_service_records | ✅ 对齐 | 30 | 66 | 30 | 0 | 36 |
| assistant_cancellation_records | 助教撤销记录 | assistant_cancellation_records | ✅ 对齐 | 13 | 14 | 13 | 0 | 1 |
| table_fee_transactions | 台费流水 | table_fee_transactions | ✅ 对齐 | 39 | 42 | 39 | 0 | 3 |
| table_fee_discount_records | 台费优惠记录 | table_fee_discount_records | ✅ 对齐 | 20 | 28 | 20 | 0 | 8 |
| payment_transactions | 支付流水 | payment_transactions | ✅ 对齐 | 11 | 12 | 11 | 0 | 1 |
| refund_transactions | 退款流水 | refund_transactions | ✅ 对齐 | 32 | 32 | 32 | 0 | 0 |
| platform_coupon_redemption_records | 平台券核销记录 | platform_coupon_redemption_records | ✅ 对齐 | 26 | 26 | 26 | 0 | 0 |
| tenant_goods_master | 租户商品主数据 | tenant_goods_master | ✅ 对齐 | 31 | 32 | 31 | 0 | 1 |
| store_goods_sales_records | 门店商品销售记录 | store_goods_sales_records | ✅ 对齐 | 50 | 52 | 50 | 0 | 2 |
| store_goods_master | 门店商品库存主数据 | store_goods_master | ✅ 对齐 | 45 | 47 | 45 | 0 | 2 |
| stock_goods_category_tree | 商品分类树 | stock_goods_category_tree | ✅ 对齐 | 11 | 11 | 11 | 0 | 0 |
| goods_stock_movements | 库存出入库流水 | goods_stock_movements | ✅ 对齐 | 19 | 19 | 19 | 0 | 0 |
| member_profiles | 会员档案 | member_profiles | ✅ 对齐 | 15 | 20 | 15 | 0 | 5 |
| member_stored_value_cards | 会员储值卡 | member_stored_value_cards | ✅ 对齐 | 68 | 76 | 68 | 0 | 8 |
| recharge_settlements | 充值结算记录 | recharge_settlements | ✅ 对齐 | 66 | 67 | 66 | 0 | 1 |
| member_balance_changes | 会员余额变动 | member_balance_changes | ✅ 对齐 | 25 | 28 | 25 | 0 | 3 |
| group_buy_packages | 团购套餐定义 | group_buy_packages | ✅ 对齐 | 35 | 38 | 35 | 0 | 3 |
| group_buy_redemption_records | 团购核销记录 | group_buy_redemption_records | ✅ 对齐 | 43 | 52 | 43 | 0 | 9 |
| goods_stock_summary | 库存汇总报表 | goods_stock_summary | ✅ 对齐 | 14 | 14 | 14 | 0 | 0 |
| site_tables_master | 台桌主数据 | site_tables_master | ✅ 对齐 | 25 | 26 | 25 | 0 | 1 |
| settlement_ticket_details | 结账小票明细 | settlement_ticket_details | ⏭️ 跳过 | - | - | - | - | - |
| role_area_association | 角色区域关联 | None | ⏭️ 跳过 | - | - | - | - | - |
| tenant_member_balance_overview | 会员余额总览 | None | ⏭️ 跳过 | - | - | - | - | - |
**统计**:对齐 22 / 漂移 0 / 跳过 3 / 错误 0
**API 独有字段总计**0需要 ALTER TABLE ADD COLUMN
**ODS 独有列总计**86API 中不存在,可能是历史遗留或 ETL 派生列)
---
## 三、ODS 独有列详情API 中不存在)
### `assistant_accounts_master`(助教账号主数据)
| 列名 | 说明 |
|------|------|
| `last_update_name` | ODS 独有API JSON 样例中不存在 |
### `settlement_records`(结账记录)
| 列名 | 说明 |
|------|------|
| `settlelist` | ODS 独有API JSON 样例中不存在 |
### `assistant_service_records`(助教服务流水)
| 列名 | 说明 |
|------|------|
| `add_clock` | ODS 独有API JSON 样例中不存在 |
| `assistant_team_id` | ODS 独有API JSON 样例中不存在 |
| `assistantteamname` | ODS 独有API JSON 样例中不存在 |
| `composite_grade` | ODS 独有API JSON 样例中不存在 |
| `composite_grade_time` | ODS 独有API JSON 样例中不存在 |
| `coupon_deduct_money` | ODS 独有API JSON 样例中不存在 |
| `get_grade_times` | ODS 独有API JSON 样例中不存在 |
| `is_delete` | ODS 独有API JSON 样例中不存在 |
| `is_not_responding` | ODS 独有API JSON 样例中不存在 |
| `is_single_order` | ODS 独有API JSON 样例中不存在 |
| `is_trash` | ODS 独有API JSON 样例中不存在 |
| `last_use_time` | ODS 独有API JSON 样例中不存在 |
| `ledger_group_name` | ODS 独有API JSON 样例中不存在 |
| `ledger_status` | ODS 独有API JSON 样例中不存在 |
| `manual_discount_amount` | ODS 独有API JSON 样例中不存在 |
| `member_discount_amount` | ODS 独有API JSON 样例中不存在 |
| `order_assistant_id` | ODS 独有API JSON 样例中不存在 |
| `order_pay_id` | ODS 独有API JSON 样例中不存在 |
| `person_org_id` | ODS 独有API JSON 样例中不存在 |
| `real_service_money` | ODS 独有API JSON 样例中不存在 |
| `returns_clock` | ODS 独有API JSON 样例中不存在 |
| `salesman_name` | ODS 独有API JSON 样例中不存在 |
| `salesman_org_id` | ODS 独有API JSON 样例中不存在 |
| `salesman_user_id` | ODS 独有API JSON 样例中不存在 |
| `service_grade` | ODS 独有API JSON 样例中不存在 |
| `service_money` | ODS 独有API JSON 样例中不存在 |
| `skill_grade` | ODS 独有API JSON 样例中不存在 |
| `skill_id` | ODS 独有API JSON 样例中不存在 |
| `start_use_time` | ODS 独有API JSON 样例中不存在 |
| `sum_grade` | ODS 独有API JSON 样例中不存在 |
| `system_member_id` | ODS 独有API JSON 样例中不存在 |
| `tenant_member_id` | ODS 独有API JSON 样例中不存在 |
| `trash_applicant_id` | ODS 独有API JSON 样例中不存在 |
| `trash_applicant_name` | ODS 独有API JSON 样例中不存在 |
| `trash_reason` | ODS 独有API JSON 样例中不存在 |
| `user_id` | ODS 独有API JSON 样例中不存在 |
### `assistant_cancellation_records`(助教撤销记录)
| 列名 | 说明 |
|------|------|
| `tenant_id` | ODS 独有API JSON 样例中不存在 |
### `table_fee_transactions`(台费流水)
| 列名 | 说明 |
|------|------|
| `activity_discount_amount` | ODS 独有API JSON 样例中不存在 |
| `order_consumption_type` | ODS 独有API JSON 样例中不存在 |
| `real_service_money` | ODS 独有API JSON 样例中不存在 |
### `table_fee_discount_records`(台费优惠记录)
| 列名 | 说明 |
|------|------|
| `area_type_id` | ODS 独有API JSON 样例中不存在 |
| `charge_free` | ODS 独有API JSON 样例中不存在 |
| `site_table_area_id` | ODS 独有API JSON 样例中不存在 |
| `site_table_area_name` | ODS 独有API JSON 样例中不存在 |
| `sitename` | ODS 独有API JSON 样例中不存在 |
| `table_name` | ODS 独有API JSON 样例中不存在 |
| `table_price` | ODS 独有API JSON 样例中不存在 |
| `tenant_name` | ODS 独有API JSON 样例中不存在 |
### `payment_transactions`(支付流水)
| 列名 | 说明 |
|------|------|
| `tenant_id` | ODS 独有API JSON 样例中不存在 |
### `tenant_goods_master`(租户商品主数据)
| 列名 | 说明 |
|------|------|
| `not_sale` | ODS 独有API JSON 样例中不存在 |
### `store_goods_sales_records`(门店商品销售记录)
| 列名 | 说明 |
|------|------|
| `coupon_share_money` | ODS 独有API JSON 样例中不存在 |
| `option_name` | ODS 独有API JSON 样例中不存在 |
### `store_goods_master`(门店商品库存主数据)
| 列名 | 说明 |
|------|------|
| `commodity_code` | ODS 独有API JSON 样例中不存在 |
| `not_sale` | ODS 独有API JSON 样例中不存在 |
### `member_profiles`(会员档案)
| 列名 | 说明 |
|------|------|
| `pay_money_sum` | ODS 独有API JSON 样例中不存在 |
| `person_tenant_org_id` | ODS 独有API JSON 样例中不存在 |
| `person_tenant_org_name` | ODS 独有API JSON 样例中不存在 |
| `recharge_money_sum` | ODS 独有API JSON 样例中不存在 |
| `register_source` | ODS 独有API JSON 样例中不存在 |
### `member_stored_value_cards`(会员储值卡)
| 列名 | 说明 |
|------|------|
| `able_share_member_discount` | ODS 独有API JSON 样例中不存在 |
| `able_site_transfer` | ODS 独有API JSON 样例中不存在 |
| `electricity_deduct_radio` | ODS 独有API JSON 样例中不存在 |
| `electricity_discount` | ODS 独有API JSON 样例中不存在 |
| `electricitycarddeduct` | ODS 独有API JSON 样例中不存在 |
| `member_grade` | ODS 独有API JSON 样例中不存在 |
| `principal_balance` | ODS 独有API JSON 样例中不存在 |
| `rechargefreezebalance` | ODS 独有API JSON 样例中不存在 |
### `recharge_settlements`(充值结算记录)
| 列名 | 说明 |
|------|------|
| `settlelist` | ODS 独有API JSON 样例中不存在 |
### `member_balance_changes`(会员余额变动)
| 列名 | 说明 |
|------|------|
| `principal_after` | ODS 独有API JSON 样例中不存在 |
| `principal_before` | ODS 独有API JSON 样例中不存在 |
| `principal_data` | ODS 独有API JSON 样例中不存在 |
### `group_buy_packages`(团购套餐定义)
| 列名 | 说明 |
|------|------|
| `is_first_limit` | ODS 独有API JSON 样例中不存在 |
| `sort` | ODS 独有API JSON 样例中不存在 |
| `tenantcouponsaleorderitemid` | ODS 独有API JSON 样例中不存在 |
### `group_buy_redemption_records`(团购核销记录)
| 列名 | 说明 |
|------|------|
| `assistant_service_share_money` | ODS 独有API JSON 样例中不存在 |
| `assistant_share_money` | ODS 独有API JSON 样例中不存在 |
| `coupon_sale_id` | ODS 独有API JSON 样例中不存在 |
| `good_service_share_money` | ODS 独有API JSON 样例中不存在 |
| `goods_share_money` | ODS 独有API JSON 样例中不存在 |
| `member_discount_money` | ODS 独有API JSON 样例中不存在 |
| `recharge_share_money` | ODS 独有API JSON 样例中不存在 |
| `table_service_share_money` | ODS 独有API JSON 样例中不存在 |
| `table_share_money` | ODS 独有API JSON 样例中不存在 |
### `site_tables_master`(台桌主数据)
| 列名 | 说明 |
|------|------|
| `order_id` | ODS 独有API JSON 样例中不存在 |
---
<!--
AI_CHANGELOG:
- 日期: 2026-02-13
Prompt: P20260213-223000 — 用 API 参考文档比对数据库 ODS 实际表结构(重做)
直接原因: 前次比对结果不准确,重写脚本后重新生成报告
变更摘要: 由 scripts/compare_api_ods_v2.py 自动生成的对比报告22 表对齐 / 0 漂移 / 3 跳过 / 0 错误
风险与验证: 纯文档输出,无运行时影响;验证方式:对照 JSON 报告确认数据一致
-->

View File

@@ -0,0 +1,254 @@
[
{
"table": "assistant_accounts_master",
"api_count": 61,
"ods_count": 62,
"matched": 61,
"api_only": [],
"ods_only": [
"last_update_name"
]
},
{
"table": "settlement_records",
"api_count": 67,
"ods_count": 67,
"matched": 66,
"api_only": [
"siteprofile"
],
"ods_only": [
"settlelist"
]
},
{
"table": "assistant_service_records",
"api_count": 64,
"ods_count": 66,
"matched": 64,
"api_only": [],
"ods_only": [
"assistantteamname",
"real_service_money"
]
},
{
"table": "assistant_cancellation_records",
"api_count": 13,
"ods_count": 14,
"matched": 13,
"api_only": [],
"ods_only": [
"tenant_id"
]
},
{
"table": "table_fee_transactions",
"api_count": 39,
"ods_count": 42,
"matched": 39,
"api_only": [],
"ods_only": [
"activity_discount_amount",
"order_consumption_type",
"real_service_money"
]
},
{
"table": "table_fee_discount_records",
"api_count": 20,
"ods_count": 28,
"matched": 20,
"api_only": [],
"ods_only": [
"area_type_id",
"charge_free",
"site_table_area_id",
"site_table_area_name",
"sitename",
"table_name",
"table_price",
"tenant_name"
]
},
{
"table": "payment_transactions",
"api_count": 11,
"ods_count": 12,
"matched": 11,
"api_only": [],
"ods_only": [
"tenant_id"
]
},
{
"table": "refund_transactions",
"api_count": 32,
"ods_count": 32,
"matched": 32,
"api_only": [],
"ods_only": []
},
{
"table": "platform_coupon_redemption_records",
"api_count": 26,
"ods_count": 26,
"matched": 26,
"api_only": [],
"ods_only": []
},
{
"table": "tenant_goods_master",
"api_count": 31,
"ods_count": 32,
"matched": 31,
"api_only": [],
"ods_only": [
"not_sale"
]
},
{
"table": "store_goods_sales_records",
"api_count": 50,
"ods_count": 52,
"matched": 50,
"api_only": [],
"ods_only": [
"coupon_share_money",
"option_name"
]
},
{
"table": "store_goods_master",
"api_count": 45,
"ods_count": 47,
"matched": 45,
"api_only": [],
"ods_only": [
"commodity_code",
"not_sale"
]
},
{
"table": "stock_goods_category_tree",
"api_count": 11,
"ods_count": 11,
"matched": 11,
"api_only": [],
"ods_only": []
},
{
"table": "goods_stock_movements",
"api_count": 19,
"ods_count": 19,
"matched": 19,
"api_only": [],
"ods_only": []
},
{
"table": "member_profiles",
"api_count": 15,
"ods_count": 20,
"matched": 15,
"api_only": [],
"ods_only": [
"pay_money_sum",
"person_tenant_org_id",
"person_tenant_org_name",
"recharge_money_sum",
"register_source"
]
},
{
"table": "member_stored_value_cards",
"api_count": 68,
"ods_count": 76,
"matched": 68,
"api_only": [],
"ods_only": [
"able_share_member_discount",
"able_site_transfer",
"electricity_deduct_radio",
"electricity_discount",
"electricitycarddeduct",
"member_grade",
"principal_balance",
"rechargefreezebalance"
]
},
{
"table": "recharge_settlements",
"api_count": 67,
"ods_count": 67,
"matched": 66,
"api_only": [
"siteprofile"
],
"ods_only": [
"settlelist"
]
},
{
"table": "member_balance_changes",
"api_count": 25,
"ods_count": 28,
"matched": 25,
"api_only": [],
"ods_only": [
"principal_after",
"principal_before",
"principal_data"
]
},
{
"table": "group_buy_packages",
"api_count": 35,
"ods_count": 38,
"matched": 35,
"api_only": [],
"ods_only": [
"is_first_limit",
"sort",
"tenantcouponsaleorderitemid"
]
},
{
"table": "group_buy_redemption_records",
"api_count": 43,
"ods_count": 52,
"matched": 43,
"api_only": [],
"ods_only": [
"assistant_service_share_money",
"assistant_share_money",
"coupon_sale_id",
"good_service_share_money",
"goods_share_money",
"member_discount_money",
"recharge_share_money",
"table_service_share_money",
"table_share_money"
]
},
{
"table": "goods_stock_summary",
"api_count": 14,
"ods_count": 14,
"matched": 14,
"api_only": [],
"ods_only": []
},
{
"table": "site_tables_master",
"api_count": 25,
"ods_count": 26,
"matched": 24,
"api_only": [
"appletqrcodeurl"
],
"ods_only": [
"appletQrCodeUrl",
"order_id"
]
}
]

View File

@@ -0,0 +1,469 @@
# API JSON 样本 vs ODS 实际表结构比对报告 (v3)
> 生成时间2026-02-14 00:00 (Asia/Shanghai)
> 数据来源:`docs/api-reference/samples/*.json`API JSON 样本)+ PostgreSQL `billiards_ods` schema`information_schema.columns` 实时查询)
> 比对脚本:`scripts/run_compare_v3.py`
> 排除的 ODS 元数据列:`source_file`, `source_endpoint`, `fetched_at`, `payload`, `content_hash`
## 一、总览
| 指标 | 数值 |
|------|------|
| 比对表数 | 22 |
| 完全对齐 | 5 |
| API 独有字段ODS 缺失) | 3均为特殊情况见下文 |
| ODS 独有字段API 样本中未出现) | 52 |
### 完全对齐的表5 张)
| # | 表名 | API 字段数 | ODS 列数 |
|---|------|-----------|---------|
| 1 | refund_transactions | 32 | 32 |
| 2 | platform_coupon_redemption_records | 26 | 26 |
| 3 | stock_goods_category_tree | 11 | 11 |
| 4 | goods_stock_movements | 19 | 19 |
| 5 | goods_stock_summary | 14 | 14 |
---
## 二、逐表比对详情
### 1. assistant_accounts_master助教账号主数据
| 指标 | 数值 |
|------|------|
| API 字段数 | 61 |
| ODS 列数(不含元数据) | 62 |
| 匹配 | 61 |
| API 独有 | 0 |
| ODS 独有 | 1 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `last_update_name` | 最后更新人姓名。API 样本中未返回此字段,可能是后续版本新增或仅在特定条件下返回。 |
---
### 2. settlement_records结账记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 67settleList 内层 66 + 顶层 siteProfile 1 |
| ODS 列数(不含元数据) | 67 |
| 匹配 | 66 |
| API 独有 | 1`siteprofile` — 见说明) |
| ODS 独有 | 1`settlelist` — 见说明) |
特殊说明:
- API 返回结构为 `{siteProfile:{...}, settleList:{...}}`ODS 将 `settleList` 内层字段展开为独立列,同时保留 `settlelist`jsonb存储原始 settleList 对象。
- `siteprofile` 在 ODS 中未作为独立列存储(结账记录表不需要,因为 siteProfile 信息可从其他维度表获取)。
- 实际业务字段完全对齐,无缺失。
---
### 3. assistant_service_records助教服务流水
| 指标 | 数值 |
|------|------|
| API 字段数 | 64 |
| ODS 列数(不含元数据) | 66 |
| 匹配 | 64 |
| API 独有 | 0 |
| ODS 独有 | 2 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `assistantteamname` | 助教团队名称。可能在其他 API 版本或条件下返回,当前样本未包含。 |
| `real_service_money` | 实际服务金额。可能是后续版本新增字段。 |
---
### 4. assistant_cancellation_records助教撤销记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 13 |
| ODS 列数(不含元数据) | 14 |
| 匹配 | 13 |
| API 独有 | 0 |
| ODS 独有 | 1 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `tenant_id` | 租户 ID。API 返回中 tenant_id 嵌套在 siteProfile 内部ODS 提取为独立列便于查询。 |
---
### 5. table_fee_transactions台费流水
| 指标 | 数值 |
|------|------|
| API 字段数 | 39 |
| ODS 列数(不含元数据) | 42 |
| 匹配 | 39 |
| API 独有 | 0 |
| ODS 独有 | 3 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `activity_discount_amount` | 活动折扣金额。可能在有活动优惠的订单中返回。 |
| `order_consumption_type` | 订单消费类型。可能是后续版本新增字段。 |
| `real_service_money` | 实际服务费。可能在特定场景下返回。 |
---
### 6. table_fee_discount_records台费优惠记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 20 |
| ODS 列数(不含元数据) | 28 |
| 匹配 | 20 |
| API 独有 | 0 |
| ODS 独有 | 8 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `area_type_id` | 区域类型 ID |
| `charge_free` | 是否免费 |
| `site_table_area_id` | 门店台桌区域 ID |
| `site_table_area_name` | 门店台桌区域名称 |
| `sitename` | 门店名称 |
| `table_name` | 台桌名称 |
| `table_price` | 台桌单价 |
| `tenant_name` | 租户名称 |
说明:这 8 个字段来自 `tableProfile``siteProfile` 嵌套对象的展开。API 返回中它们嵌套在 `tableProfile`/`siteProfile` 内部ODS 在入库时将部分常用字段提取为独立列。这些字段在 API 中是存在的,只是嵌套层级不同。
---
### 7. payment_transactions支付流水
| 指标 | 数值 |
|------|------|
| API 字段数 | 11 |
| ODS 列数(不含元数据) | 12 |
| 匹配 | 11 |
| API 独有 | 0 |
| ODS 独有 | 1 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `tenant_id` | 租户 ID。API 返回中 tenant_id 嵌套在 siteProfile 内部ODS 提取为独立列。 |
---
### 8. refund_transactions退款流水— ✓ 完全对齐
API 32 字段 = ODS 32 列,完全匹配。
---
### 9. platform_coupon_redemption_records平台券核销记录— ✓ 完全对齐
API 26 字段 = ODS 26 列,完全匹配。
---
### 10. tenant_goods_master租户商品主数据
| 指标 | 数值 |
|------|------|
| API 字段数 | 31 |
| ODS 列数(不含元数据) | 32 |
| 匹配 | 31 |
| API 独有 | 0 |
| ODS 独有 | 1 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `not_sale` | 是否禁售。可能是后续版本新增字段,当前 API 样本未返回。 |
注意ODS 中同时存在 `commoditycode``commodity_code` 两列API 样本中也同时返回了 `commodityCode`(数组)和 `commodity_code`(字符串),两者均已匹配。
---
### 11. store_goods_sales_records门店商品销售记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 50 |
| ODS 列数(不含元数据) | 52 |
| 匹配 | 50 |
| API 独有 | 0 |
| ODS 独有 | 2 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `coupon_share_money` | 优惠券分摊金额。可能在使用优惠券的订单中返回。 |
| `option_name` | 商品选项名称。可能在有规格选项的商品中返回。 |
---
### 12. store_goods_master门店商品库存主数据
| 指标 | 数值 |
|------|------|
| API 字段数 | 45 |
| ODS 列数(不含元数据) | 47 |
| 匹配 | 45 |
| API 独有 | 0 |
| ODS 独有 | 2 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `commodity_code` | 商品编码。可能在部分商品中返回。 |
| `not_sale` | 是否禁售。可能是后续版本新增字段。 |
---
### 13. stock_goods_category_tree商品分类树— ✓ 完全对齐
API 11 字段 = ODS 11 列,完全匹配。
---
### 14. goods_stock_movements库存出入库流水— ✓ 完全对齐
API 19 字段 = ODS 19 列,完全匹配。
---
### 15. member_profiles会员档案
| 指标 | 数值 |
|------|------|
| API 字段数 | 15 |
| ODS 列数(不含元数据) | 20 |
| 匹配 | 15 |
| API 独有 | 0 |
| ODS 独有 | 5 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `pay_money_sum` | 累计消费金额 |
| `person_tenant_org_id` | 会员所属组织 ID |
| `person_tenant_org_name` | 会员所属组织名称 |
| `recharge_money_sum` | 累计充值金额 |
| `register_source` | 注册来源 |
说明:这 5 个字段可能在不同查询条件或 API 版本下返回。当前 JSON 样本是基础会员列表查询,部分扩展字段未包含在返回结果中。
---
### 16. member_stored_value_cards会员储值卡
| 指标 | 数值 |
|------|------|
| API 字段数 | 68 |
| ODS 列数(不含元数据) | 76 |
| 匹配 | 68 |
| API 独有 | 0 |
| ODS 独有 | 8 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `able_share_member_discount` | 是否允许共享会员折扣 |
| `able_site_transfer` | 是否允许跨店转移 |
| `electricity_deduct_radio` | 电费抵扣比例 |
| `electricity_discount` | 电费折扣 |
| `electricitycarddeduct` | 电费卡抵扣金额 |
| `member_grade` | 会员等级 |
| `principal_balance` | 本金余额 |
| `rechargefreezebalance` | 充值冻结余额 |
说明:这些字段可能是后续版本新增的(如电费相关字段、本金余额等),当前 API 样本未包含。
注意大小写匹配API 返回 `pdAssisnatLevel` / `cxAssisnatLevel`ODS 列名为 `pdassisnatlevel` / `cxassisnatlevel`lowercase 后完全匹配。
---
### 17. recharge_settlements充值结算记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 67settleList 内层 66 + 顶层 siteProfile 1 |
| ODS 列数(不含元数据) | 67 |
| 匹配 | 66 |
| API 独有 | 1`siteprofile` — 见说明) |
| ODS 独有 | 1`settlelist` — 见说明) |
特殊说明:与 settlement_records 相同的结构差异。`siteprofile` 未在 ODS 中作为独立列,`settlelist`jsonb存储原始 settleList 对象。实际业务字段完全对齐。
---
### 18. member_balance_changes会员余额变动
| 指标 | 数值 |
|------|------|
| API 字段数 | 25 |
| ODS 列数(不含元数据) | 28 |
| 匹配 | 25 |
| API 独有 | 0 |
| ODS 独有 | 3 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `principal_after` | 变动后本金余额 |
| `principal_before` | 变动前本金余额 |
| `principal_data` | 本金变动金额 |
说明:本金相关字段可能是后续版本新增,用于区分本金和赠送金额的变动。
---
### 19. group_buy_packages团购套餐定义
| 指标 | 数值 |
|------|------|
| API 字段数 | 35 |
| ODS 列数(不含元数据) | 38 |
| 匹配 | 35 |
| API 独有 | 0 |
| ODS 独有 | 3 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `is_first_limit` | 是否限首次使用 |
| `sort` | 排序序号 |
| `tenantcouponsaleorderitemid` | 租户优惠券销售订单项 ID |
---
### 20. group_buy_redemption_records团购核销记录
| 指标 | 数值 |
|------|------|
| API 字段数 | 43 |
| ODS 列数(不含元数据) | 52 |
| 匹配 | 43 |
| API 独有 | 0 |
| ODS 独有 | 9 |
ODS 独有字段:
| 列名 | 说明 |
|------|------|
| `assistant_service_share_money` | 助教服务分摊金额 |
| `assistant_share_money` | 助教分摊金额 |
| `coupon_sale_id` | 优惠券销售 ID |
| `good_service_share_money` | 商品服务分摊金额 |
| `goods_share_money` | 商品分摊金额 |
| `member_discount_money` | 会员折扣金额 |
| `recharge_share_money` | 充值分摊金额 |
| `table_service_share_money` | 台桌服务分摊金额 |
| `table_share_money` | 台桌分摊金额 |
说明:这 9 个字段是分摊计算相关字段,可能在特定核销场景下返回(如涉及多项目分摊的复合订单)。
---
### 21. goods_stock_summary库存汇总报表— ✓ 完全对齐
API 14 字段 = ODS 14 列,完全匹配。
---
### 22. site_tables_master台桌主数据
| 指标 | 数值 |
|------|------|
| API 字段数 | 25 |
| ODS 列数(不含元数据) | 26 |
| 匹配 | 24实际 25见说明 |
| API 独有 | 1`appletqrcodeurl` — 大小写问题) |
| ODS 独有 | 2`appletQrCodeUrl` + `order_id` |
特殊说明:
- `appletQrCodeUrl`ODS 列名保留了驼峰大小写PostgreSQL 用双引号创建API JSON key 也是 `appletQrCodeUrl`。脚本 lowercase 比对时产生了误报。实际上此字段完全匹配。
- `order_id`ODS 独有API 样本中未返回。可能是台桌当前关联的订单 ID仅在开台状态下返回。
修正后实际结果:匹配 25ODS 独有 1`order_id`)。
---
## 三、汇总统计表
| # | 表名 | API | ODS | 匹配 | API独有 | ODS独有 | 状态 |
|---|------|-----|-----|------|---------|---------|------|
| 1 | assistant_accounts_master | 61 | 62 | 61 | 0 | 1 | ODS 多 1 列 |
| 2 | settlement_records | 67 | 67 | 66 | 1* | 1* | 结构差异 |
| 3 | assistant_service_records | 64 | 66 | 64 | 0 | 2 | ODS 多 2 列 |
| 4 | assistant_cancellation_records | 13 | 14 | 13 | 0 | 1 | ODS 多 1 列 |
| 5 | table_fee_transactions | 39 | 42 | 39 | 0 | 3 | ODS 多 3 列 |
| 6 | table_fee_discount_records | 20 | 28 | 20 | 0 | 8 | ODS 多 8 列† |
| 7 | payment_transactions | 11 | 12 | 11 | 0 | 1 | ODS 多 1 列 |
| 8 | refund_transactions | 32 | 32 | 32 | 0 | 0 | ✓ 完全对齐 |
| 9 | platform_coupon_redemption_records | 26 | 26 | 26 | 0 | 0 | ✓ 完全对齐 |
| 10 | tenant_goods_master | 31 | 32 | 31 | 0 | 1 | ODS 多 1 列 |
| 11 | store_goods_sales_records | 50 | 52 | 50 | 0 | 2 | ODS 多 2 列 |
| 12 | store_goods_master | 45 | 47 | 45 | 0 | 2 | ODS 多 2 列 |
| 13 | stock_goods_category_tree | 11 | 11 | 11 | 0 | 0 | ✓ 完全对齐 |
| 14 | goods_stock_movements | 19 | 19 | 19 | 0 | 0 | ✓ 完全对齐 |
| 15 | member_profiles | 15 | 20 | 15 | 0 | 5 | ODS 多 5 列 |
| 16 | member_stored_value_cards | 68 | 76 | 68 | 0 | 8 | ODS 多 8 列 |
| 17 | recharge_settlements | 67 | 67 | 66 | 1* | 1* | 结构差异 |
| 18 | member_balance_changes | 25 | 28 | 25 | 0 | 3 | ODS 多 3 列 |
| 19 | group_buy_packages | 35 | 38 | 35 | 0 | 3 | ODS 多 3 列 |
| 20 | group_buy_redemption_records | 43 | 52 | 43 | 0 | 9 | ODS 多 9 列 |
| 21 | goods_stock_summary | 14 | 14 | 14 | 0 | 0 | ✓ 完全对齐 |
| 22 | site_tables_master | 25 | 26 | 25** | 0 | 1** | ODS 多 1 列 |
> `*` settlement_records / recharge_settlements 的 siteprofile vs settlelist 是结构设计差异,非真正缺失
> `†` table_fee_discount_records 的 8 个 ODS 独有列来自 tableProfile/siteProfile 嵌套对象展开
> `**` site_tables_master 修正大小写误报后,实际匹配 25ODS 独有仅 `order_id`
---
## 四、结论
1. **无 API 字段缺失**:所有 API 返回的业务字段在 ODS 中均有对应列,不需要 ALTER TABLE 添加列。
2. **ODS 多出 52 个列**(修正后约 49 个):这些列属于以下几类:
- 从嵌套对象siteProfile/tableProfile提取的冗余列如 tenant_id、sitename 等)
- 后续 API 版本新增但当前样本未覆盖的字段(如电费相关、本金相关)
- 分摊计算字段(仅在特定业务场景下返回)
- 结构设计列(如 settlelist jsonb 列)
3. **大小写注意**`site_tables_master.appletQrCodeUrl` 使用了驼峰命名PostgreSQL 双引号列名),与 API 一致但需注意 SQL 查询时加引号。
---
## 五、建议
- 无需执行 ALTER TABLE 操作
- ODS 多出的列不影响 ETL 流程,它们会在 API 返回对应字段时自动填充
- 建议定期重新运行比对脚本(`scripts/run_compare_v3.py`)以检测 API 字段变化
<!--
AI_CHANGELOG:
- 日期: 2026-02-14
- Prompt: P20260214-000000 — "还是不准。现在拆解任务,所有表,每个表当作一个任务进行比对。"(上下文传递续接)
- 直接原因: v2 比对结果不准确,用户要求逐表重做。从 JSON 样本提取字段 + 查询数据库实际列,逐表精确比对
- 变更摘要: 新建 v3 报告22 张表逐一比对,输出匹配/API独有/ODS独有详情含特殊结构处理说明
- 风险与验证: 纯分析报告,不修改数据库;验证方式:运行 `python scripts/run_compare_v3.py` 确认结果一致
-->

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,317 @@
# API 响应字段 vs ODS 表结构比对报告v3-fixed
> 生成时间2026-02-13 13:23Asia/Shanghai
> 数据来源API 参考文档docs/api-reference/*.md+ JSON 样本 + PostgreSQL information_schema
> 比对方法:从文档"响应字段详解"章节精确提取字段,与 ODS 实际列比对(排除 meta 列)
## 汇总
| 指标 | 值 |
|------|-----|
| 比对表数 | 22 |
| API 独有字段总数 | 4 |
| ODS 独有字段总数 | 2 |
| 完全对齐表数 | 18 |
## 逐表比对
### assistant_accounts_master — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 62文档=62JSON=62 |
| ODS 列数(排除 meta | 62 |
| 匹配 | 62 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### settlement_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 66文档=66JSON=66 |
| ODS 列数(排除 meta | 66 |
| 匹配 | 66 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### assistant_service_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 66文档=66JSON=66 |
| ODS 列数(排除 meta | 66 |
| 匹配 | 66 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### assistant_cancellation_records — ⚠️ 有差异
| 指标 | 值 |
|------|-----|
| API 字段数 | 13文档=13JSON=13 |
| ODS 列数(排除 meta | 14 |
| 匹配 | 13 |
| API 独有 | 0 |
| ODS 独有 | 1 |
**ODS 独有字段API 文档中未出现):**
| ODS 列名 | 分类说明 |
|----------|----------|
| `tenant_id` | ODS 额外添加的租户 ID 字段API 响应中不含ETL 入库时补充) |
---
### table_fee_transactions — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 42文档=42JSON=42 |
| ODS 列数(排除 meta | 42 |
| 匹配 | 42 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### table_fee_discount_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 28文档=28JSON=20 |
| ODS 列数(排除 meta | 28 |
| 匹配 | 28 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### payment_transactions — ⚠️ 有差异
| 指标 | 值 |
|------|-----|
| API 字段数 | 11文档=11JSON=11 |
| ODS 列数(排除 meta | 12 |
| 匹配 | 11 |
| API 独有 | 0 |
| ODS 独有 | 1 |
**ODS 独有字段API 文档中未出现):**
| ODS 列名 | 分类说明 |
|----------|----------|
| `tenant_id` | ODS 额外添加的租户 ID 字段API 响应中不含ETL 入库时补充) |
---
### refund_transactions — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 32文档=32JSON=32 |
| ODS 列数(排除 meta | 32 |
| 匹配 | 32 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### platform_coupon_redemption_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 26文档=26JSON=26 |
| ODS 列数(排除 meta | 26 |
| 匹配 | 26 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### tenant_goods_master — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 32文档=32JSON=32 |
| ODS 列数(排除 meta | 32 |
| 匹配 | 32 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### store_goods_sales_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 51文档=51JSON=51 |
| ODS 列数(排除 meta | 51 |
| 匹配 | 51 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### store_goods_master — ⚠️ 有差异
| 指标 | 值 |
|------|-----|
| API 字段数 | 49文档=49JSON=49 |
| ODS 列数(排除 meta | 47 |
| 匹配 | 47 |
| API 独有 | 2 |
| ODS 独有 | 0 |
**API 独有字段ODS 中缺失):**
- `goodsstockwarninginfo`
- `time_slot_sale`
---
### stock_goods_category_tree — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 11文档=11JSON=0 |
| ODS 列数(排除 meta | 11 |
| 匹配 | 11 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### goods_stock_movements — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 19文档=19JSON=19 |
| ODS 列数(排除 meta | 19 |
| 匹配 | 19 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### member_profiles — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 20文档=20JSON=20 |
| ODS 列数(排除 meta | 20 |
| 匹配 | 20 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### member_stored_value_cards — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 75文档=75JSON=75 |
| ODS 列数(排除 meta | 75 |
| 匹配 | 75 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### recharge_settlements — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 66文档=66JSON=66 |
| ODS 列数(排除 meta | 66 |
| 匹配 | 66 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### member_balance_changes — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 28文档=28JSON=28 |
| ODS 列数(排除 meta | 28 |
| 匹配 | 28 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### group_buy_packages — ⚠️ 有差异
| 指标 | 值 |
|------|-----|
| API 字段数 | 40文档=40JSON=40 |
| ODS 列数(排除 meta | 38 |
| 匹配 | 38 |
| API 独有 | 2 |
| ODS 独有 | 0 |
**API 独有字段ODS 中缺失):**
- `tableareanamelist`
- `tenanttableareaidlist`
---
### group_buy_redemption_records — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 52文档=52JSON=52 |
| ODS 列数(排除 meta | 52 |
| 匹配 | 52 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### goods_stock_summary — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 14文档=14JSON=14 |
| ODS 列数(排除 meta | 14 |
| 匹配 | 14 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
### site_tables_master — ✅ 完全对齐
| 指标 | 值 |
|------|-----|
| API 字段数 | 26文档=26JSON=26 |
| ODS 列数(排除 meta | 26 |
| 匹配 | 26 |
| API 独有 | 0 |
| ODS 独有 | 0 |
---
<!--
AI_CHANGELOG:
- 日期: 2026-02-14
- Prompt: P20260214-003000 — v3 比对不准确,重写为 v3-fixed
- 直接原因: v3 仅从 JSON 样本提取字段导致遗漏v3-fixed 从 .md 文档响应字段详解章节精确提取
- 变更摘要: 新建 v3-fixed 报告,精确限定提取范围,排除请求参数和跨表关联字段
- 风险与验证: 纯分析报告,无运行时影响;验证方式:抽查 assistant_accounts_master 的 last_update_name 是否正确识别为匹配
- 日期: 2026-02-14
- Prompt: P20260214-070000 — ODS 清理与文档标注5 项任务)
- 直接原因: 删除 option_name 和 able_site_transfer 后需重新生成比对报告
- 变更摘要: 由脚本自动重新生成ODS 独有从 12→2完全对齐表从 15→18store_goods_sales_records、member_stored_value_cards、table_fee_discount_records 新增对齐)
- 风险与验证: 纯分析报告;验证:脚本输出 API独有=4, ODS独有=2
-->

View File

@@ -0,0 +1,806 @@
[
{
"table": "assistant_accounts_master",
"name_zh": "助教账号主数据",
"status": "ok",
"record_count": 69,
"json_field_count": 62,
"md_field_count": 62,
"data_path": "data.assistantInfos",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
62,
62,
62,
62,
62
],
"nested_summary": {}
},
{
"table": "settlement_records",
"name_zh": "结账记录",
"status": "gap",
"record_count": 100,
"json_field_count": 2,
"md_field_count": 91,
"data_path": "data.settleList",
"missing_in_md": [
[
"settleList",
{
"type": "object",
"count": 100
}
],
[
"siteProfile",
{
"type": "object",
"count": 100
}
]
],
"extra_in_md": [
"activityDiscount",
"address",
"adjustAmount",
"allCouponDiscount",
"assistantCxMoney",
"assistantManualDiscount",
"assistantPdMoney",
"assistantPromotionMoney",
"attendance_distance",
"attendance_enabled",
"auto_light",
"avatar",
"balanceAmount",
"business_tel",
"canBeRevoked",
"cardAmount",
"cashAmount",
"consumeMoney",
"couponAmount",
"couponSaleAmount",
"createTime",
"customer_service_qrcode",
"customer_service_wechat",
"electricityAdjustMoney",
"electricityMoney",
"fixed_pay_qrCode",
"full_address",
"giftCardAmount",
"goodsMoney",
"goodsPromotionMoney",
"id",
"isActivity",
"isBindMember",
"isFirst",
"isUseCoupon",
"isUseDiscount",
"latitude",
"light_status",
"light_token",
"light_type",
"longitude",
"memberCardTypeName",
"memberDiscountAmount",
"memberId",
"memberName",
"memberPhone",
"merVouSalesAmount",
"onlineAmount",
"operatorId",
"operatorName",
"orderRemark",
"org_id",
"payAmount",
"payTime",
"paymentMethod",
"plCouponSaleAmount",
"pointAmount",
"pointDiscountCost",
"pointDiscountPrice",
"prepayMoney",
"prod_env",
"realElectricityMoney",
"realGoodsMoney",
"rechargeCardAmount",
"refundAmount",
"revokeOrderId",
"revokeOrderName",
"revokeTime",
"roundingAmount",
"salesManName",
"salesManUserId",
"serialNumber",
"serviceMoney",
"settleName",
"settleRelateId",
"settleStatus",
"settleType",
"shop_name",
"shop_status",
"siteId",
"siteName",
"site_label",
"site_type",
"tableChargeMoney",
"tableId",
"tenantId",
"tenantMemberCardId",
"tenant_id",
"tenant_site_region_id",
"wifi_name",
"wifi_password"
],
"top5_field_counts": [
2,
2,
2,
2,
2
],
"nested_summary": {
"siteProfile": 26,
"settleList": 66
}
},
{
"table": "assistant_service_records",
"name_zh": "助教服务流水",
"status": "gap",
"record_count": 100,
"json_field_count": 66,
"md_field_count": 64,
"data_path": "data.orderAssistantDetails",
"missing_in_md": [
[
"assistantTeamName",
{
"type": "string",
"count": 100
}
],
[
"real_service_money",
{
"type": "number",
"count": 100
}
]
],
"extra_in_md": [],
"top5_field_counts": [
66,
66,
66,
66,
66
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "assistant_cancellation_records",
"name_zh": "助教撤销记录",
"status": "ok",
"record_count": 37,
"json_field_count": 13,
"md_field_count": 13,
"data_path": "data.abolitionAssistants",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
13,
13,
13,
13,
13
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "table_fee_transactions",
"name_zh": "台费流水",
"status": "gap",
"record_count": 100,
"json_field_count": 42,
"md_field_count": 39,
"data_path": "data.siteTableUseDetailsList",
"missing_in_md": [
[
"activity_discount_amount",
{
"type": "number",
"count": 100
}
],
[
"order_consumption_type",
{
"type": "integer",
"count": 100
}
],
[
"real_service_money",
{
"type": "number",
"count": 100
}
]
],
"extra_in_md": [],
"top5_field_counts": [
42,
42,
42,
42,
42
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "table_fee_discount_records",
"name_zh": "台费优惠记录",
"status": "ok",
"record_count": 100,
"json_field_count": 20,
"md_field_count": 20,
"data_path": "data.taiFeeAdjustInfos",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
20,
20,
20,
20,
20
],
"nested_summary": {
"tableProfile": 11,
"siteProfile": 26
}
},
{
"table": "payment_transactions",
"name_zh": "支付流水",
"status": "ok",
"record_count": 100,
"json_field_count": 11,
"md_field_count": 11,
"data_path": "data.list",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
11,
11,
11,
11,
11
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "refund_transactions",
"name_zh": "退款流水",
"status": "ok",
"record_count": 13,
"json_field_count": 32,
"md_field_count": 32,
"data_path": "data.list",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
32,
32,
32,
32,
32
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "platform_coupon_redemption_records",
"name_zh": "平台券核销记录",
"status": "ok",
"record_count": 100,
"json_field_count": 26,
"md_field_count": 26,
"data_path": "data.list",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
26,
26,
26,
26,
26
],
"nested_summary": {
"siteProfile": 26
}
},
{
"table": "tenant_goods_master",
"name_zh": "租户商品主数据",
"status": "ok",
"record_count": 100,
"json_field_count": 32,
"md_field_count": 32,
"data_path": "data.tenantGoodsList",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
32,
32,
32,
32,
32
],
"nested_summary": {}
},
{
"table": "store_goods_sales_records",
"name_zh": "门店商品销售记录",
"status": "ok",
"record_count": 100,
"json_field_count": 51,
"md_field_count": 51,
"data_path": "data.orderGoodsLedgers",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
51,
51,
51,
51,
51
],
"nested_summary": {}
},
{
"table": "store_goods_master",
"name_zh": "门店商品库存主数据",
"status": "gap",
"record_count": 100,
"json_field_count": 49,
"md_field_count": 45,
"data_path": "data.orderGoodsList",
"missing_in_md": [
[
"commodity_code",
{
"type": "string",
"count": 100
}
],
[
"goodsStockWarningInfo",
{
"type": "object",
"count": 100
}
],
[
"not_sale",
{
"type": "integer",
"count": 100
}
],
[
"time_slot_sale",
{
"type": "integer",
"count": 100
}
]
],
"extra_in_md": [],
"top5_field_counts": [
49,
49,
49,
49,
49
],
"nested_summary": {
"goodsStockWarningInfo": 5
}
},
{
"table": "stock_goods_category_tree",
"name_zh": "商品分类树",
"status": "ok",
"record_count": 9,
"json_field_count": 11,
"md_field_count": 13,
"data_path": "data.goodsCategoryList",
"missing_in_md": [],
"extra_in_md": [
"goodsCategoryList",
"total"
],
"top5_field_counts": [
11,
11,
11,
11,
11
],
"nested_summary": {}
},
{
"table": "goods_stock_movements",
"name_zh": "库存出入库流水",
"status": "ok",
"record_count": 100,
"json_field_count": 19,
"md_field_count": 19,
"data_path": "data.queryDeliveryRecordsList",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
19,
19,
19,
19,
19
],
"nested_summary": {}
},
{
"table": "member_profiles",
"name_zh": "会员档案",
"status": "ok",
"record_count": 100,
"json_field_count": 20,
"md_field_count": 20,
"data_path": "data.tenantMemberInfos",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
20,
20,
20,
20,
20
],
"nested_summary": {}
},
{
"table": "member_stored_value_cards",
"name_zh": "会员储值卡",
"status": "gap",
"record_count": 100,
"json_field_count": 75,
"md_field_count": 75,
"data_path": "data.tenantMemberCards",
"missing_in_md": [
[
"electricityCardDeduct",
{
"type": "number",
"count": 100
}
],
[
"rechargeFreezeBalance",
{
"type": "number",
"count": 100
}
]
],
"extra_in_md": [
"electricitycarddeduct",
"rechargefreezebalance"
],
"top5_field_counts": [
75,
75,
75,
75,
75
],
"nested_summary": {}
},
{
"table": "recharge_settlements",
"name_zh": "充值结算记录",
"status": "gap",
"record_count": 90,
"json_field_count": 2,
"md_field_count": 66,
"data_path": "data.settleList",
"missing_in_md": [
[
"settleList",
{
"type": "object",
"count": 90
}
],
[
"siteProfile",
{
"type": "object",
"count": 90
}
]
],
"extra_in_md": [
"activityDiscount",
"adjustAmount",
"allCouponDiscount",
"assistantCxMoney",
"assistantManualDiscount",
"assistantPdMoney",
"assistantPromotionMoney",
"balanceAmount",
"canBeRevoked",
"cardAmount",
"cashAmount",
"consumeMoney",
"couponAmount",
"couponSaleAmount",
"createTime",
"electricityAdjustMoney",
"electricityMoney",
"giftCardAmount",
"goodsMoney",
"goodsPromotionMoney",
"id",
"isActivity",
"isBindMember",
"isFirst",
"isUseCoupon",
"isUseDiscount",
"memberCardTypeName",
"memberDiscountAmount",
"memberId",
"memberName",
"memberPhone",
"merVouSalesAmount",
"onlineAmount",
"operatorId",
"operatorName",
"orderRemark",
"payAmount",
"payTime",
"paymentMethod",
"plCouponSaleAmount",
"pointAmount",
"pointDiscountCost",
"pointDiscountPrice",
"prepayMoney",
"realElectricityMoney",
"realGoodsMoney",
"rechargeCardAmount",
"refundAmount",
"revokeOrderId",
"revokeOrderName",
"revokeTime",
"roundingAmount",
"salesManName",
"salesManUserId",
"serialNumber",
"serviceMoney",
"settleName",
"settleRelateId",
"settleStatus",
"settleType",
"siteId",
"siteName",
"tableChargeMoney",
"tableId",
"tenantId",
"tenantMemberCardId"
],
"top5_field_counts": [
2,
2,
2,
2,
2
],
"nested_summary": {
"siteProfile": 26,
"settleList": 66
}
},
{
"table": "member_balance_changes",
"name_zh": "会员余额变动",
"status": "ok",
"record_count": 100,
"json_field_count": 28,
"md_field_count": 28,
"data_path": "data.tenantMemberCardLogs",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
28,
28,
28,
28,
28
],
"nested_summary": {}
},
{
"table": "group_buy_packages",
"name_zh": "团购套餐定义",
"status": "gap",
"record_count": 12,
"json_field_count": 40,
"md_field_count": 34,
"data_path": "data.packageCouponList",
"missing_in_md": [
[
"is_first_limit",
{
"type": "integer",
"count": 12
}
],
[
"sort",
{
"type": "integer",
"count": 12
}
],
[
"tableAreaNameList",
{
"type": "array",
"count": 12
}
],
[
"tenantCouponSaleOrderItemId",
{
"type": "integer",
"count": 12
}
],
[
"tenantTableAreaIdList",
{
"type": "array",
"count": 12
}
],
[
"type",
{
"type": "integer",
"count": 12
}
]
],
"extra_in_md": [],
"top5_field_counts": [
40,
40,
40,
40,
40
],
"nested_summary": {}
},
{
"table": "group_buy_redemption_records",
"name_zh": "团购核销记录",
"status": "ok",
"record_count": 100,
"json_field_count": 52,
"md_field_count": 52,
"data_path": "data.siteTableUseDetailsList",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
52,
52,
52,
52,
52
],
"nested_summary": {}
},
{
"table": "goods_stock_summary",
"name_zh": "库存汇总报表",
"status": "ok",
"record_count": 100,
"json_field_count": 14,
"md_field_count": 14,
"data_path": "data.list",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
14,
14,
14,
14,
14
],
"nested_summary": {}
},
{
"table": "site_tables_master",
"name_zh": "台桌主数据",
"status": "ok",
"record_count": 74,
"json_field_count": 26,
"md_field_count": 26,
"data_path": "data.siteTables",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
26,
26,
26,
26,
26
],
"nested_summary": {}
},
{
"table": "settlement_ticket_details",
"name_zh": "结账小票明细",
"status": "skipped",
"record_count": 0,
"json_field_count": 0,
"md_field_count": 0,
"data_path": null
},
{
"table": "member_consumption_statistics",
"name_zh": "会员消费统计",
"status": "ok",
"record_count": 2,
"json_field_count": 12,
"md_field_count": 12,
"data_path": "data.memberConsumptionStatisticsList",
"missing_in_md": [],
"extra_in_md": [],
"top5_field_counts": [
12,
12
],
"nested_summary": {}
},
{
"table": "tenant_member_balance_overview",
"name_zh": "会员余额总览",
"status": "ok",
"record_count": 1,
"json_field_count": 9,
"md_field_count": 12,
"data_path": "data",
"missing_in_md": [],
"extra_in_md": [
"balance",
"cardTypeName",
"principalBalance"
],
"top5_field_counts": [
9
],
"nested_summary": {}
}
]

View File

@@ -0,0 +1,261 @@
# DWS 和 Index 层表名一致性检查报告
生成时间2026-02-05
## 执行摘要
本次检查对比了 Schema 定义、任务文件、校验器配置中的表名,发现以下问题:
**一致的部分:**
- Index 层表名完全一致(`dws_member_winback_index``dws_member_newconv_index``dws_member_assistant_intimacy``v_member_recall_priority`
- DWS 任务文件中的表名与 Schema 完全一致13 张表)
**不一致的部分:**
- DWS 校验器配置了 3 张不存在的表(`dws_daily_settlement``dws_daily_table_fee``dws_daily_goods_sale`
- 测试日志中显示错误的表名 `dws_intimacy_index`(但配置文件中是正确的)
**修复优先级:**
1. 🔴 **高优先级**:修复 DWS 校验器配置,移除或更新不存在的表
2. ⚠️ **中优先级**:检查测试日志中错误表名的来源
3. 📝 **低优先级**:确认 Excel 导入表的处理流程
## 一、数据来源
1. **Schema 定义**`etl_billiards/database/schema_dws.sql`
2. **任务文件**`etl_billiards/tasks/dws/` 目录下的所有任务
3. **DWS 校验器**`etl_billiards/tasks/verification/dws_verifier.py`
4. **Index 校验器**`etl_billiards/tasks/verification/index_verifier.py`
---
## 二、Schema 中定义的 DWS 表(共 26 张)
### 配置表6 张)
- `cfg_performance_tier` - 绩效档位配置表
- `cfg_assistant_level_price` - 助教等级定价表
- `cfg_bonus_rules` - 奖金规则配置表
- `cfg_area_category` - 台区分类映射表
- `cfg_skill_type` - 技能→课程类型映射表
- `cfg_index_parameters` - 指数算法参数配置表
### 助教维度表5 张)
- `dws_assistant_daily_detail` - 助教日度业绩明细表
- `dws_assistant_monthly_summary` - 助教月度业绩汇总表
- `dws_assistant_customer_stats` - 助教服务客户统计表
- `dws_assistant_salary_calc` - 助教工资计算详情表
- `dws_assistant_recharge_commission` - 助教充值提成表
### 客户维度表6 张)
- `dws_member_consumption_summary` - 会员消费汇总表
- `dws_member_visit_detail` - 会员来店明细表
- `dws_member_recall_index` - 客户召回指数表(旧)⭐
- `dws_member_winback_index` - 老客挽回指数表WBI
- `dws_member_newconv_index` - 新客转化指数表NCI
- `dws_member_assistant_intimacy` - 客户-助教亲密指数表 ⭐
### 财务维度表7 张)
- `dws_finance_daily_summary` - 财务日度汇总表
- `dws_finance_income_structure` - 收入结构分析表
- `dws_finance_discount_detail` - 优惠明细表
- `dws_finance_recharge_summary` - 充值统计表
- `dws_finance_expense_summary` - 支出结构表
- `dws_assistant_finance_analysis` - 助教收支分析表
- `dws_platform_settlement` - 平台回款/服务费表
### 其他表2 张)
- `dws_order_summary` - 订单汇总表
- `dws_index_percentile_history` - 分位点历史表
### 视图1 张)
- `v_member_recall_priority` - 召回/转化优先级视图WBI + NCI
---
## 三、任务文件中使用的表名
### DWS 任务对应的表15 张)
| 任务文件 | 表名 | 状态 |
|---------|------|------|
| `assistant_daily_task.py` | `dws_assistant_daily_detail` | ✅ 一致 |
| `assistant_monthly_task.py` | `dws_assistant_monthly_summary` | ✅ 一致 |
| `assistant_customer_task.py` | `dws_assistant_customer_stats` | ✅ 一致 |
| `assistant_salary_task.py` | `dws_assistant_salary_calc` | ✅ 一致 |
| `assistant_finance_task.py` | `dws_assistant_finance_analysis` | ✅ 一致 |
| `member_consumption_task.py` | `dws_member_consumption_summary` | ✅ 一致 |
| `member_visit_task.py` | `dws_member_visit_detail` | ✅ 一致 |
| `finance_daily_task.py` | `dws_finance_daily_summary` | ✅ 一致 |
| `finance_income_task.py` | `dws_finance_income_structure` | ✅ 一致 |
| `finance_discount_task.py` | `dws_finance_discount_detail` | ✅ 一致 |
| `finance_recharge_task.py` | `dws_finance_recharge_summary` | ✅ 一致 |
| `index/recall_index_task.py` | `dws_member_recall_index` | ✅ 一致 |
| `index/winback_index_task.py` | `dws_member_winback_index` | ✅ 一致 |
| `index/newconv_index_task.py` | `dws_member_newconv_index` | ✅ 一致 |
| `index/intimacy_index_task.py` | `dws_member_assistant_intimacy` | ✅ 一致 |
### 未找到对应任务的表5 张)
- `dws_assistant_recharge_commission` - 助教充值提成表Excel导入可能不需要ETL任务
- `dws_finance_expense_summary` - 支出结构表Excel导入可能不需要ETL任务
- `dws_platform_settlement` - 平台回款/服务费表Excel导入可能不需要ETL任务
- `dws_order_summary` - 订单汇总表(保留原有表,可能已有任务)
- `dws_index_percentile_history` - 分位点历史表(由指数任务自动维护)
---
## 四、校验器配置中的表名
### DWS 校验器 (`dws_verifier.py`)
**配置的表3 张):**
- `dws_daily_settlement`**不存在于 Schema**
- `dws_daily_table_fee`**不存在于 Schema**
- `dws_daily_goods_sale`**不存在于 Schema**
**问题分析:**
- 这些表名可能是历史遗留或计划中的表,但未在 `schema_dws.sql` 中定义
- 实际应该校验的表可能是:
- `dws_finance_daily_summary`(财务日度汇总,包含结算数据)
- `dws_member_visit_detail`(会员来店明细,包含台费数据)
- 商品销售数据可能在其他表中
### Index 校验器 (`index_verifier.py`)
**配置的表2 张):**
- `v_member_recall_priority`**与 Schema 一致**
- `dws_member_assistant_intimacy`**与 Schema 一致**
---
## 五、不一致问题汇总
### 🔴 严重不一致
#### 1. DWS 校验器配置了不存在的表
**位置**`etl_billiards/tasks/verification/dws_verifier.py`
**问题表:**
- `dws_daily_settlement` - Schema 中不存在
- `dws_daily_table_fee` - Schema 中不存在
- `dws_daily_goods_sale` - Schema 中不存在
**建议修复:**
- 如果这些表已废弃,应从校验器中移除
- 如果需要校验类似数据,应使用实际存在的表:
- `dws_finance_daily_summary` - 财务日度汇总(包含结算数据)
- `dws_member_visit_detail` - 会员来店明细(包含台费数据)
- 商品销售数据需要确认是否在其他表中
#### 2. 测试日志中显示错误的表名(可能已修复)
**位置**`etl_billiards/tests/20260205.txt`
**问题:**
- 测试日志中显示校验器在查找 `dws_intimacy_index`
- 但实际表名应该是 `dws_member_assistant_intimacy`
- 配置文件中使用的是正确的表名 `dws_member_assistant_intimacy`
**分析:**
- 可能是日志输出时的问题,或者某个地方错误地将任务代码 `DWS_INTIMACY_INDEX` 转换为了 `dws_intimacy_index`
- 需要检查校验器的日志输出逻辑,确保使用正确的表名
**建议:**
- 检查校验器代码中是否有地方将任务代码转换为表名
- 确保所有日志输出使用配置中的表名,而不是从任务代码推导
### ⚠️ 潜在问题
#### 2. Schema 中定义但未找到对应任务的表
以下表在 Schema 中定义,但未找到对应的 ETL 任务:
- `dws_assistant_recharge_commission` - 助教充值提成表
- **说明**Excel导入表可能不需要ETL任务但需要确认导入流程
- `dws_finance_expense_summary` - 支出结构表
- **说明**Excel导入表可能不需要ETL任务但需要确认导入流程
- `dws_platform_settlement` - 平台回款/服务费表
- **说明**Excel导入表可能不需要ETL任务但需要确认导入流程
- `dws_order_summary` - 订单汇总表
- **说明**:注释中提到"保留原有表",可能已有旧任务,需要确认
- `dws_index_percentile_history` - 分位点历史表
- **说明**:由指数任务自动维护,不需要独立任务 ✅
---
## 六、修复建议
### 优先级 1修复 DWS 校验器配置
**文件**`etl_billiards/tasks/verification/dws_verifier.py`
**操作**
1. 检查 `dws_daily_settlement``dws_daily_table_fee``dws_daily_goods_sale` 是否应该存在
2. 如果不应存在,删除这些配置
3. 如果需要校验类似数据,更新配置为实际存在的表:
```python
"dws_finance_daily_summary": {
"pk_columns": ["site_id", "stat_date"],
"time_column": "stat_date",
"source_table": "billiards_dwd.dwd_settlement_head",
# ... 其他配置
}
```
### 优先级 2确认 Excel 导入表的处理流程
**需要确认**
- `dws_assistant_recharge_commission` 的导入流程
- `dws_finance_expense_summary` 的导入流程
- `dws_platform_settlement` 的导入流程
- `dws_order_summary` 是否有对应的任务或导入流程
### 优先级 3文档更新
**建议**
- 在 `schema_dws.sql` 中明确标注哪些表是 Excel 导入表
- 在任务文档中说明哪些表不需要 ETL 任务
---
## 七、一致性检查结果总结
| 检查项 | 状态 | 说明 |
|--------|------|------|
| Schema 定义的表 | ✅ | 24 张表定义完整 |
| 任务文件中的表名 | ✅ | 13 张表与 Schema 一致 |
| Index 校验器配置 | ✅ | 2 张表与 Schema 一致 |
| DWS 校验器配置 | ❌ | 3 张表在 Schema 中不存在 |
**总体评价**
- ✅ Index 层表名完全一致
- ✅ DWS 任务文件中的表名与 Schema 完全一致
- ❌ DWS 校验器配置存在不一致,需要修复
---
## 八、附录:表名映射关系
### Index 表映射(已验证一致)
| 校验器配置 | Schema 定义 | 任务文件 | 状态 |
|-----------|------------|---------|------|
| `dws_member_recall_index` | `dws_member_recall_index` | `recall_index_task.py` | ✅ |
| `dws_member_assistant_intimacy` | `dws_member_assistant_intimacy` | `intimacy_index_task.py` | ✅ |
### DWS 表映射(部分不一致)
| 校验器配置 | Schema 定义 | 任务文件 | 状态 |
|-----------|------------|---------|------|
| `dws_daily_settlement` | ❌ 不存在 | - | ❌ |
| `dws_daily_table_fee` | ❌ 不存在 | - | ❌ |
| `dws_daily_goods_sale` | ❌ 不存在 | - | ❌ |
**实际应该校验的表:**
- `dws_finance_daily_summary` ✅ 存在,有任务 `finance_daily_task.py`
- `dws_member_visit_detail` ✅ 存在,有任务 `member_visit_task.py`
- 商品销售数据需要确认是否在其他表中
---
**报告结束**

View File

@@ -0,0 +1,496 @@
============================================================
1. 客户召回表
============================================================
客户姓名 | 召回指数
------------------------------------------------------------
陈腾鑫 | 10.00
章先生 | 10.00
孙?? | 10.00
? | 10.00
胡先生 | 10.00
黄先生 | 9.63
小熊 | 9.52
周先生 | 9.41
李先生 | 9.39
? | 9.27
张无忌 | 9.20
黄先生 | 8.96
陈德韵 | 8.94
胡?? | 8.93
T | 8.89
? | 8.88
孙先生 | 8.87
王先生 | 8.86
? | 8.86
amy | 8.84
林先生 | 8.84
张先生 | 8.79
刘先生 | 8.79
黄国磊 | 8.79
? | 8.79
陈先生 | 8.79
? | 8.79
大G | 8.79
李先生 | 8.79
孙启东 | 8.79
陈先生 | 8.79
罗先生 | 8.79
刘哥 | 8.79
? | 8.79
枫先生 | 8.79
老宋 | 8.79
黄先生 | 8.79
刘女士 | 8.79
彭先生 | 8.79
? | 8.79
桂先生 | 8.79
王先生 | 8.79
潘先生 | 8.79
方先生 | 8.79
郑先生 | 8.79
阿亮 | 8.79
孟紫? | 8.79
林?? | 8.78
林志? | 8.64
罗超 | 8.63
张丹? | 8.52
谢俊 | 8.07
王龙 | 7.80
唐先生 | 7.79
周周 | 7.47
曾巧? | 6.83
昌哥 | 6.17
江先生 | 5.84
? | 5.24
蔡?? | 4.73
胡先生 | 4.51
陈先生 | 4.45
明哥 | 3.92
公孙先生 | 3.57
曾先生 | 3.47
黄生 | 3.46
葛先生 | 3.35
轩哥 | 3.32
张先生 | 2.73
叶先生 | 2.61
小燕 | 2.39
罗先生 | 2.38
李先生 | 2.23
陈淑? | 2.23
肖先生 | 2.23
范先生 | 2.14
常?? | 1.47
董贝 | 1.04
陈小? | 1.04
林先生 | 0.90
柳先生 | 0.61
林先生 | 0.20
潘先生 | 0.20
曾丹? | 0.07
魏先生 | 0.00
艾宇? | 0.00
吴生 | 0.00
卢广? | 0.00
陈泽? | 0.00
李先生 | 0.00
?90 条记?
============================================================
2. 助教客户关系表
============================================================
助教花名 | 客户姓名 | 关系指数
------------------------------------------------------------
卡顿 | 葛先生 | 10.00
小燕 | 葛先生 | 10.00
七七 | 轩哥 | 10.00
佳?? | 罗先生 | 10.00
璇子 | 轩哥 | 10.00
阿清 | 张先生 | 10.00
璇子 | 江先生 | 10.00
CC | 周周 | 10.00
周周 | 周周 | 10.00
小燕 | 小燕 | 10.00
卡顿 | 小燕 | 10.00
姜姜 | 张先生 | 10.00
小侯 | 张先生 | 10.00
渔渔 | 张先生 | 10.00
欣欣 | 张先生 | 10.00
千千 | 张先生 | 10.00
小A | 张先生 | 10.00
甜甜 | 张先生 | 10.00
小A | 周先生 | 10.00
欣欣 | 周先生 | 10.00
千千 | 周先生 | 10.00
甜甜 | 周先生 | 10.00
涛涛 | 蔡?? | 10.00
婉?6?1 | 吴先生 | 10.00
千千 | ? | 10.00
甜甜 | ? | 10.00
小A | ? | 10.00
欣欣 | ? | 10.00
球球 | 周周 | 10.00
涛涛 | 轩哥 | 10.00
小不? | 周周 | 10.00
小柔 | 蔡?? | 10.00
年糕 | 葛先生 | 10.00
佳?? | 陈腾鑫 | 10.00
小不? | 罗先生 | 10.00
球球 | 罗先生 | 10.00
小柔 | 轩哥 | 10.00
阿清 | ? | 10.00
阿清 | 胡先生 | 10.00
佳?? | 陈先生 | 10.00
小不? | 轩哥 | 10.00
佳?? | 小熊 | 10.00
球球 | 轩哥 | 10.00
阿清 | 孙?? | 10.00
CC | 罗先生 | 10.00
周周 | 罗先生 | 10.00
小柔 | 明哥 | 9.96
渔渔 | 李先生 | 9.88
姜姜 | 李先生 | 9.88
小侯 | 李先生 | 9.88
年糕 | 常?? | 9.85
婉?6?1 | 明哥 | 9.61
乔西 | 陈先生 | 9.59
璇子 | 蔡?? | 9.46
CC | 常?? | 9.40
周周 | 常?? | 9.40
七七 | 蔡?? | 9.24
甜甜 | 孙?? | 9.24
小A | 孙?? | 9.24
欣欣 | 孙?? | 9.24
千千 | 孙?? | 9.24
七七 | 胡先生 | 9.20
千千 | 小熊 | 9.02
甜甜 | 小熊 | 9.02
欣欣 | 小熊 | 9.02
小A | 小熊 | 9.02
佳?? | 胡先生 | 9.02
涛涛 | 小燕 | 8.66
阿清 | 轩哥 | 8.53
年糕 | 叶先生 | 8.51
小不? | 张先生 | 8.39
球球 | 张先生 | 8.39
阿清 | 葛先生 | 8.36
周周 | 张先生 | 8.30
CC | 张先生 | 8.30
甜甜 | 胡先生 | 8.04
千千 | 胡先生 | 8.04
欣欣 | 胡先生 | 8.04
小A | 胡先生 | 8.04
小不? | 小熊 | 7.88
球球 | 小熊 | 7.88
小侯 | 胡先生 | 7.86
姜姜 | 胡先生 | 7.86
渔渔 | 胡先生 | 7.86
乔西 | 罗先生 | 7.86
小不? | 胡先生 | 7.65
球球 | 胡先生 | 7.65
球球 | 孙?? | 7.56
小不? | 孙?? | 7.56
璇子 | 孙?? | 7.46
阿清 | ? | 7.35
小A | 小燕 | 7.09
甜甜 | 小燕 | 7.09
欣欣 | 小燕 | 7.09
千千 | 小燕 | 7.09
甜甜 | 公孙先生 | 7.07
千千 | 公孙先生 | 7.07
欣欣 | 公孙先生 | 7.07
小A | 公孙先生 | 7.07
婉?6?1 | 孙?? | 7.03
菲菲 | 陈腾鑫 | 6.92
橙子 | 陈腾鑫 | 6.92
希希 | 陈腾鑫 | 6.92
婉?6?1 | 章先生 | 6.91
婉?6?1 | 公孙先生 | 6.86
CC | 林先生 | 6.77
周周 | 林先生 | 6.77
阿清 | 小燕 | 6.76
苏苏 | 蔡?? | 6.64
七七 | 小燕 | 6.60
小不? | 江先生 | 6.59
球球 | 江先生 | 6.59
涛涛 | 罗先生 | 6.52
凤梨 | 葛先生 | 6.51
佳?? | 轩哥 | 6.49
年糕 | 轩哥 | 6.44
年糕 | 小燕 | 6.43
CC | 轩哥 | 6.26
周周 | 轩哥 | 6.26
yy | 公孙先生 | 6.13
阿清 | 陈腾鑫 | 6.04
佳?? | 周周 | 6.03
七七 | 江先生 | 5.93
CC | 林先生 | 5.87
周周 | 林先生 | 5.87
年糕 | ? | 5.76
年糕 | 李先生 | 5.72
七七 | 孙?? | 5.69
苏苏 | 黄先生 | 5.66
婉?6?1 | 叶先生 | 5.55
涛涛 | 叶先生 | 5.55
凤梨 | 叶先生 | 5.54
小A | 黄先生 | 5.53
甜甜 | 黄先生 | 5.53
千千 | 黄先生 | 5.53
欣欣 | 黄先生 | 5.53
yy | 叶先生 | 5.53
苏苏 | 罗先生 | 5.48
小侯 | 葛先生 | 5.47
渔渔 | 葛先生 | 5.47
姜姜 | 葛先生 | 5.47
佳?? | 林志? | 5.45
婉?6?1 | 葛先生 | 5.37
CC | 小熊 | 5.29
周周 | 小熊 | 5.29
涛涛 | 孙?? | 5.20
小敌 | 李先生 | 5.09
吱吱 | 李先生 | 5.09
周周 | 葛先生 | 5.08
CC | 葛先生 | 5.08
甜甜 | 蔡?? | 5.04
千千 | 蔡?? | 5.04
欣欣 | 蔡?? | 5.04
小A | 蔡?? | 5.04
婉?6?1 | 轩哥 | 5.03
年糕 | 胡先生 | 5.02
吱吱 | 葛先生 | 4.88
小敌 | 葛先生 | 4.88
婉?6?1 | ? | 4.87
yy | 张先生 | 4.66
璇子 | 罗先生 | 4.65
yy | 葛先生 | 4.59
苏苏 | 柳先生 | 4.58
乔西 | 蔡?? | 4.50
七七 | 张先生 | 4.36
乔西 | 葛先生 | 4.33
乔西 | 小熊 | 4.33
周周 | 江先生 | 4.32
CC | 江先生 | 4.32
Amy | 轩哥 | 4.31
年糕 | 罗超 | 4.20
yy | 林志? | 4.19
年糕 | 艾宇? | 4.16
阿清 | 黄先生 | 4.14
七七 | 罗超 | 4.12
年糕 | 范先生 | 4.08
凤梨 | 林先生 | 4.07
璇子 | 张先生 | 4.06
球球 | 常?? | 4.05
小不? | 常?? | 4.05
yy | 孙?? | 3.99
七七 | 葛先生 | 3.93
乔西 | 轩哥 | 3.90
年糕 | 小熊 | 3.85
千千 | 李先生 | 3.73
欣欣 | 李先生 | 3.73
小A | 李先生 | 3.73
甜甜 | 李先生 | 3.73
姜姜 | 轩哥 | 3.62
渔渔 | 轩哥 | 3.62
小侯 | 轩哥 | 3.62
迟迟 | 轩哥 | 3.60
泡芙 | 轩哥 | 3.60
小琳 | 轩哥 | 3.60
七七 | 罗先生 | 3.57
年糕 | 胡?? | 3.47
欣欣 | 葛先生 | 3.43
甜甜 | 葛先生 | 3.43
千千 | 葛先生 | 3.43
小A | 葛先生 | 3.43
七七 | 林?? | 3.43
乔西 | 陈德韵 | 3.38
泡芙 | 林?? | 3.31
迟迟 | 林?? | 3.31
小琳 | 林?? | 3.31
涛涛 | 葛先生 | 3.27
阿清 | 罗先生 | 3.16
璇子 | 周周 | 3.16
阿清 | 王先生 | 3.14
小柳 | 轩哥 | 3.06
迟迟 | 陈腾鑫 | 3.04
小琳 | 陈腾鑫 | 3.04
泡芙 | 陈腾鑫 | 3.04
瑶瑶 | 蔡?? | 2.92
图图 | 蔡?? | 2.92
小A | 轩哥 | 2.91
千千 | 轩哥 | 2.91
欣欣 | 轩哥 | 2.91
甜甜 | 轩哥 | 2.91
年糕 | 罗先生 | 2.84
小不? | 黄先生 | 2.73
球球 | 黄先生 | 2.73
渔渔 | ? | 2.72
姜姜 | ? | 2.72
小侯 | ? | 2.72
欣欣 | 陈先生 | 2.68
千千 | 陈先生 | 2.68
小A | 陈先生 | 2.68
甜甜 | 陈先生 | 2.68
婉?6?1 | 江先生 | 2.67
千千 | 枫先生 | 2.67
欣欣 | 枫先生 | 2.67
小A | 枫先生 | 2.67
甜甜 | 枫先生 | 2.67
阿清 | 枫先生 | 2.67
乔西 | 张无忌 | 2.55
甜甜 | 范先生 | 2.51
千千 | 范先生 | 2.51
小A | 范先生 | 2.51
欣欣 | 范先生 | 2.51
七七 | 林先生 | 2.45
CC | T | 2.36
周周 | T | 2.36
苏苏 | 周周 | 2.36
小侯 | 周先生 | 2.28
渔渔 | 周先生 | 2.28
姜姜 | 周先生 | 2.28
涛涛 | 胡?? | 2.28
苏苏 | 林先生 | 2.14
渔渔 | 彭先生 | 2.07
小侯 | 彭先生 | 2.07
姜姜 | 彭先生 | 2.07
小侯 | ? | 2.03
甜甜 | ? | 2.03
小A | ? | 2.03
欣欣 | ? | 2.03
千千 | ? | 2.03
渔渔 | ? | 2.03
姜姜 | ? | 2.03
苏苏 | 张先生 | 1.94
千千 | 林?? | 1.88
甜甜 | 林?? | 1.88
欣欣 | 林?? | 1.88
小A | 林?? | 1.88
甜甜 | 陈腾鑫 | 1.82
欣欣 | 陈腾鑫 | 1.82
千千 | 陈腾鑫 | 1.82
小A | 陈腾鑫 | 1.82
佳?? | 彭先生 | 1.80
婉?6?1 | 周先生 | 1.77
苏苏 | 周先生 | 1.68
CC | 昌哥 | 1.64
周周 | 昌哥 | 1.64
球球 | 蔡?? | 1.57
小不? | 蔡?? | 1.57
苏苏 | 李先生 | 1.53
吱吱 | 李先生 | 1.50
小敌 | 李先生 | 1.50
婉?6?1 | 刘哥 | 1.46
CC | 林?? | 1.39
周周 | 林?? | 1.39
小不? | T | 1.38
球球 | T | 1.38
悠悠 | 张先生 | 1.38
布丁 | 张先生 | 1.38
小?? | 周先生 | 1.37
雯雯 | 周先生 | 1.37
素素 | 周先生 | 1.37
嘉嘉 | 轩哥 | 1.31
小柔 | 葛先生 | 1.30
乔西 | 张先生 | 1.29
小不? | ? | 1.23
球球 | ? | 1.23
嘉嘉 | 罗先生 | 1.22
小侯 | T | 1.19
渔渔 | T | 1.19
姜姜 | T | 1.19
小侯 | 黄先生 | 1.19
小敌 | 林先生 | 1.19
姜姜 | 黄先生 | 1.19
吱吱 | 林先生 | 1.19
渔渔 | 黄先生 | 1.19
球球 | 葛先生 | 1.16
小不? | 葛先生 | 1.16
Amy | amy | 1.15
乔西 | T | 1.12
球球 | 老宋 | 1.10
小不? | 老宋 | 1.10
乔西 | 林先生 | 1.01
素素 | 张先生 | 0.98
小?? | 张先生 | 0.98
雯雯 | 张先生 | 0.98
佳?? | T | 0.96
年糕 | 张先生 | 0.94
小侯 | 陈腾鑫 | 0.88
渔渔 | 陈腾鑫 | 0.88
姜姜 | 陈腾鑫 | 0.88
阿清 | 李先生 | 0.85
球球 | 林?? | 0.83
小不? | 林?? | 0.83
婉?6?1 | 常?? | 0.77
小侯 | 艾宇? | 0.76
姜姜 | 艾宇? | 0.76
渔渔 | 艾宇? | 0.76
小敌 | 郑先生 | 0.74
吱吱 | 郑先生 | 0.74
千千 | 罗先生 | 0.72
甜甜 | 罗先生 | 0.72
小A | 罗先生 | 0.72
欣欣 | 罗先生 | 0.72
球球 | 小燕 | 0.67
小不? | 小燕 | 0.67
年糕 | 周先生 | 0.65
卡顿 | 罗先生 | 0.62
小燕 | 罗先生 | 0.62
小敌 | 刘哥 | 0.60
吱吱 | 刘哥 | 0.60
小柔 | 孟紫? | 0.56
阿清 | ? | 0.54
乔西 | ? | 0.49
小敌 | 张先生 | 0.46
甜甜 | T | 0.46
小A | T | 0.46
欣欣 | T | 0.46
千千 | T | 0.46
吱吱 | 张先生 | 0.46
小A | ? | 0.38
千千 | ? | 0.38
甜甜 | ? | 0.38
欣欣 | ? | 0.38
苏苏 | 葛先生 | 0.34
渔渔 | ? | 0.32
小侯 | ? | 0.32
姜姜 | ? | 0.32
苏苏 | T | 0.31
婉?6?1 | 罗先生 | 0.26
涛涛 | ? | 0.24
苏苏 | ? | 0.23
阿清 | 常?? | 0.23
小不? | 李先生 | 0.22
球球 | 李先生 | 0.22
小柔 | T | 0.19
年糕 | 潘先生 | 0.19
婉?6?1 | ? | 0.18
小柔 | 罗先生 | 0.17
梦梦 | 葛先生 | 0.14
欣?? | 葛先生 | 0.14
大姚 | 葛先生 | 0.14
椰子 | 葛先生 | 0.14
璇子 | 林先生 | 0.11
年糕 | 明哥 | 0.09
涛涛 | 张先生 | 0.08
周周 | 大G | 0.02
佳?? | 大G | 0.02
CC | 大G | 0.02
周周 | 明哥 | 0.00
Amy | 明哥 | 0.00
小?? | 叶先生 | 0.00
乔西 | 林先生 | 0.00
素素 | 叶先生 | 0.00
雯雯 | 叶先生 | 0.00
梦梦 | 蔡?? | 0.00
欣?? | 蔡?? | 0.00
椰子 | 蔡?? | 0.00
大姚 | 蔡?? | 0.00
周周 | ? | 0.00
小柔 | 昌哥 | 0.00
CC | ? | 0.00
佳?? | ? | 0.00
CC | 明哥 | 0.00
小柔 | 江先生 | 0.00
共391 条记录

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,181 @@
[
{
"table": "assistant_accounts_master",
"json_count": 61,
"md_count": 62,
"json_only": [],
"md_only": [
"last_update_name"
]
},
{
"table": "assistant_cancellation_records",
"json_count": 13,
"md_count": 13,
"json_only": [],
"md_only": []
},
{
"table": "assistant_service_records",
"json_count": 64,
"md_count": 66,
"json_only": [],
"md_only": [
"assistantteamname",
"real_service_money"
]
},
{
"table": "goods_stock_movements",
"json_count": 19,
"md_count": 19,
"json_only": [],
"md_only": []
},
{
"table": "goods_stock_summary",
"json_count": 14,
"md_count": 14,
"json_only": [],
"md_only": []
},
{
"table": "group_buy_packages",
"json_count": 35,
"md_count": 35,
"json_only": [],
"md_only": []
},
{
"table": "group_buy_redemption_records",
"json_count": 43,
"md_count": 43,
"json_only": [],
"md_only": []
},
{
"table": "member_balance_changes",
"json_count": 25,
"md_count": 25,
"json_only": [],
"md_only": []
},
{
"table": "member_profiles",
"json_count": 15,
"md_count": 15,
"json_only": [],
"md_only": []
},
{
"table": "member_stored_value_cards",
"json_count": 68,
"md_count": 68,
"json_only": [],
"md_only": []
},
{
"table": "payment_transactions",
"json_count": 11,
"md_count": 11,
"json_only": [],
"md_only": []
},
{
"table": "platform_coupon_redemption_records",
"json_count": 26,
"md_count": 26,
"json_only": [],
"md_only": []
},
{
"table": "recharge_settlements",
"json_count": 66,
"md_count": 66,
"json_only": [],
"md_only": []
},
{
"table": "refund_transactions",
"json_count": 32,
"md_count": 32,
"json_only": [],
"md_only": []
},
{
"table": "role_area_association",
"json_count": 12,
"md_count": 12,
"json_only": [],
"md_only": []
},
{
"table": "settlement_records",
"json_count": 66,
"md_count": 66,
"json_only": [],
"md_only": []
},
{
"table": "site_tables_master",
"json_count": 25,
"md_count": 25,
"json_only": [],
"md_only": []
},
{
"table": "stock_goods_category_tree",
"json_count": 11,
"md_count": 12,
"json_only": [],
"md_only": [
"total"
]
},
{
"table": "store_goods_master",
"json_count": 45,
"md_count": 45,
"json_only": [],
"md_only": []
},
{
"table": "store_goods_sales_records",
"json_count": 50,
"md_count": 50,
"json_only": [],
"md_only": []
},
{
"table": "table_fee_discount_records",
"json_count": 20,
"md_count": 20,
"json_only": [],
"md_only": []
},
{
"table": "table_fee_transactions",
"json_count": 39,
"md_count": 39,
"json_only": [],
"md_only": []
},
{
"table": "tenant_goods_master",
"json_count": 31,
"md_count": 31,
"json_only": [],
"md_only": []
},
{
"table": "tenant_member_balance_overview",
"json_count": 9,
"md_count": 12,
"json_only": [],
"md_only": [
"balance",
"cardtypename",
"principalbalance"
]
}
]

View File

@@ -0,0 +1,255 @@
[
{
"table": "assistant_accounts_master",
"status": "MATCH",
"ods_count": 62,
"md_count": 62,
"matched": 62
},
{
"table": "assistant_cancellation_records",
"status": "DIFF",
"ods_count": 14,
"md_count": 13,
"matched": 13,
"md_only": [],
"ods_only": [
"tenant_id"
]
},
{
"table": "assistant_service_records",
"status": "MATCH",
"ods_count": 66,
"md_count": 66,
"matched": 66
},
{
"table": "goods_stock_movements",
"status": "MATCH",
"ods_count": 19,
"md_count": 19,
"matched": 19
},
{
"table": "goods_stock_summary",
"status": "MATCH",
"ods_count": 14,
"md_count": 14,
"matched": 14
},
{
"table": "group_buy_packages",
"status": "DIFF",
"ods_count": 38,
"md_count": 40,
"matched": 39,
"md_only": [
"tableAreaNameList"
],
"ods_only": []
},
{
"table": "group_buy_redemption_records",
"status": "MATCH",
"ods_count": 52,
"md_count": 52,
"matched": 52
},
{
"table": "member_balance_changes",
"status": "MATCH",
"ods_count": 28,
"md_count": 28,
"matched": 28
},
{
"table": "member_consumption_statistics",
"status": "NO_ODS_TABLE",
"md_fields_count": 12,
"note": "summary 文档存在但 ODS 中无对应表"
},
{
"table": "member_profiles",
"status": "MATCH",
"ods_count": 20,
"md_count": 20,
"matched": 20
},
{
"table": "member_stored_value_cards",
"status": "MATCH",
"ods_count": 75,
"md_count": 75,
"matched": 75
},
{
"table": "payment_transactions",
"status": "DIFF",
"ods_count": 12,
"md_count": 11,
"matched": 11,
"md_only": [],
"ods_only": [
"tenant_id"
]
},
{
"table": "platform_coupon_redemption_records",
"status": "MATCH",
"ods_count": 26,
"md_count": 26,
"matched": 26
},
{
"table": "recharge_settlements",
"status": "MATCH",
"ods_count": 66,
"md_count": 66,
"matched": 66
},
{
"table": "refund_transactions",
"status": "MATCH",
"ods_count": 32,
"md_count": 32,
"matched": 32
},
{
"table": "settlement_records",
"status": "MATCH",
"ods_count": 66,
"md_count": 66,
"matched": 66
},
{
"table": "settlement_ticket_details",
"status": "DIFF",
"ods_count": 38,
"md_count": 82,
"matched": 36,
"md_only": [
"chargeDuration",
"chargeEndTime",
"chargeStartTime",
"consumptionAmount",
"couponName",
"couponPrice",
"couponType",
"discountAmount",
"discountMoney",
"goodsCount",
"goodsLedgers",
"goodsName",
"goodsPrice",
"goodsPromotionMoney",
"goodsRemark",
"lastUseTime",
"memberCouponId",
"memberDiscountAmount",
"offerType",
"optionName",
"optionPrice",
"optionValueName",
"orderCouponChannel",
"orderCouponId",
"orderCouponLedgerId",
"orderCouponLedgers",
"orderGoodsLedgerId",
"orderServiceLedgers",
"orderTableLedgerId",
"orderTradeNo",
"orderType",
"pauseDuration",
"promotionCouponId",
"realGoodsMoney",
"rechargePromotionMoney",
"rewardPromotionMoney",
"salesType",
"siteGoodsId",
"siteOrderId",
"siteTableId",
"tableAreaName",
"tableLedger",
"tableName",
"tableServicePromotionMoney",
"tenantGoodsCategoryId",
"useDuration"
],
"ods_only": [
"orderitem",
"tenantmembercardlogs"
]
},
{
"table": "site_tables_master",
"status": "MATCH",
"ods_count": 26,
"md_count": 26,
"matched": 26
},
{
"table": "stock_goods_category_tree",
"status": "MATCH",
"ods_count": 11,
"md_count": 11,
"matched": 11
},
{
"table": "store_goods_master",
"status": "DIFF",
"ods_count": 47,
"md_count": 49,
"matched": 47,
"md_only": [
"goodsStockWarningInfo",
"time_slot_sale"
],
"ods_only": []
},
{
"table": "store_goods_sales_records",
"status": "MATCH",
"ods_count": 51,
"md_count": 51,
"matched": 51
},
{
"table": "table_fee_discount_records",
"status": "DIFF",
"ods_count": 28,
"md_count": 20,
"matched": 20,
"md_only": [],
"ods_only": [
"area_type_id",
"charge_free",
"site_table_area_id",
"site_table_area_name",
"sitename",
"table_name",
"table_price",
"tenant_name"
]
},
{
"table": "table_fee_transactions",
"status": "MATCH",
"ods_count": 42,
"md_count": 42,
"matched": 42
},
{
"table": "tenant_goods_master",
"status": "MATCH",
"ods_count": 32,
"md_count": 32,
"matched": 32
},
{
"table": "tenant_member_balance_overview",
"status": "NO_ODS_TABLE",
"md_fields_count": 12,
"note": "summary 文档存在但 ODS 中无对应表"
}
]