op down
This commit is contained in:
@@ -976,12 +976,20 @@ type WareSaveResult struct {
|
||||
}
|
||||
|
||||
//创建商品
|
||||
//https://porder.shop.jd.com/order/orderlist/allOrders
|
||||
func (a *API) WareSave(wareSaveParam *WareSaveParam) (wareSaveResult []*WareSaveResult, err error) {
|
||||
params := utils.Struct2FlatMap(wareSaveParam)
|
||||
result, err := a.AccessStorePage2("https://ware.shop.jd.com/rest/shop/ware/save", params, true)
|
||||
if err == nil {
|
||||
if err == nil && result["data"] != nil {
|
||||
utils.Map2StructByJson(result["data"].(map[string]interface{})["skus"], &wareSaveResult, false)
|
||||
}
|
||||
return wareSaveResult, err
|
||||
}
|
||||
|
||||
//商品上下架
|
||||
func (a *API) WareDoUpdate(op string, updateWareIds string) (err error) {
|
||||
_, err = a.AccessStorePage("https://ware.shop.jd.com/rest/ware/list/doUpdate", map[string]interface{}{
|
||||
"op": op,
|
||||
"updateWareIds": updateWareIds + ",",
|
||||
}, true)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user