All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(controller): 增强命令注册逻辑并修复试炼塔关卡限制 - 在命令注册时检查重复方法,如果存在则panic提示错误 - 移除CurrentFreshStage和CurrentStage的默认值设置逻辑 - 添加关卡等级验证,确保用户不能挑战超过最大关卡数的关卡 - 修复试炼之塔和勇者之塔的关卡计算逻辑 fix(item): 修复道具
50 lines
1.0 KiB
Go
50 lines
1.0 KiB
Go
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
|
|
// }
|