29 lines
763 B
Go
29 lines
763 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"pointly-tel/amap/model/dto"
|
|
"pointly-tel/amap/service"
|
|
)
|
|
|
|
type poi struct{}
|
|
|
|
var Poi = new(poi)
|
|
|
|
func (c *poi) Search(ctx context.Context, req *dto.SearchPoiReq) (res *dto.SearchPoiRes, err error) {
|
|
return service.PoiService.Search(ctx, req)
|
|
}
|
|
|
|
func (c *poi) Categories(ctx context.Context, _ *dto.CategoriesReq) (res *dto.CategoriesRes, err error) {
|
|
return service.CategoryService.GetCategories(ctx)
|
|
}
|
|
|
|
func (c *poi) Districts(ctx context.Context, req *dto.DistrictReq) (res *dto.DistrictRes, err error) {
|
|
return service.CategoryService.GetDistricts(ctx, req)
|
|
}
|
|
|
|
func (c *poi) Suggest(ctx context.Context, req *dto.SuggestPoiReq) (res *dto.SuggestPoiRes, err error) {
|
|
return service.PoiService.Suggest(ctx, req)
|
|
}
|