bypos-collector: 持久化采集记录去重 + Goods 系统批量导入 #24
Reference in New Issue
Block a user
Delete Branch "devin/1782276014-persistent-history-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
两大功能 + 之前的改进。
1. 跨次采集去重
采集器维护
collected.txt持久化已查询条码集。启动时loadCollected()读入历史,采集后追加写入。下次运行同一条码自动跳过。Web UI 显示「历史已采集: N 个条码」徽章。
2. Goods 系统批量导入
采集器端:
POST /api/import接收{api_url, username, password},登录 Goods 获取 JWT,读取products.jsonl,POST 到/api/import/bypos。Goods API 端:
POST /api/import/bypos(需认证):{loaded, skipped, errored}Web UI 新增 ④ 导入区域:填写 Goods 后台地址 + 管理员凭据一键导入。
之前的改进
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.