门店返回参数

This commit is contained in:
邹宗楠
2022-03-30 14:30:46 +08:00
parent faf6ab8f71
commit 01edc29519
3 changed files with 28 additions and 41 deletions

View File

@@ -60,7 +60,7 @@ func (a *API) UpdateStore(updateStore *UpdateStoreParam) (err error) {
return
}
func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err error) {
func (a *API) GetStore(storeID string) (getStoreResult *GetOneStoreRespData, err error) {
params := GetOneStoreParam{
BaseInfo: BaseInfo{
AccessToken: a.accessToken,
@@ -84,12 +84,12 @@ func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err erro
if err != nil {
return nil, err
}
fmt.Println("chainstoreQuery 获取单个门店result==================:=", result)
if result["code"] != "200" {
return nil, fmt.Errorf("%s", result["msg"])
}
fnResult := &GetStoreResult{}
fnResult := &GetOneStoreRespData{}
if storeData, ok := result["business_data"]; ok {
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
return nil, err