This commit is contained in:
邹宗楠
2025-05-07 11:35:03 +08:00
parent 356ad15b45
commit e65c4f4091

View File

@@ -955,6 +955,7 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
detailTiktok := "" detailTiktok := ""
whiteTiktok := "" whiteTiktok := ""
tiktokImgLocal, err := dao.GetVendorImg(skuId, model.VendorIDDD) tiktokImgLocal, err := dao.GetVendorImg(skuId, model.VendorIDDD)
globals.SugarLogger.Debugf("----------tiktokImgLocal := %s", utils.Format4Output(tiktokImgLocal, false))
if err == nil && tiktokImgLocal != nil && tiktokImgLocal.Img != "" { if err == nil && tiktokImgLocal != nil && tiktokImgLocal.Img != "" {
localImgs := make([]string, 0, 0) localImgs := make([]string, 0, 0)
localImgs = append(localImgs, tiktokImgLocal.Img) localImgs = append(localImgs, tiktokImgLocal.Img)
@@ -988,6 +989,7 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
}) })
} }
} }
globals.SugarLogger.Debugf("----------imgs := %s", utils.Format4Output(imgs, false))
if detailImg != "" { if detailImg != "" {
imgs = append(imgs, tiktokShop.Imgs{ imgs = append(imgs, tiktokShop.Imgs{
Name: "detail_" + storeId + "_" + detailImg[21:54], Name: "detail_" + storeId + "_" + detailImg[21:54],
@@ -1001,6 +1003,8 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
}) })
} }
tiktokImgList, err := api.BatchUploadImages(imgs) tiktokImgList, err := api.BatchUploadImages(imgs)
globals.SugarLogger.Debugf("----------tiktokImgList := %s", utils.Format4Output(tiktokImgList, false))
globals.SugarLogger.Debugf("----------err := %s", utils.Format4Output(err, false))
if err != nil { if err != nil {
return "", "", "", err return "", "", "", err
} }