package admin import ( "blazing/cool" "blazing/modules/config/service" "github.com/gogf/gf/v2/frame/g" ) type MapController struct { *cool.Controller } func init() { // 注册路由 cool.RegisterController(&MapController{ &cool.Controller{ Prefix: "/admin/config/map", Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"}, Service: service.NewMapService(), }, }) } type TimeMapReq struct { g.Meta `path:"/timemap" method:"GET"` } // func (this *MapController) TimeMap(ctx context.Context, req *TimeMapReq) (res *cool.BaseRes, err error) { // res = &cool.BaseRes{} // res.Data = service.NewMapService().GetTimeMap() // // re := service.NewMapService().GetTimeMap() // // for _, v := range re { // // v. // // } // return res, nil // } // type MapTipReq struct { // g.Meta `path:"/maptip" method:"GET"` // } // func (this *MapController) MapTip(ctx context.Context, req *MapTipReq) (res *cool.BaseRes, err error) { // res = &cool.BaseRes{} // res.Data = service.NewMapService().GetTimeMap() // return res, nil // }