1
This commit is contained in:
@@ -226,6 +226,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
} else if localThing[0].SyncStatus == model.ThingTypeSyncSuccess {
|
||||
// 主商品存在,直接同步子商品
|
||||
childrenProductId, err := api.CreateSubProduct(utils.Str2Int64(localThing[0].VendorThingID), utils.Str2Int64(vendorStoreID))
|
||||
globals.SugarLogger.Debugf("childrenProductId=============:%s", utils.Format4Output(err, false))
|
||||
if err != nil && strings.Contains(err.Error(), "2010004") { // 2010004:主商品非在线审核通过状态,不允许绑定子商品
|
||||
// 线上本地都存在,但是线上审核不成功,就去更新主商品
|
||||
mainOrderDetail = loadMainProductId(api, storeSku, localThing[0].VendorThingID)
|
||||
@@ -279,6 +280,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
|
||||
// 同步价格,库存,上架
|
||||
failedList2 := upDateChildrenPriceStockLaunch(api, storeSku, childrenProductId, vendorStoreID, syncType)
|
||||
globals.SugarLogger.Debugf("upDateChildrenPriceStockLaunch=============:%s", utils.Format4Output(failedList2, false))
|
||||
failedList = append(failedList, failedList2...)
|
||||
storeSku.VendorSonSkuID = utils.Int64ToStr(childrenProductId) // (属性id skuID方案一)(自商品的商品id方案二)
|
||||
storeSku.VendorSkuID = utils.Int64ToStr(childrenProductId) // 子商品主id
|
||||
|
||||
Reference in New Issue
Block a user