All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(player): 添加称号重复检查逻辑 防止玩家重复获得相同称号,提升系统稳定性 fix(config): 修复boss配置相关代码问题 - 新增BossController的GetList接口 - 优化import语句顺序 - 修正PetBaseConfig中Desc字段为Remark字段 - 移除Tower配置中的TaskIds冗余字段 - 完善ShopConfig字段注释内容 ```
37 lines
809 B
Go
37 lines
809 B
Go
package admin
|
|
|
|
import (
|
|
"blazing/cool"
|
|
"blazing/modules/config/service"
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type BossController struct {
|
|
*cool.Controller
|
|
}
|
|
|
|
func init() {
|
|
var task_info_controller = &BossController{
|
|
&cool.Controller{
|
|
Prefix: "/admin/config/boss",
|
|
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"},
|
|
Service: service.NewBossService(),
|
|
},
|
|
}
|
|
// 注册路由
|
|
cool.RegisterController(task_info_controller)
|
|
}
|
|
|
|
type GetListReq struct {
|
|
g.Meta `path:"/getlist" method:"POST"`
|
|
Id uint32 `json:"id" v:"required#请选择要查询的数据"`
|
|
}
|
|
|
|
func (this *BossController) GetList(ctx context.Context, req *GetListReq) (res *cool.BaseRes, err error) {
|
|
res = &cool.BaseRes{}
|
|
res.Data = service.NewBossService().GetList(req.Id)
|
|
return res, nil
|
|
}
|