From d986178f8d5e1a2149e8f8e0c38d32074ffbe065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 4 Dec 2020 10:19:10 +0800 Subject: [PATCH] a --- business/jxstore/cms/sync_store_sku.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index b7abb412d..3e65d29d6 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -365,19 +365,19 @@ func bindSkuAllStore(v *dao.StoreSkuSyncInfo) (err error) { task := tasksch.NewParallelTask("京东商城门店建商品", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(true), jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { storeMap := batchItemList[0].(*model.StoreMap) - if err = api.JdShop2API.StoreSkuBindStore(false, []string{utils.Int64ToStr(v.JdsID)}, []string{storeMap.VendorStoreID}); err == nil { + if err = api.JdShop2API.StoreSkuBindStore(false, []string{v.VendorSkuID}, []string{storeMap.VendorStoreID}); err == nil { storeSkus2, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, []int{v.SkuID}) if len(storeSkus2) > 0 { status := storeSkus2[0].Status stock := storeSkus2[0].Stock price := storeSkus2[0].Price if status == model.StoreSkuBindStatusNormal { - api.JdShop2API.StoreWareDoUpdate(status, v.JdsID, storeMap.VendorStoreID) + api.JdShop2API.StoreWareDoUpdate(status, utils.Str2Int64(v.VendorSkuID), storeMap.VendorStoreID) } if stock != 0 { - api.JdShop2API.StoreUpdateStock(stock, v.JdsID, storeMap.VendorStoreID) + api.JdShop2API.StoreUpdateStock(stock, utils.Str2Int64(v.VendorSkuID), storeMap.VendorStoreID) } - api.JdShop2API.StoreUpdatePrice(utils.Float64ToStr(jxutils.IntPrice2Standard(int64(price))), v.JdsID, storeMap.VendorStoreID) + api.JdShop2API.StoreUpdatePrice(utils.Float64ToStr(jxutils.IntPrice2Standard(int64(price))), utils.Str2Int64(v.VendorSkuID), storeMap.VendorStoreID) } else { return retVal, err } @@ -386,6 +386,7 @@ func bindSkuAllStore(v *dao.StoreSkuSyncInfo) (err error) { }, storeMaps) tasksch.HandleTask(task, nil, true).Run() _, err = task.GetResult(0) + return err } func updateStoreSku(db *dao.DaoDB, vendorID int, storeSkuList []*dao.StoreSkuSyncInfo, syncStatus int8) (num int64, err error) {