This commit is contained in:
邹宗楠
2023-10-10 14:33:39 +08:00
parent 8a208b2100
commit aa4d3718ec

View File

@@ -316,12 +316,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
param.WhiteBackGroundPicUrl = whiteImg
param.WeightUnit = tiktokShop.WeightUint_G
globals.SugarLogger.Debugf("==param.Pic===== :%s", utils.Format4Output(param.Pic, false))
globals.SugarLogger.Debugf("==storeSku.SkuVendorMapCatID ===== :%s", utils.Format4Output(storeSku.SkuVendorMapCatID, false))
// 部分商品没有所属的分类,直接跳过!
if storeSku.SkuVendorMapCatID != "" {
param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID)
} else if len(param.Pic) != 0 { // 自动推导分类id
globals.SugarLogger.Debugf("whiteImg ============= %s", utils.Format4Output(whiteImg, false))
param.CategoryLeafId, err = api.GetRecommendCategory([]string{whiteImg})
if param.CategoryLeafId == 0 || err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New("当前商品本地未设置抖音分类/抖音推荐分类查询错误:"+err.Error()), storeID, model.VendorChineseNames[model.VendorIDDD], syncType)