更新门店库存优化

This commit is contained in:
suyl
2020-05-31 11:16:03 +08:00
parent c5cf1c1d81
commit 39bf772dda

View File

@@ -253,7 +253,7 @@ 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 {
if storeSkus[0].JdsID != 0 {
if storeSkus[0].JdsID != 0 && vendorStoreID != "" {
err = api.JdShopAPI.UpdateSkuSiteStock(storeSkus[0].JdsID, stock, utils.Str2Int(vendorStoreID))
}
}