Commit Graph
3 Commits
Author SHA1 Message Date
ChristandClaude Opus 4.8 980de41b53 chore: 重构配套改动 + 包文档 + 构建产物清理
automation 重构期间的配套修改:
- browser:订单抓取/密码登录/二维码刷新/stealth 等适配新流程,删 search.go
- db:cookies/orders_ext/extras/sessions/users/password/repository 等调整
- xianyu:mtop client、protocol(sign/decrypt/msgpack/cookies)、qrlogin、ws、ua
- server:admin/analytics/auth/cookie/helpers/item/item_publish_batch handlers
- frontend:App/Dashboard/ItemList/Rules/Sidebar/api/types,删 Keywords/TestPage
- auth、notify、webui、go.mod 等

本次会话补充:
- cmd/server、cmd/init-admin 改为 // Package main 开头的标准包文档
- .gitignore 加 internal/webui/static/assets/(hash 化构建产物不入库)
- internal/webui/static/index.html 重新构建

全量 go build/vet/test + race + 前端 test/build 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:41:03 +08:00
ChristandClaude Opus 4.8 3b4188c68c feat: 优雅停机 + notify 通知触发接线
优雅停机:
- account.Manager 新增 StopAll(),先收集 cookieID 再逐个停,避免持锁等 goroutine
- cmd/server 在 srv.Run 返回后(正常+出错两路径)调 mgr.StopAll() + bm.Close()
- 修掉 automation.New 被构造两次的写法(先建 adapter→mgr→autoCenter→回填)

notify 接线(此前 notify 包写好但从未被调用,配置的渠道不会触发):
- automation.Center 加 Notifier 接口 + SetNotifier,executeRule 收尾按
  成功(sent>0)/失败发通知,无匹配规则不刷屏
- main.go 注入 notify.Notifier 到 Center 和 Server
- manualShipOrders 的 full_delivery 与 status_only 两分支成功/失败都发通知
- 新增 3 个 automation 测试覆盖成功/失败/无规则通知路径
- 新增 account.TestManagerStopAll 覆盖 StopAll(-race 通过)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:40:34 +08:00
Christ 074554a6de Initial xianyu-go repository 2026-06-28 11:54:39 +08:00