京东商城开关
This commit is contained in:
@@ -46,12 +46,13 @@ type StoreSkuInfo struct {
|
||||
|
||||
Seq int `json:"seq,omitempty"`
|
||||
|
||||
ActPrice int64 `json:"actPrice,omitempty"`
|
||||
VendorActID string `json:"vendorActID,omitempty"`
|
||||
IsSpecialty int `json:"isSpecialty,omitempty"`
|
||||
JxPrice int64 `json:"jxPrice,omitempty"`
|
||||
JxUnitPrice int64 `json:"jxUnitPrice,omitempty"`
|
||||
VendorSkuID2 string `json:"vendorSkuID2,omitempty"`
|
||||
ActPrice int64 `json:"actPrice,omitempty"`
|
||||
VendorActID string `json:"vendorActID,omitempty"`
|
||||
IsSpecialty int `json:"isSpecialty,omitempty"`
|
||||
JxPrice int64 `json:"jxPrice,omitempty"`
|
||||
JxUnitPrice int64 `json:"jxUnitPrice,omitempty"`
|
||||
VendorSkuID2 string `json:"vendorSkuID2,omitempty"`
|
||||
JdsStockSwitch int `json:"jdsStockSwitch"`
|
||||
}
|
||||
|
||||
type StoreSkuInfoWithErr struct {
|
||||
|
||||
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user