feat: 复用颜色映射生成完整采购规格 (#295)

This commit is contained in:
chengma
2026-08-24 00:12:36 +08:00
parent 3f17bedf6a
commit 486a374869
10 changed files with 545 additions and 6 deletions
+8 -3
View File
@@ -163,9 +163,14 @@ func SubmitResult(db *sql.DB, taskID, clientID, idemKey string, rawBody []byte)
"未采集到任何规格,请检查商品是否已下架", ""); err != nil {
return nil, err
}
} else if err := repository.SetCollectResult(
tx, info.PddGoodsID, collected.Title, collected.ShopName, pddData); err != nil {
return nil, err
} else {
if err := repository.SetCollectResult(
tx, info.PddGoodsID, collected.Title, collected.ShopName, pddData); err != nil {
return nil, err
}
if _, err := DerivePddColorSpecMappings(tx, info.PddGoodsID); err != nil {
return nil, fmt.Errorf("PDD 采集结果已校验但派生顺运宝完整规格失败: %w", err)
}
}
}
return map[string]any{