aa
This commit is contained in:
@@ -438,3 +438,24 @@ func (c *JobController) ReloadJobSpan() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 根据地址查坐标
|
||||
// @Description 根据地址查坐标
|
||||
// @Param token header string true "认证token"
|
||||
// @Param address formData string true "地址"
|
||||
// @Param cityCode formData int true "cityCode"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetCoordinateFromAddress [get]
|
||||
func (c *JobController) GetCoordinateFromAddress() {
|
||||
c.callGetCoordinateFromAddress(func(params *tJobGetCoordinateFromAddressParams) (retVal interface{}, errCode string, err error) {
|
||||
place := &struct {
|
||||
Lng float64 `json:"lng"`
|
||||
Lat float64 `json:"lat"`
|
||||
}{}
|
||||
lng, lat, err := api.AutonaviAPI.GetCoordinateFromAddressByPage(params.Address, params.CityCode)
|
||||
place.Lng = lng
|
||||
place.Lat = lat
|
||||
return place, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -385,6 +385,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetCoordinateFromAddress",
|
||||
Router: `/GetCoordinateFromAddress`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetEjyOrders",
|
||||
|
||||
Reference in New Issue
Block a user