1
This commit is contained in:
@@ -331,11 +331,14 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
param.Name = checkNameLenght(param.Name)
|
param.Name = checkNameLenght(param.Name)
|
||||||
|
|
||||||
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
|
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
|
||||||
param.Pic, param.Description, param.WhiteBackGroundPicUrl, err = GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5})
|
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 {
|
if err != nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
param.Pic = img
|
||||||
|
param.Description = descImg
|
||||||
|
param.WhiteBackGroundPicUrl = whiteImg
|
||||||
param.WeightUnit = tiktokShop.WeightUint_G
|
param.WeightUnit = tiktokShop.WeightUint_G
|
||||||
|
|
||||||
// 部分商品没有所属的分类,直接跳过!
|
// 部分商品没有所属的分类,直接跳过!
|
||||||
@@ -360,7 +363,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
if storeSku.VendorMainId == "" {
|
if storeSku.VendorMainId == "" {
|
||||||
localThing, _ := dao.GetThingToTiktokMapList(db, model.VendorIDDD, int64(storeSku.SkuID), storeDetail.VendorOrgCode)
|
localThing, _ := dao.GetThingToTiktokMapList(db, model.VendorIDDD, int64(storeSku.SkuID), storeDetail.VendorOrgCode)
|
||||||
if len(localThing) == 0 || localThing == nil {
|
if len(localThing) == 0 || localThing == nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New(fmt.Sprintf("更新主品失败,请创建主品skuId[storeId:%d,skuId:%s]", storeID, storeSku.SkuID)), storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSku, errors.New(fmt.Sprintf("更新主品失败,请创建主品skuId[storeId:%d,skuId:%d]", storeID, storeSku.SkuID)), storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
storeSku.VendorMainId = localThing[0].VendorThingID
|
storeSku.VendorMainId = localThing[0].VendorThingID
|
||||||
|
|||||||
Reference in New Issue
Block a user