Commit Graph
26 Commits
Author SHA1 Message Date
QiuSW 634bd46729 fix(#73): speed up SYB purchase preview 2026-08-24 11:48:56 +08:00
QiuSW 476ca64616 fix(#72): wait for API and retry SYB load 2026-08-24 11:02:47 +08:00
QiuSW 67d8f32eaf feat(#69): add Shopee PDD specification mapping 2026-08-23 23:23:42 +08:00
QiuSW b5d0d836fd feat(#68): streamline SYB product toolbar 2026-08-22 12:04:14 +08:00
QiuSW 9490bddf8f feat(#67): add Shopee order snapshots to purchase tasks 2026-08-22 10:41:05 +08:00
QiuSW 0e3be46c4c feat(#62): extend AI matching timeout 2026-08-21 17:23:02 +08:00
QiuSW 6181d97f39 feat(#62): add AI specification matching settings 2026-08-21 17:04:49 +08:00
QiuSW 01d852011a feat(#58): batch retry failed purchase tasks 2026-08-21 14:20:40 +08:00
QiuSW 7e4f404265 feat(#44): create purchase tasks from SYB products 2026-08-21 10:17:31 +08:00
QiuSW 387577667a fix(#57): compact purchase task filters 2026-08-21 09:22:22 +08:00
QiuSW c0c88bb43f feat(#35): add purchase task admin UI 2026-08-20 23:54:17 +08:00
QiuSW d392ed54c4 refactor(#51): compact SYB product list layout 2026-08-20 15:42:15 +08:00
QiuSW badb78fa68 feat(#50): run SYB imports asynchronously 2026-08-20 15:24:50 +08:00
QiuSW 6c7a7298e3 feat(#49): complete SYB shop management 2026-08-20 11:54:11 +08:00
QiuSWandClaude Opus 5 7edb4e7b9f feat(#48): add SYB sync orchestration, import endpoint and page entry
Stage 2. Completes the path from the SYB API to the archive.

sybimport.Sync pages a date range day by day and folds each detail line
through the existing idempotent ApplyDetail. The paging loop is driven by
listTotal, never by the list response's own total, which live data
confirmed is the page's row count rather than the filtered total. A day
whose completeness cannot be proven — a short page, a total that drifted
while paging, a detail response missing an order — stops the run instead
of reporting a partial import as a whole one. Rows already written stay:
they are idempotent on (order_code, detail_id), so a re-run overwrites.

sybimport.Connect reuses the cached session and only discards it when SYB
explicitly says it is invalid. Caching the numeric user id alongside the
cookies is required, not incidental: session validation calls
/am/user/get?id=, and a wrong id comes back as a business error rather
than a logout, so cookies alone can never be revalidated.

The import endpoint is single-flight and detached from the request
context, so closing the tab cannot abandon a half-finished range. It
reads only; no SYB write endpoint is reachable from GoAuto.

The page swaps its "no import entry" warning for a date-range dialog that
warns when the span is wide — a single week held over 7000 orders — and
reports partial progress when a run fails midway.

Verified: go build, go vet, go test ./... all pass. The drift check was
mutation-tested. Not verified: the MySQL migration for syb_session, and
any browser walkthrough.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 16:56:00 +08:00
QiuSWandClaude Opus 5 136f5c94cb style(#40,#41): collapse page headings into search toolbar
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 15:32:50 +08:00
QiuSWandClaude Opus 5 03a56565ef feat(#41): add syb product admin page
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 14:49:12 +08:00
QiuSWandClaude Opus 5 40d2862c1a feat(#40): add shopee product admin page
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 13:53:51 +08:00
QiuSW ceecb5855e feat(#45): add batch collection task creation 2026-08-17 17:17:20 +08:00
QiuSW a7a453633e feat(#31): implement PDD product archive module 2026-08-17 16:04:18 +08:00
QiuSW cde2a84211 feat: configure startup ports from local config (#30) 2026-08-16 19:18:46 +08:00
QiuSW 924c6e0504 fix: recover PDD similar-product sold-out page (#29) 2026-08-15 18:07:47 +08:00
QiuSW c4e0aa75c8 feat: retry PDD detail navigation once (#28) 2026-08-15 17:44:34 +08:00
QiuSW dbeb151f1d feat: recover transient PDD sold-out pages (#27) 2026-08-15 17:23:20 +08:00
QiuSW affa6b3f8c feat: add safe PDD rule template editor (#24) 2026-08-15 15:36:58 +08:00
QiuSW 6949e53968 feat: establish GoAuto MVP baseline (#19) 2026-08-15 14:24:45 +08:00