diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 8d7ccfbcc..5168c4f98 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -1,7 +1,6 @@ package jdshop import ( - "fmt" "regexp" "strings" "time" @@ -243,7 +242,6 @@ 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 @@ -254,7 +252,9 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr storeSkus, err2 := dao.GetStoresSkusInfo(dao.GetDB(), []int{model.JdShopMainStoreID}, []int{v.SkuID}) err = err2 if len(storeSkus) > 0 { - err = api.JdShopAPI.UpdateSkuSiteStock(storeSkus[0].JdsID, stock, utils.Str2Int(vendorStoreID)) + if storeSkus[0].JdsID != 0 { + err = api.JdShopAPI.UpdateSkuSiteStock(storeSkus[0].JdsID, stock, utils.Str2Int(vendorStoreID)) + } } } }