Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -659,7 +662,7 @@ func upDateChildrenPriceStockLaunch(api *tiktokShop.API, storeSku *dao.StoreSkuS
|
||||
|
||||
// 查询商品详情,获取商品的抖音skuId
|
||||
func getProductSkuID(api *tiktokShop.API, storeSku *dao.StoreSkuSyncInfo, syncType string, productId int64) (childrenSkuId int64, failedList []*partner.StoreSkuInfoWithErr) {
|
||||
if storeSku.VendorSonSkuID != "" && storeSku.VendorSonSkuID != storeSku.VendorSkuID {
|
||||
if storeSku.VendorSonSkuID != "" && storeSku.VendorSonSkuID != storeSku.VendorSkuID && utils.Int2Str(storeSku.SkuID) != storeSku.VendorSkuID {
|
||||
return utils.Str2Int64(storeSku.VendorSonSkuID), nil
|
||||
}
|
||||
childrenDetail, err := api.GetSkuDetail(utils.Int64ToStr(productId), "")
|
||||
|
||||
Reference in New Issue
Block a user