fn
This commit is contained in:
@@ -32,18 +32,16 @@ type GetStoreResult struct {
|
||||
PositionSource int `json:"position_source"`
|
||||
City string `json:"city"`
|
||||
ContactPhone string `json:"contact_phone"`
|
||||
ServiceCode int `json:"service_code"`
|
||||
ServiceCode string `json:"service_code"`
|
||||
Status int `json:"status"` //1关店,2开店
|
||||
}
|
||||
|
||||
func (a *API) GetStore(storeID int) (getStoreResult *GetStoreResult, err error) {
|
||||
func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err error) {
|
||||
result, err := a.AccessAPI("v2/chain_store/query", URL, map[string]interface{}{
|
||||
"chain_store_code": []string{utils.Int2Str(storeID)},
|
||||
"chain_store_code": []string{storeID},
|
||||
}, true)
|
||||
if err == nil {
|
||||
var results []*GetStoreResult
|
||||
utils.Map2StructByJson(result["data"], results, false)
|
||||
getStoreResult = results[0]
|
||||
utils.Map2StructByJson(result["data"].([]interface{})[0], &getStoreResult, false)
|
||||
}
|
||||
return getStoreResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user