2026-02-20 21:34:27 +08:00
|
|
|
package admin
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/cool"
|
|
|
|
|
"blazing/modules/config/service"
|
2026-02-21 16:48:42 +08:00
|
|
|
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
2026-02-20 21:34:27 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
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(),
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
2026-02-21 16:48:42 +08:00
|
|
|
|
|
|
|
|
type TimeMapReq struct {
|
2026-03-01 09:28:00 +08:00
|
|
|
g.Meta `path:"/timemap" method:"GET"`
|
2026-02-21 16:48:42 +08:00
|
|
|
}
|
|
|
|
|
|
2026-03-03 19:28:59 +08:00
|
|
|
// 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.
|
2026-03-01 10:44:31 +08:00
|
|
|
|
2026-03-03 19:28:59 +08:00
|
|
|
// // }
|
|
|
|
|
// return res, nil
|
|
|
|
|
// }
|
2026-03-01 09:28:00 +08:00
|
|
|
|
2026-03-01 10:44:31 +08:00
|
|
|
// type MapTipReq struct {
|
|
|
|
|
// g.Meta `path:"/maptip" method:"GET"`
|
|
|
|
|
// }
|
2026-03-01 09:28:00 +08:00
|
|
|
|
2026-03-01 10:44:31 +08:00
|
|
|
// 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
|
|
|
|
|
// }
|