diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 0da1f7350..226797d12 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -350,16 +350,16 @@ func syncStoreSku() { errList.AddErr(err) case 1: //TODO 暂时不同步银豹(可能要从银豹到京西),2020-04-27 - errList.AddErr(cms.SetSingleStoreSkuSyncModifyStatus(db, []int{1, 3, 5})) + errList.AddErr(cms.SetSingleStoreSkuSyncModifyStatus(db, []int{1, 3})) // errList.AddErr(cms.SetSingleStoreSkuSyncModifyStatus(db, partner.GetSingleStoreVendorIDs())) - _, err = cms.CurVendorSync.AmendAndPruneStoreStuff(jxcontext.AdminCtx, []int{1, 3, 5}, nil, false, true, cms.AmendPruneAll, false) + _, err = cms.CurVendorSync.AmendAndPruneStoreStuff(jxcontext.AdminCtx, []int{1, 3}, nil, false, true, cms.AmendPruneAll, false) // _, err = cms.CurVendorSync.AmendAndPruneStoreStuff(jxcontext.AdminCtx, partner.GetSingleStoreVendorIDs(), nil, false, true, cms.AmendPruneAll, false) errList.AddErr(err) SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID) - taskID, err2 := cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{1, 3, 5}, nil, false, nil, nil, syncFlag, true, true) + taskID, err2 := cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{1, 3}, nil, false, nil, nil, syncFlag, true, true) // taskID, err2 := cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, partner.GetSingleStoreVendorIDs(), nil, false, nil, nil, syncFlag, true, true) errList.AddErr(err2) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index f644ae9b4..8d7ccfbcc 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -1,6 +1,7 @@ package jdshop import ( + "fmt" "regexp" "strings" "time" @@ -242,11 +243,12 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo, status int) (failedList []*partner.StoreSkuInfoWithErr, err error) { if globals.EnableJdShopWrite { var stock = 0 + fmt.Println("testUpdateSkuSiteStock", storeID, vendorStoreID) for _, v := range storeSkuList { if status == model.SkuStatusNormal { stock = 9999 } - if vendorStoreID == model.JdShopMainVendorStoreID { + if storeID == model.JdShopMainStoreID { err = api.JdShopAPI.UpdateSkuStock(utils.Str2Int(v.VendorSkuID), stock) } else { storeSkus, err2 := dao.GetStoresSkusInfo(dao.GetDB(), []int{model.JdShopMainStoreID}, []int{v.SkuID})