Files
epic-go/api/hero/v1/hero.go
hxt e0cd5d3428 feat(hero): 英雄详情页面增加套装和神器统计功能
- 新增英雄详情接口,包含60级属性、套装平均属性、套装占比、神器占比等信息- 优化数据处理逻辑,提高查询效率
- 增加缓存机制,减少数据库访问- 新增数据传输对象HeroSetData和HeroSetItem,用于处理套装数据
2025-06-22 22:29:12 +08:00

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
}