feat: 完善 SYB 蝦皮主数据与软删除 (#203 #204 #205)

This commit is contained in:
chengma
2026-08-13 10:39:21 +08:00
parent 3af9bf245a
commit ad1ccc2c60
23 changed files with 864 additions and 90 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ func ListShopSpecSources(q Execer, shopName string) ([]ShopSpecSource, error) {
pp.goods_id, pp.deleted_at, pp.skus_json
FROM shopee_products sp
LEFT JOIN pdd_products pp ON pp.goods_id = sp.pdd_goods_id
WHERE sp.shopee_shop_name = ?
WHERE sp.deleted_at IS NULL AND sp.shopee_shop_name = ?
ORDER BY sp.goods_id`, strings.TrimSpace(shopName))
if err != nil {
return nil, fmt.Errorf("读取店铺规格对比数据失败: %w", err)
@@ -65,7 +65,7 @@ func ListShopSpecSources(q Execer, shopName string) ([]ShopSpecSource, error) {
SELECT sk.goods_id, sk.color, sk.size, sk.parse_ok
FROM shopee_skus sk
JOIN shopee_products sp ON sp.goods_id = sk.goods_id
WHERE sp.shopee_shop_name = ?
WHERE sp.deleted_at IS NULL AND sp.shopee_shop_name = ?
ORDER BY sk.goods_id, sk.sku_id`, strings.TrimSpace(shopName))
if err != nil {
return nil, fmt.Errorf("读取店铺正式规格失败: %w", err)