SYB 商品「创建时间」筛选改用来源货运单创建时间并补齐历史数据 #352
Open
opened 2026-09-30 09:32:26 +08:00 by ila
·
2 comments
No Branch/Tag Specified
main
fix/352-syb-source-created
fix/348-reveal-swipe
feat/340-syb-excluded-products
fix/351-inner-code-apply-selection
fix/350-match-layout
fix/350-inner-code-matching
feat/349-batch-return-use
feat/347-batch-return-cancel
feat/345-yeeke-reship
fix/346-root-serves-spa
fix/344-inner-code-stall-match
fix/343-syb-writeback-session
feat/339-syb-page-size
feat/338-return-match
feat/337-yeeke-admin-ui
feat/336-yeeke-return-sync
fix/335-bottom-submit-node
fix/334-spec-probe-top-swipe
fix/333-purchaser-device-owner
fix/331-spec-panel-recognition
fix/330-syb-writeback-session
feat/327-syb-writeback-filter
feat/326-order-information
fix/325-order-result
feat/316-chrome-order-backfill
fix/307-backfill-entry
feat/305-syb-order-writeback
feat/306-order-paid-amount
release/283
fix/283-purchase-mapping-consistency
fix/230-horizontal-spec-selection
feat/263-spec-rematch
fix/262-purchase-handoff
fix/260-261-purchase-readiness
fix/259-partial-collection-link
feat/258-one-click-replace
fix/257-color-normalized-match
fix/256-collection-single-dimension
fix/255-current-page-reidentify
feat/253-one-click-link
fix/254-match-loading
fix/251-syb-spec-candidates
feat/250-continuous-collection
fix/249-local-purchase-diagnostics
fix/248-bottom-submit
fix/247-short-address-panel
fix/246-address-return-panel
fix/245-purchase-failure-diagnostics
fix/244-selected-card-duplicates
fix/243-spec-entry-recovery
feat/242-agent-order-backfill
feat/241-order-backfill-endpoint
fix/239-syb-partial-sync
fix/238-spec-panel-preswipe
feat/237-client-api-keys
feat/236-purchaser-syb-sync
fix/235-syb-pagination-overlap
release/234-integrated
fix/229-address-entry-dedup
fix/228-selection-proof-panel-transition
fix/227-address-panel-return
fix/226-reopen-pdd-on-manual-retry
fix/225-in-place-purchase-retry
fix/224-final-spec-revalidation
fix/223-probed-confirmed-mapping
chore/221-devharness-sync
feat/218-purchase-result-bubble
fix/217-agent-retry-current-spec
fix/216-syb-spec-role-order
feat/215-mandatory-live-spec-probe
feat/214-verified-purchase-actions
fix/212-syb-sync-shop-snapshot
feat/211-spec-entry-ready-wait
feat/210-order-result-payment-transition
feat/209-pdd-bottom-spec-entry
feat/200-ai-match-result-purchase-ready
feat/199-job-execution-logs
feat/198-syb-ai-parse
feat/195-scheduled-spec-auto-match
fix/197-ai-write-timeout
feat/190-syb-inline-correction
fix/193-address-entry-reveal
feat/194-one-click-spec-match
fix/192-order-result-scroll
No results found.
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: OPC/goauto#352
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
来源与需求(2026-09-30)
用户发现线上 Admin → SYB 商品按「创建时间」选 2026-09-28~29 仍出现 27 日订单;确认:页面标签不改名,筛选应使用 SYB 来源的商品所属货运单创建时间,不是 GoAuto 明细首次入库时间。先建单,本次不授权实施、数据库迁移、历史回填或发布。
当前事实与复核基线
bf06b2d500c9a875ea8aa9aa07b56275434c096d,2026-09-30 核对web/src/views/goauto/syb-products/index.vue、server/app/goauto/sybimport/{handler,service,sync,apply}.go、server/app/goauto/sybclient/client.go、server/app/goauto/models/schema.go。createdFrom/createdTo;服务端当前过滤syb_product.created_at。该字段由 GoAuto 首次tx.Create写入;重同步按(order_code,detail_id)更新且保留首次入库时间。/am/stock/list的筛选字段是货运单t_stock.created(日期请求dvalue);货运单StockRow.Raw带来源字段,但目前applyStockDetail只传 code/stockID/shopName,syb_product未保存来源时间。商品明细原始details[]抽查 5 条未发现独立 created 类字段;不能声称明细本身有创建时间。260927开头,其 GoAutocreatedAt在 9 月 28 日(例如 00:05);接口返回记录的createdAt均在 28~29 日,现有过滤按入库时间工作,而非来源日期。订单号前缀仅作定位,不作为日期事实。目标
createdFrom/createdTo参数与其他筛选组合交互不变;后端日期筛选改为商品所属 SYB 货运单t_stock.created的本地日期,含起止日。syb_product.created_at作为 GoAuto 入库审计时间,不改写、不拿订单号前缀或入库时间冒充来源时间。created_at。非目标
实施方案与风险边界(待实施时核对)
StockRow.Raw["created"],验证格式、缺失值与stock_id对应,随ApplyDetail写入。查询改用来源字段的左闭右开日期区间;明确 SYB 原始created为 UTC+8 本地时间的口径并做边界测试,避免服务端/MySQL/browser 时区导致跨日。源时间变化时按有证据的重同步更新,GoAuto 审计created_at不变。createdFrom/createdTo的来源时间语义、数据结构与同步规则;先更新线上 Wiki、回读 revision,再单轮镜像 sync/check。前置依赖 / 可并行 / 交付单元
created字段样本和现有迁移编号,避免与并行迁移冲突。syb_product或 SYB 同步日期/列表的工单不可并行迁移或发布,其他互不相关任务可并行。验收与测试
created=2026-09-27 23:xx、GoAuto 入库2026-09-28 00:xx,筛选 28~29 日不返回;给定 SYB 28 日 00:00 和 29 日 23:59:59 均返回,30 日 00:00 不返回。created_at假补;重复同步保持 GoAuto 审计创建时间。文档影响
有长期影响:SYB 商品列表日期参数语义、来源字段、同步与历史补齐规则;实施时更新对应 Wiki/API/架构页面。工单仅建单阶段不改 Wiki。
#352 实施回写(待验收;未迁移/未发布,2026-09-30)
fix/352-syb-source-created已推送,基于bf06b2d;提交f9c48a0(实现)、b4186a9与31ff045(Wiki 镜像)、1f3ce61(迁移测试)。未合并 main。syb_product.syb_stock_created_at,从 SYB 货运单列表created(t_stock.created,UTC+8)取值;新增/重同步写入,GoAutocreated_at不变。列表createdFrom/createdTo改用来源字段的左闭右开区间;前端「创建时间」控件和标签未修改。来源字段缺失/格式错误会包含货运单 ID 明确报错并使当日同步部分失败,已写行保留,不猜补。SELECT COUNT(*) FROM syb_product作为待补上界,并在已知同步日期范围内小批核验 SYB 列表的created可取得比例;迁移仅加列/索引,历史值仍为 NULL。迁移后记录SELECT COUNT(*) AS missing FROM syb_product WHERE syb_stock_created_at IS NULL;按已确认的 SYB 历史日期范围使用现有同步入口分段重拉(每段最多 31 天,仍受单次货运单数上限约束,超限继续缩窗)。每段记录同步任务 ID、成功/部分成功/失败、前后 missing 计数及来源抽样;同段失败后可重跑,按现有唯一键幂等覆盖。未启用店铺或来源仍缺失的记录保持 NULL 并单列报告,不用订单号前缀或 GoAuto 入库时间假补。正式发布前检查日期边界与缺失量,避免历史行在日期筛选中静默消失。go build ./...通过;git diff --check通过。完整sybimport包测试存在既有失败,例如TestReparseUpdatesStatusWhenRuleImproves在未改动基线也失败(预期 uncertain、实际 success),不属于本单。未执行 MySQL/线上迁移和生产历史回填。76037bfdf5e986c478055e7338c21ee1ba561bad、Android-Agent-API-Contractf92513e7184fe704d2b9d1c6606b16a86d8d3fb8、Architecture-and-Code-Map04a4bcf81f2f2912d101d1aa1c2d8eb802c5719e;镜像 sync 与 sync --check 通过。契约明确标注待迁移/发布。Gitea MCP 本会话不可用,按仓库规则使用已配置 Gitea API。下一步授权点:合并 main、在目标 MySQL 执行追加迁移
1789810000000_syb_stock_created_at.go、按上述有界区间补历史、发布并抽样验收。当前未获这些高风险操作授权,工单保持待验收/开放。#352 发布进度(2026-09-30)
用户授权“#352 合并和部署到线上”。已核对 origin/main 仍为
bf06b2d且 #352 分支为其快进后继;将四个提交快进合并到 main,当前 main 为1f3ce61。合并前重跑针对性 SYB 测试、迁移包测试及go build ./...均通过,工作区干净。线上只读核对:当前 release 为/home/goauto/releases/20260929-340,goauto.serviceactive;尚未切换 release 或重启。阻塞:本工单发布版本会查询新列
syb_product.syb_stock_created_at,若未先执行追加迁移1789810000000_syb_stock_created_at.go,新版 API 会报未知列。用户本次明确授权合并与部署,但未明确授权数据库迁移及历史 SYB 数据重拉;按仓库高风险门禁停在迁移前,不部署不兼容版本。等待用户明确授权该迁移及有界历史补齐(或明确选择暂不补历史并接受日期筛选暂不返回旧行)后继续。未修改线上数据库、历史行、定时任务或服务配置。