bypos-collector: 移除硬编码 sdogid、添加重试、补全 CSV、增加测试 #21
Reference in New Issue
Block a user
Delete Branch "devin/1782270248-bypos-collector-improvements"
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?
改进内容
安全性
$BYPOS_SDOGID读取,其次-sdogidCLI 参数,也可在 Web 控制台输入框填写。三者都未配置时启动警告、采集时报错拒绝。可靠性
lookup()改为最多 3 次重试 + 指数退避(500ms → 1s → 2s),减少因偶发超时丢失条码。功能补全
export.csv增加retmsg(原始返回)和source(数据源)两列。测试
collect_test.go:覆盖ean13Check、md5hex、sanitizeBarcodes、resolveSdogID、空 sdogid 拦截等核心逻辑。文档
Pull request closed