This commit is contained in:
邹宗楠
2023-03-01 09:13:55 +08:00
parent 5f2b35d60e
commit f6f06d1ab0

View File

@@ -377,7 +377,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
}
// 获取商品的属性
if storeSku.TiktokAttribute == "" || storeSku.TiktokAttribute == "{}" {
if storeSku.TiktokAttribute == "" || storeSku.TiktokAttribute == "{}" || storeSku.UpcTiktokBrandId == "" {
param.ProductFormatNew, param.StandardBrandId, err = MakeProductFormatNew(api, int64(storeSku.NameID), param.CategoryLeafId, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId)
if err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
@@ -468,7 +468,7 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS
// spec_prices
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, 0, storeSku)
// 获取商品的属性
if storeSku.TiktokAttribute != "" && storeSku.TiktokAttribute != "{}" {
if storeSku.TiktokAttribute != "" && storeSku.TiktokAttribute != "{}" && storeSku.UpcTiktokBrandId != "" {
param.ProductFormatNew = storeSku.TiktokAttribute
} else {
param.ProductFormatNew, param.StandardBrandId, err = MakeProductFormatNew(api, int64(storeSku.NameID), param.CategoryLeafId, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId)