饿百获取门店橱窗商品api修改
This commit is contained in:
@@ -321,73 +321,58 @@ 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 {
|
||||
SkuID string `json:"sku_id"`
|
||||
UpcID string `json:"upc_id"`
|
||||
Wid string `json:"wid"`
|
||||
UpcType string `json:"upc_type"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
ShelfNumber string `json:"shelf_number"`
|
||||
LeftNum string `json:"left_num"`
|
||||
MarketPrice int `json:"market_price"`
|
||||
Ext string `json:"ext"`
|
||||
ExtCode string `json:"ext_code"`
|
||||
WeightFlag string `json:"weight_flag"`
|
||||
IsSupplier string `json:"is_supplier"`
|
||||
PurchaseLimit string `json:"purchase_limit"`
|
||||
PreparationTime string `json:"preparation_time"`
|
||||
Weight string `json:"weight"`
|
||||
SalePrice float64 `json:"sale_price"`
|
||||
Discount int `json:"discount"`
|
||||
Enabled string `json:"enabled"`
|
||||
UpcName string `json:"upc_name"`
|
||||
Upc string `json:"upc"`
|
||||
Photos []struct {
|
||||
URL string `json:"url"`
|
||||
IsMaster int `json:"is_master"`
|
||||
} `json:"photos"`
|
||||
BrandID string `json:"brand_id"`
|
||||
DeleteTime string `json:"delete_time"`
|
||||
CreateTime string `json:"create_time"`
|
||||
NeedIce string `json:"need_ice"`
|
||||
SkuProperty []interface{} `json:"sku_property"`
|
||||
SaleUnit string `json:"sale_unit"`
|
||||
PreminusWeight int `json:"preminus_weight"`
|
||||
Minimum string `json:"minimum"`
|
||||
SaleStep string `json:"sale_step"`
|
||||
ProcessType int `json:"process_type"`
|
||||
ProcessDetail []interface{} `json:"process_detail"`
|
||||
IsInActivity int `json:"is_in_activity"`
|
||||
Cat1ID string `json:"cat1_id"`
|
||||
Cat2ID string `json:"cat2_id"`
|
||||
Cat3ID string `json:"cat3_id"`
|
||||
Propertys []interface{} `json:"propertys"`
|
||||
Description string `json:"description"`
|
||||
Rtf string `json:"rtf"`
|
||||
Summary string `json:"summary"`
|
||||
ProductionAddr1 string `json:"production_addr1"`
|
||||
ProductionAddr2 string `json:"production_addr2"`
|
||||
ProductionAddr3 string `json:"production_addr3"`
|
||||
Cat1Name string `json:"cat1_name"`
|
||||
Cat2Name string `json:"cat2_name"`
|
||||
Cat3Name string `json:"cat3_name"`
|
||||
Editable int `json:"editable"`
|
||||
SkuStatus int `json:"sku_status"`
|
||||
} `json:"sku_list"`
|
||||
type StoreShowWindowSkuList struct {
|
||||
SkuID string `json:"sku_id"`
|
||||
UpcID string `json:"upc_id"`
|
||||
Wid string `json:"wid"`
|
||||
UpcType string `json:"upc_type"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
ShelfNumber string `json:"shelf_number"`
|
||||
LeftNum string `json:"left_num"`
|
||||
MarketPrice float64 `json:"market_price"`
|
||||
Ext string `json:"ext"`
|
||||
ExtCode string `json:"ext_code"`
|
||||
WeightFlag string `json:"weight_flag"`
|
||||
IsSupplier string `json:"is_supplier"`
|
||||
PurchaseLimit string `json:"purchase_limit"`
|
||||
PreparationTime string `json:"preparation_time"`
|
||||
Weight string `json:"weight"`
|
||||
SalePrice float64 `json:"sale_price"`
|
||||
Discount int `json:"discount"`
|
||||
Enabled string `json:"enabled"`
|
||||
UpcName string `json:"upc_name"`
|
||||
Upc string `json:"upc"`
|
||||
Photos []struct {
|
||||
URL string `json:"url"`
|
||||
IsMaster int `json:"is_master"`
|
||||
} `json:"photos"`
|
||||
BrandID string `json:"brand_id"`
|
||||
DeleteTime string `json:"delete_time"`
|
||||
CreateTime string `json:"create_time"`
|
||||
NeedIce string `json:"need_ice"`
|
||||
SkuProperty []interface{} `json:"sku_property"`
|
||||
SaleUnit string `json:"sale_unit"`
|
||||
PreminusWeight int `json:"preminus_weight"`
|
||||
Minimum string `json:"minimum"`
|
||||
SaleStep string `json:"sale_step"`
|
||||
ProcessType int `json:"process_type"`
|
||||
ProcessDetail []interface{} `json:"process_detail"`
|
||||
IsInActivity int `json:"is_in_activity"`
|
||||
Cat1ID string `json:"cat1_id"`
|
||||
Cat2ID string `json:"cat2_id"`
|
||||
Cat3ID string `json:"cat3_id"`
|
||||
Propertys []interface{} `json:"propertys"`
|
||||
Description string `json:"description"`
|
||||
Rtf string `json:"rtf"`
|
||||
Summary string `json:"summary"`
|
||||
ProductionAddr1 string `json:"production_addr1"`
|
||||
ProductionAddr2 string `json:"production_addr2"`
|
||||
ProductionAddr3 string `json:"production_addr3"`
|
||||
Cat1Name string `json:"cat1_name"`
|
||||
Cat2Name string `json:"cat2_name"`
|
||||
Cat3Name string `json:"cat3_name"`
|
||||
Editable int `json:"editable"`
|
||||
SkuStatus int `json:"sku_status"`
|
||||
}
|
||||
|
||||
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