This commit is contained in:
邹宗楠
2022-10-19 14:01:33 +08:00
parent cbd8bdd731
commit 68cac72dc6

View File

@@ -307,6 +307,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, 0, storeSku)
// ProductFormatNew 获取商品属性
productFormatNew, err := GetProductFormatNew(param.CategoryLeafId, storeDetail.VendorOrgCode)
globals.SugarLogger.Debugf("er=====productFormatNew=========%s", productFormatNew)
if err != nil {
return nil, err
}
@@ -321,6 +322,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
// 根据本地商品id获取线上商品是否存在,存在则只创建子商品
var tiktokResultProductId int64 = 0
if _, err = api.GetSkuDetailLocalID("", param.OuterProductId); err != nil { // 线上不存在创建
globals.SugarLogger.Debugf("er==============%s", err)
globals.SugarLogger.Debugf("er==============param%s", utils.Format4Output(param, false))
tiktokResult, err := api.CreateStoreCommodity(param) // 创建主商品
if err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)