From f098ac1ccb59eedd3320154bf74fd0142e414ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 23 Dec 2022 16:15:04 +0800 Subject: [PATCH] 1 --- .../partner/purchase/tiktok_store/store_sku2_utils.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index 9c24e79cd..22f30578f 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -169,17 +169,18 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI if storeSku.SkuVendorMapCatID != "" { param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID) } else if len(param.Pic) != 0 { // 自动推导分类id - param.CategoryLeafId = api.GetRecommendCategory(strings.Split(img, "|")) + 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是,使用京西类目和抖音类目的绑定关系 // 但是不太实用,导致商品类目错误被暂停营业等 //if storeSku.VendorVendorCatID != 0 && param.CategoryLeafId == 0 { // param.CategoryLeafId = storeSku.VendorVendorCatID //} - if param.CategoryLeafId == 0 { - failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New("当前商品本地未设置抖音分类/抖音推荐分类查询错误"), storeID, model.VendorChineseNames[model.VendorIDDD], syncType) - continue - } + // 是否支持七天无理由 if api.GetProductUpdateRule(param.CategoryLeafId) { param.Supply7dayReturn = 1