This commit is contained in:
邹宗楠
2023-03-14 16:32:47 +08:00
parent fd242ce5e6
commit 098d90228b

View File

@@ -136,7 +136,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
if storeSku.VendorMainId != "" && storeSku.VendorSkuID != "" && len(storeSku.VendorSkuID) == 19 {
continue
}
if storeSku.StoreSkuStatus != 1 { // 未可售的商品不参与修改
if storeSku.StoreSkuStatus != model.YES { // 未可售的商品不参与修改
continue
}
@@ -278,7 +278,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
}
// 同步价格,库存,上架
upDateChildrenPriceStockLaunch(api, storeSku, childrenProductId, vendorStoreID, syncType)
failedList2 := upDateChildrenPriceStockLaunch(api, storeSku, childrenProductId, vendorStoreID, syncType)
failedList = append(failedList, failedList2...)
storeSku.VendorSonSkuID = utils.Int64ToStr(childrenProductId) // (属性id skuID方案一)(自商品的商品id方案二)
storeSku.VendorSkuID = utils.Int64ToStr(childrenProductId) // 子商品主id
storeSku.VendorMainId = localThing[0].VendorThingID // 商品主id
@@ -372,7 +373,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
//// 同步价格,库存,上架
//storeSku.VendorSonSkuID = utils.Int64ToStr(childrenProductId) // (属性id skuID方案一)(自商品的商品id方案二)
//storeSku.VendorSkuID = utils.Int64ToStr(childrenProductId) // 子商品主id
upDateChildrenPriceStockLaunch(api, storeSku, utils.Str2Int64(storeSku.VendorSkuID), vendorStoreID, syncType)
failedList2 := upDateChildrenPriceStockLaunch(api, storeSku, utils.Str2Int64(storeSku.VendorSkuID), vendorStoreID, syncType)
failedList = append(failedList, failedList2...)
continue
}