From 6693bd4bf582eeac358c141aea082ea33bcf8d44 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 12 Mar 2019 17:06:04 +0800 Subject: [PATCH] - update qty before price for updating jd store sku info --- business/partner/purchase/jd/store_sku.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/business/partner/purchase/jd/store_sku.go b/business/partner/purchase/jd/store_sku.go index 717074632..860889abd 100644 --- a/business/partner/purchase/jd/store_sku.go +++ b/business/partner/purchase/jd/store_sku.go @@ -109,12 +109,12 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks if len(skuVendibilityList) > 0 { _, err = api.JdAPI.BatchUpdateVendibility("", stationNo, skuVendibilityList, ctx.GetUserName()) } - if err == nil && len(skuPriceInfoList) > 0 { - _, err = api.JdAPI.UpdateVendorStationPrice("", stationNo, skuPriceInfoList) - } if err == nil && len(skuStockList) > 0 { _, err = api.JdAPI.BatchUpdateCurrentQtys("", stationNo, skuStockList, ctx.GetUserName()) } + if err == nil && len(skuPriceInfoList) > 0 { + _, err = api.JdAPI.UpdateVendorStationPrice("", stationNo, skuPriceInfoList) + } } if err == nil && len(batchSkuIDs) > 0 { db := dao.GetDB() // 多线程问题 @@ -217,12 +217,12 @@ func (p *PurchaseHandler) syncStoreSkus(ctx *jxcontext.Context, parentTask tasks if len(skuVendibilityList) > 0 { _, err = api.JdAPI.BatchUpdateVendibility("", stationNo, skuVendibilityList, ctx.GetUserName()) } - if err == nil && len(skuPriceInfoList) > 0 { - _, err = api.JdAPI.UpdateVendorStationPrice("", stationNo, skuPriceInfoList) - } if err == nil && len(skuStockList) > 0 { _, err = api.JdAPI.BatchUpdateCurrentQtys("", stationNo, skuStockList, ctx.GetUserName()) } + if err == nil && len(skuPriceInfoList) > 0 { + _, err = api.JdAPI.UpdateVendorStationPrice("", stationNo, skuPriceInfoList) + } } if err == nil && len(batchSkuIDs) > 0 { db := dao.GetDB() // 多线程问题