This commit is contained in:
邹宗楠
2022-08-30 09:32:20 +08:00
parent c3d3ed8f16
commit 9ab4c3b6c3
6 changed files with 31 additions and 10 deletions

View File

@@ -336,13 +336,31 @@ func (a *API) CommentScore(appPoiCode string) (commentScoreResult *CommentScoreR
return commentScoreResult, err
}
type AuthorizationStatus struct {
AppID int `json:"app_id"`
AppPoiCode string `json:"app_poi_code"`
IsOnline int `json:"is_online"`
PoiName string `json:"poi_name"`
WmPoiID int `json:"wm_poi_id"`
}
// 获取授权门店列表
func (a *API) GetBoundList(otherStoreId string) (interface{}, error) {
func (a *API) GetBoundList(otherStoreId string) ([]*AuthorizationStatus, error) {
param := make(map[string]interface{}, 0)
param["page_num"] = 1
param["page_size"] = 20
if otherStoreId != "" {
param["app_poi_code"] = otherStoreId
}
return a.AccessAPI("ecommerce/poi/bound/list", true, param)
result, err := a.AccessAPI("ecommerce/poi/bound/list", true, param)
if err != nil {
return nil, err
}
var data []*AuthorizationStatus
if err := utils.Map2StructByJson(result, &data, false); err != nil {
return nil, err
}
return data, nil
}