- 新增英雄详情接口,包含60级属性、套装平均属性、套装占比、神器占比等信息- 优化数据处理逻辑,提高查询效率 - 增加缓存机制,减少数据库访问- 新增数据传输对象HeroSetData和HeroSetItem,用于处理套装数据
31 lines
729 B
Go
31 lines
729 B
Go
package v1
|
|
|
|
import (
|
|
"epic/internal/model/entity"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type GetOneReq struct {
|
|
g.Meta `path:"/getOne" method:"get" tags:"Hero" summary:"Get one hero"`
|
|
Code string `v:"required" dc:"角色code"`
|
|
}
|
|
type GetOneRes struct {
|
|
*entity.EpicHeroInfo
|
|
}
|
|
|
|
// GetListReq GetListRes 列表返回所有角色
|
|
type GetListReq struct {
|
|
g.Meta `path:"/getList" method:"get" tags:"Hero" summary:"Get all hero"`
|
|
}
|
|
type GetListRes struct {
|
|
Records []*EpicHeroVO `json:"list"` // ✅ 返回一个数组
|
|
}
|
|
|
|
type GetDetailReq struct {
|
|
g.Meta `path:"/getDetail" method:"get" tags:"Hero" summary:"Get hero detail by code"`
|
|
Code string `v:"required" dc:"角色code"`
|
|
}
|
|
type GetDetailRes struct {
|
|
*HeroDetailVO
|
|
}
|