京东商城开关

This commit is contained in:
苏尹岚
2020-06-05 13:49:03 +08:00
parent 2f7f996e64
commit e2eec50b80
5 changed files with 22 additions and 13 deletions

View File

@@ -244,6 +244,9 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
stock = 9999
}
if storeID == model.JdShopMainStoreID {
if v.JdsStockSwitch == model.NO {
stock = 0
}
err = api.JdShopAPI.UpdateSkuStock(utils.Str2Int(v.VendorSkuID), stock)
} else {
storeSkus, err2 := dao.GetStoresSkusInfo(dao.GetDB(), []int{model.JdShopMainStoreID}, []int{v.SkuID})