From 847a1d64f494e80b6e2c5e8b27bb37e71c66129b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 10 Oct 2023 10:42:46 +0800 Subject: [PATCH] 1 --- .../purchase/tiktok_store/store_sku2_utils.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index 83952e9ac..909450dcd 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -316,15 +316,15 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.WeightUnit = tiktokShop.WeightUint_G // 部分商品没有所属的分类,直接跳过! - //if storeSku.SkuVendorMapCatID != "" { - // param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID) - //} else if len(param.Pic) != 0 { // 自动推导分类id - // param.CategoryLeafId, err = api.GetRecommendCategory(strings.Split(img, "|")) - // if param.CategoryLeafId == 0 || err != nil { - // failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New("当前商品本地未设置抖音分类/抖音推荐分类查询错误:"+err.Error()), storeID, model.VendorChineseNames[model.VendorIDDD], syncType) - // continue - // } - //} + if storeSku.SkuVendorMapCatID != "" { + param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID) + } else if len(param.Pic) != 0 { // 自动推导分类id + param.CategoryLeafId, err = api.GetRecommendCategory(strings.Split(img, "|")) + if param.CategoryLeafId == 0 || err != nil { + failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New("当前商品本地未设置抖音分类/抖音推荐分类查询错误:"+err.Error()), storeID, model.VendorChineseNames[model.VendorIDDD], syncType) + continue + } + } // 获取主商品id var mainIdInt int64