饿百获取门店橱窗商品api修改
This commit is contained in:
@@ -321,73 +321,58 @@ type ShopList struct {
|
|||||||
ProxyBusinessState int `json:"proxy_business_state"`
|
ProxyBusinessState int `json:"proxy_business_state"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StoreShowWindowList struct {
|
type StoreShowWindowSkuList struct {
|
||||||
ID string `json:"id"`
|
SkuID string `json:"sku_id"`
|
||||||
WindowID string `json:"window_id"`
|
UpcID string `json:"upc_id"`
|
||||||
WindowName string `json:"window_name"`
|
Wid string `json:"wid"`
|
||||||
Wid string `json:"wid"`
|
UpcType string `json:"upc_type"`
|
||||||
SupplierID string `json:"supplier_id"`
|
UpdateTime string `json:"update_time"`
|
||||||
OperatorID string `json:"operator_id"`
|
ShelfNumber string `json:"shelf_number"`
|
||||||
Status string `json:"status"`
|
LeftNum string `json:"left_num"`
|
||||||
CreateTime string `json:"create_time"`
|
MarketPrice float64 `json:"market_price"`
|
||||||
UpdateTime string `json:"update_time"`
|
Ext string `json:"ext"`
|
||||||
SkuIds string `json:"sku_ids"`
|
ExtCode string `json:"ext_code"`
|
||||||
WindowType string `json:"window_type"`
|
WeightFlag string `json:"weight_flag"`
|
||||||
Ext string `json:"ext"`
|
IsSupplier string `json:"is_supplier"`
|
||||||
ShopName string `json:"shop_name"`
|
PurchaseLimit string `json:"purchase_limit"`
|
||||||
SkuList []struct {
|
PreparationTime string `json:"preparation_time"`
|
||||||
SkuID string `json:"sku_id"`
|
Weight string `json:"weight"`
|
||||||
UpcID string `json:"upc_id"`
|
SalePrice float64 `json:"sale_price"`
|
||||||
Wid string `json:"wid"`
|
Discount int `json:"discount"`
|
||||||
UpcType string `json:"upc_type"`
|
Enabled string `json:"enabled"`
|
||||||
UpdateTime string `json:"update_time"`
|
UpcName string `json:"upc_name"`
|
||||||
ShelfNumber string `json:"shelf_number"`
|
Upc string `json:"upc"`
|
||||||
LeftNum string `json:"left_num"`
|
Photos []struct {
|
||||||
MarketPrice int `json:"market_price"`
|
URL string `json:"url"`
|
||||||
Ext string `json:"ext"`
|
IsMaster int `json:"is_master"`
|
||||||
ExtCode string `json:"ext_code"`
|
} `json:"photos"`
|
||||||
WeightFlag string `json:"weight_flag"`
|
BrandID string `json:"brand_id"`
|
||||||
IsSupplier string `json:"is_supplier"`
|
DeleteTime string `json:"delete_time"`
|
||||||
PurchaseLimit string `json:"purchase_limit"`
|
CreateTime string `json:"create_time"`
|
||||||
PreparationTime string `json:"preparation_time"`
|
NeedIce string `json:"need_ice"`
|
||||||
Weight string `json:"weight"`
|
SkuProperty []interface{} `json:"sku_property"`
|
||||||
SalePrice float64 `json:"sale_price"`
|
SaleUnit string `json:"sale_unit"`
|
||||||
Discount int `json:"discount"`
|
PreminusWeight int `json:"preminus_weight"`
|
||||||
Enabled string `json:"enabled"`
|
Minimum string `json:"minimum"`
|
||||||
UpcName string `json:"upc_name"`
|
SaleStep string `json:"sale_step"`
|
||||||
Upc string `json:"upc"`
|
ProcessType int `json:"process_type"`
|
||||||
Photos []struct {
|
ProcessDetail []interface{} `json:"process_detail"`
|
||||||
URL string `json:"url"`
|
IsInActivity int `json:"is_in_activity"`
|
||||||
IsMaster int `json:"is_master"`
|
Cat1ID string `json:"cat1_id"`
|
||||||
} `json:"photos"`
|
Cat2ID string `json:"cat2_id"`
|
||||||
BrandID string `json:"brand_id"`
|
Cat3ID string `json:"cat3_id"`
|
||||||
DeleteTime string `json:"delete_time"`
|
Propertys []interface{} `json:"propertys"`
|
||||||
CreateTime string `json:"create_time"`
|
Description string `json:"description"`
|
||||||
NeedIce string `json:"need_ice"`
|
Rtf string `json:"rtf"`
|
||||||
SkuProperty []interface{} `json:"sku_property"`
|
Summary string `json:"summary"`
|
||||||
SaleUnit string `json:"sale_unit"`
|
ProductionAddr1 string `json:"production_addr1"`
|
||||||
PreminusWeight int `json:"preminus_weight"`
|
ProductionAddr2 string `json:"production_addr2"`
|
||||||
Minimum string `json:"minimum"`
|
ProductionAddr3 string `json:"production_addr3"`
|
||||||
SaleStep string `json:"sale_step"`
|
Cat1Name string `json:"cat1_name"`
|
||||||
ProcessType int `json:"process_type"`
|
Cat2Name string `json:"cat2_name"`
|
||||||
ProcessDetail []interface{} `json:"process_detail"`
|
Cat3Name string `json:"cat3_name"`
|
||||||
IsInActivity int `json:"is_in_activity"`
|
Editable int `json:"editable"`
|
||||||
Cat1ID string `json:"cat1_id"`
|
SkuStatus int `json:"sku_status"`
|
||||||
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"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *API) AccessStorePage2(subURL string, params map[string]interface{}, isPost bool, cookies map[string]string) (retVal map[string]interface{}, err error) {
|
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{}{
|
params := map[string]interface{}{
|
||||||
"wid": baiduShopID,
|
"wid": baiduShopID,
|
||||||
}
|
}
|
||||||
result, err := a.AccessStorePage("crm/shop/getcurrshopwindow", params, true)
|
result, err := a.AccessStorePage("crm/shop/getcurrshopwindow", params, true)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err2 := utils.Map2StructByJson(result, &storeShowWindowList, false)
|
err2 := utils.Map2StructByJson(result["sku_list"], &storeShowWindowList, false)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
return storeShowWindowList, err
|
return storeShowWindowList, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,6 @@ func TestGetShopListIDs(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetStoresShowWindowSkus(t *testing.T) {
|
func TestGetStoresShowWindowSkus(t *testing.T) {
|
||||||
result, _ := api.GetStoresShowWindowSkus(32267315055)
|
result, _ := api.GetStoresShowWindowSkus(32267089415)
|
||||||
t.Log(utils.Format4Output(result, false))
|
t.Log(utils.Format4Output(result, false))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user