变量初始化
This commit is contained in:
@@ -60,19 +60,6 @@ func (a *API) UpdateStore(updateStore *UpdateStoreParam) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type GetStoreResult struct {
|
||||
ChainStoreCode string `json:"chain_store_code"`
|
||||
ChainStoreName string `json:"chain_store_name"`
|
||||
Address string `json:"address"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
PositionSource int `json:"position_source"`
|
||||
City string `json:"city"`
|
||||
ContactPhone string `json:"contact_phone"`
|
||||
ServiceCode string `json:"service_code"`
|
||||
Status int `json:"status"` //1关店,2开店
|
||||
}
|
||||
|
||||
func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err error) {
|
||||
params := GetOneStoreParam{
|
||||
BaseInfo: BaseInfo{
|
||||
@@ -102,15 +89,15 @@ func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err erro
|
||||
return nil, fmt.Errorf("%s", result["msg"])
|
||||
}
|
||||
|
||||
fmt.Println("fn_getStoreDATA======", result["business_data"])
|
||||
fnResult := &GetStoreResult{}
|
||||
if storeData, ok := result["business_data"]; ok {
|
||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), &getStoreResult); err != nil {
|
||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
err = fmt.Errorf(result["msg"].(string))
|
||||
}
|
||||
return getStoreResult, err
|
||||
return fnResult, err
|
||||
}
|
||||
|
||||
func IsErrShopNotExist(err error) bool {
|
||||
|
||||
Reference in New Issue
Block a user