diff --git a/docs/02-architecture-and-code-map.md b/docs/02-architecture-and-code-map.md index 4a98ed5..d07c0ec 100644 --- a/docs/02-architecture-and-code-map.md +++ b/docs/02-architecture-and-code-map.md @@ -2,8 +2,8 @@ generated: true (请先修改 Gitea Wiki,禁止直接编辑本文件) wiki_page: Architecture-and-Code-Map wiki_url: https://git.ilapage.cn/OPC/goauto/wiki/Architecture-and-Code-Map.- -wiki_revision: 88ed799e92f64a73b3bd9472ab6c0b06fa080b37 -synchronized_at: 2026-09-29T09:48:30Z +wiki_revision: 04a4bcf81f2f2912d101d1aa1c2d8eb802c5719e +synchronized_at: 2026-09-30T01:50:27Z @@ -137,6 +137,7 @@ Android Portal/Agent | 虾皮商品档案增量迁移 | `server/cmd/migrate/migration/version-local/1786700600000_shopee_product_archive.go` | | SYB 商品明细导入、解析与虾皮档案合并 | `server/app/goauto/sybimport/`(解析、幂等落库、同步编排、导入端点、管理端 API 和 Admin 页面均已实现) | | 顺云宝(SYB)ERP HTTP 客户端与登录会话 | `server/app/goauto/sybclient/`(登录、OCR 验证码、会话缓存、列表与明细读取;见 [SYB-ERP-Interface-Contract](SYB-ERP-Interface-Contract)) | +| SYB 来源货运单创建时间(#352,待迁移与发布) | `syb_product.syb_stock_created_at` 为可空且带索引的 `t_stock.created`,由 `sybimport/sync.go` 从列表取值,经 `apply.go` 写入;`service.go` 的日期筛选使用该字段。迁移 `server/cmd/migrate/migration/version-local/1789810000000_syb_stock_created_at.go` 仅加列和索引,不改历史行;历史由有界 SYB 重同步补齐。 | | SYB 商品明细增量迁移 | `server/cmd/migrate/migration/version-local/1786700700000_syb_product_import.go` | | SYB 店铺准入、发现与过滤 | `server/app/goauto/sybshop/`、`server/app/goauto/sybimport/`;迁移 `server/cmd/migrate/migration/version-local/1786700900000_syb_shop.go` | | SYB 后台导入任务、进度、单任务互斥与启动恢复 | `server/app/goauto/sybimport/sync_run.go`、`sync_run_handler.go`;表 `syb_sync_run`,迁移 `server/cmd/migrate/migration/version-local/1786701000000_syb_sync_run.go` | diff --git a/docs/03-business-rules-and-glossary.md b/docs/03-business-rules-and-glossary.md index d859b8a..2d8806f 100644 --- a/docs/03-business-rules-and-glossary.md +++ b/docs/03-business-rules-and-glossary.md @@ -2,8 +2,8 @@ generated: true (请先修改 Gitea Wiki,禁止直接编辑本文件) wiki_page: Business-Rules-and-Glossary wiki_url: https://git.ilapage.cn/OPC/goauto/wiki/Business-Rules-and-Glossary.- -wiki_revision: 5d9810286d76c52a90902c27a5316f39164f36e0 -synchronized_at: 2026-09-29T09:48:45Z +wiki_revision: 76037bfdf5e986c478055e7338c21ee1ba561bad +synchronized_at: 2026-09-30T01:50:31Z @@ -57,6 +57,10 @@ synchronized_at: 2026-09-22T02:56:27Z ## SYB 商品明细 +### 来源创建时间(#352 目标契约,待迁移与发布) + +Admin 的「创建时间」范围按 SYB 货运单列表的 `t_stock.created`(UTC+8 本地日期)筛选关联商品明细,起止日均包含;这不是商品明细独立创建时间。同步新增或重同步读取列表 `created` 并存入 `syb_product.syb_stock_created_at`;`syb_product.created_at` 保留 GoAuto 首次入库审计时间。来源值缺失或格式异常时明确报错,不能用订单号或入库时间推断。历史空值不命中日期筛选;迁移后按不超过 31 天且受货运单数量上限约束的区间重同步补齐,先后统计空值数量,失败区间可幂等重跑,仍无法取得来源值的记录保持空值并报告。 + - 一行对应 SYB 一条明确的商品/颜色/尺码/数量明细;唯一键为「蝦皮订单号 `code` + 来源明细 `id`」组合,不是全局唯一 ID(未在多货运单样本中验证过全局唯一性)。 - `productSpec` 自由文本解析:按最后一个逗号切分为颜色/尺码 → 剥离【】备注 → 判断残留分隔符;解析状态分 `success`/`uncertain`/`failed`,永不猜测原文中不存在的颜色或尺码。