yuxiadna
This commit is contained in:
@@ -84,22 +84,18 @@ func (a *API) GetStore(storeID string) (getStoreResult *GetOneStoreRespData, err
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("chainstoreQuery 获取单个门店result==================:=", result)
|
||||
if result["code"].(string) != "200" {
|
||||
return nil, fmt.Errorf("%s", result["msg"])
|
||||
}
|
||||
|
||||
fnResult := &GetOneStoreRespData{}
|
||||
if storeData, ok := result["business_data"]; ok {
|
||||
fmt.Println("chainstoreQuery storeData==================:=", storeData)
|
||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
||||
fmt.Println("chainstoreQuery err==================:=", err)
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("暂无数据")
|
||||
}
|
||||
fmt.Println("chainstoreQuery 获取单个门店==================:=", fnResult)
|
||||
|
||||
return fnResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user