diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index e8bfeae0e..c8c6557cc 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -306,7 +306,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.Name = checkNameLenght(param.Name) // 暂时只考虑修改白底图,提高效率.其余图片不做修改 - img, descImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5) + globals.SugarLogger.Debugf("==========storeSku %s", utils.Format4Output(storeSku, false)) + img, descImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5}) if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) continue @@ -413,8 +414,7 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS param.Name = checkNameLenght(param.Name) // 获取上传图,商品轮播图 - globals.SugarLogger.Debugf("store_sku=========: %s", utils.Format4Output(storeSku, false)) - img, detailImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5) + img, detailImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5}) if err != nil { failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) return @@ -871,7 +871,7 @@ func GetProductFormatNew(categoryLeftId int64, vendorOrgCode string) (*product_g } // GetTiktokImgList 获取抖音图片链接 whiteImg 白底图,有的商品可能没有白底图随便用一张(创建商品专用,更新商品只考虑更新白底图,不然太慢了) -func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg, whiteImg string, img ...string) (string, string, string, error) { +func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg, whiteImg string, img []string) (string, string, string, error) { detailTiktok := "" whiteTiktok := "" tiktokImgLocal, err := dao.GetVendorImg(skuId, model.VendorIDDD) @@ -931,7 +931,6 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg, VendorID: model.VendorIDDD, } globals.SugarLogger.Debugf("===========imgs := %s", utils.Format4Output(imgs, false)) - globals.SugarLogger.Debugf("===========tiktokImgList := %s", utils.Format4Output(tiktokImgList, false)) for k, v := range tiktokImgList { if strings.Contains(k, "detail_") { detailTiktok = v.ByteUrl