美团配送状态,京东商城

This commit is contained in:
苏尹岚
2020-05-08 09:40:51 +08:00
parent f1d789b724
commit 221e8cf45f
6 changed files with 285 additions and 70 deletions

View File

@@ -1,6 +1,10 @@
package mtpsapi
import "fmt"
import (
"fmt"
"git.rosy.net.cn/baseapi/utils"
)
func (a *API) PagePoiUpdate(outerPoiID, contactName, contactPhone, contactEmail string) (err error) {
if outerPoiID == "" || contactName == "" || contactPhone == "" || contactEmail == "" {
@@ -12,7 +16,7 @@ func (a *API) PagePoiUpdate(outerPoiID, contactName, contactPhone, contactEmail
"contactPhone": contactPhone,
"contactEmail": contactEmail,
}
_, err = a.AccessAPI2("https://peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/update", params)
_, err = a.AccessAPI2("https://page.peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/update", params)
return err
}
@@ -21,3 +25,39 @@ func (a *API) GetAccountDetail() (err error) {
_, err = a.AccessAPI2("https://peisong.meituan.com/api", "haikuiopen/haikui/open/partner/base/detail", params)
return err
}
type GetStoreStatusResult struct {
PoiID int `json:"poiId"`
OuterPoiID string `json:"outerPoiId"`
AppkeyID int `json:"appkeyId"`
PoiName string `json:"poiName"`
CityID int `json:"cityId"`
CityName string `json:"cityName"`
ContactPhone string `json:"contactPhone"`
ContactName interface{} `json:"contactName"`
ContactEmail interface{} `json:"contactEmail"`
Address string `json:"address"`
AddressDetail interface{} `json:"addressDetail"`
OpenType int `json:"openType"`
CategoryID int `json:"categoryId"`
SecondCategoryID int `json:"secondCategoryId"`
PoiLat int `json:"poiLat"`
PoiLng int `json:"poiLng"`
SubBrandID int `json:"subBrandId"`
PoiType int `json:"poiType"`
}
func (a *API) GetStoreStatus(poiName string) (getStoreStatusResult *GetStoreStatusResult, err error) {
params := map[string]interface{}{
"poiName": poiName,
"openType": -1,
"cityId": -1,
"pageNum": 1,
"pageSize": 20,
}
result, err := a.AccessAPI2("https://page.peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/search", params)
if err == nil {
utils.Map2StructByJson(result.Data, &getStoreStatusResult, false)
}
return getStoreStatusResult, err
}