This commit is contained in:
苏尹岚
2020-12-11 09:02:17 +08:00
parent a4a0176905
commit 3484ebede0
4 changed files with 17 additions and 10 deletions

View File

@@ -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
}