饿百获取门店橱窗商品api修改
This commit is contained in:
@@ -321,21 +321,7 @@ type ShopList struct {
|
||||
ProxyBusinessState int `json:"proxy_business_state"`
|
||||
}
|
||||
|
||||
type StoreShowWindowList struct {
|
||||
ID string `json:"id"`
|
||||
WindowID string `json:"window_id"`
|
||||
WindowName string `json:"window_name"`
|
||||
Wid string `json:"wid"`
|
||||
SupplierID string `json:"supplier_id"`
|
||||
OperatorID string `json:"operator_id"`
|
||||
Status string `json:"status"`
|
||||
CreateTime string `json:"create_time"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
SkuIds string `json:"sku_ids"`
|
||||
WindowType string `json:"window_type"`
|
||||
Ext string `json:"ext"`
|
||||
ShopName string `json:"shop_name"`
|
||||
SkuList []struct {
|
||||
type StoreShowWindowSkuList struct {
|
||||
SkuID string `json:"sku_id"`
|
||||
UpcID string `json:"upc_id"`
|
||||
Wid string `json:"wid"`
|
||||
@@ -343,7 +329,7 @@ type StoreShowWindowList struct {
|
||||
UpdateTime string `json:"update_time"`
|
||||
ShelfNumber string `json:"shelf_number"`
|
||||
LeftNum string `json:"left_num"`
|
||||
MarketPrice int `json:"market_price"`
|
||||
MarketPrice float64 `json:"market_price"`
|
||||
Ext string `json:"ext"`
|
||||
ExtCode string `json:"ext_code"`
|
||||
WeightFlag string `json:"weight_flag"`
|
||||
@@ -387,7 +373,6 @@ type StoreShowWindowList struct {
|
||||
Cat3Name string `json:"cat3_name"`
|
||||
Editable int `json:"editable"`
|
||||
SkuStatus int `json:"sku_status"`
|
||||
} `json:"sku_list"`
|
||||
}
|
||||
|
||||
func (a *API) AccessStorePage2(subURL string, params map[string]interface{}, isPost bool, cookies map[string]string) (retVal map[string]interface{}, err error) {
|
||||
@@ -802,13 +787,13 @@ func (a *API) ModifyTip4OrderWaybill(orderID, elemeOrderID string, tip, zhongBao
|
||||
}
|
||||
|
||||
//查询饿百门店橱窗商品信息
|
||||
func (a *API) GetStoresShowWindowSkus(baiduShopID int64) (storeShowWindowList *StoreShowWindowList, err error) {
|
||||
func (a *API) GetStoresShowWindowSkus(baiduShopID int64) (storeShowWindowList []*StoreShowWindowSkuList, err error) {
|
||||
params := map[string]interface{}{
|
||||
"wid": baiduShopID,
|
||||
}
|
||||
result, err := a.AccessStorePage("crm/shop/getcurrshopwindow", params, true)
|
||||
if err == nil {
|
||||
err2 := utils.Map2StructByJson(result, &storeShowWindowList, false)
|
||||
err2 := utils.Map2StructByJson(result["sku_list"], &storeShowWindowList, false)
|
||||
if err2 != nil {
|
||||
return storeShowWindowList, err
|
||||
}
|
||||
|
||||
@@ -148,6 +148,6 @@ func TestGetShopListIDs(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStoresShowWindowSkus(t *testing.T) {
|
||||
result, _ := api.GetStoresShowWindowSkus(32267315055)
|
||||
result, _ := api.GetStoresShowWindowSkus(32267089415)
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user