This commit is contained in:
邹宗楠
2023-02-28 15:16:39 +08:00
parent f2fc6b7975
commit dcddb3a73f

View File

@@ -390,6 +390,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
if param.StandardBrandId == 0 {
param.StandardBrandId, _ = getTiktokBrandId(api, db, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId, param.CategoryLeafId)
}
if param.StandardBrandId == 0 {
param.StandardBrandId = 596120136 // 无品牌
}
// 修改商品
param.ProductId = mainIdInt
param.MainProductId = mainIdInt
@@ -478,11 +482,10 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS
}
if param.StandardBrandId == 0 {
param.StandardBrandId, err = getTiktokBrandId(api, db, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId, param.CategoryLeafId)
if err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSku, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
return
}
param.StandardBrandId, _ = getTiktokBrandId(api, db, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId, param.CategoryLeafId)
}
if param.StandardBrandId == 0 {
param.StandardBrandId = 596120136
}
param.FreightId, param.SaleLimitId, err = getFreightIdAndSaleLimitId(api, db, storeDetail, vendorStoreID)