feat: 任务改用采集采购独立序号 (#172)

This commit is contained in:
chengma
2026-08-12 09:21:21 +08:00
parent eca3a77084
commit 9ad067503e
15 changed files with 523 additions and 44 deletions
+4
View File
@@ -610,6 +610,10 @@ func TestCreatePddCollectTasks_不指定客户端(t *testing.T) {
if result.Created != 1 || result.Skipped() != 0 {
t.Fatalf("Created=%d Skipped=%d,期望 1/0", result.Created, result.Skipped())
}
var taskID string
if err := db.QueryRow(`SELECT task_id FROM tasks WHERE task_type='collect' AND pdd_goods_id='737116531267'`).Scan(&taskID); err != nil || taskID != "cj1" {
t.Fatalf("第一条采集任务编号=%q err=%v,期望 cj1", taskID, err)
}
status, assigned, url, ok := collectTaskOf(t, db, "737116531267")
if !ok {