- 新增英雄详情接口,包含60级属性、套装平均属性、套装占比、神器占比等信息- 优化数据处理逻辑,提高查询效率 - 增加缓存机制,减少数据库访问- 新增数据传输对象HeroSetData和HeroSetItem,用于处理套装数据
29 lines
1.0 KiB
Go
29 lines
1.0 KiB
Go
package dto
|
|
|
|
type HeroSetData struct {
|
|
Data []HeroSetItem `json:"data"`
|
|
}
|
|
|
|
type HeroSetItem struct {
|
|
ArtifactCode string `json:"artifactCode"`
|
|
Atk int `json:"atk"`
|
|
Chc int `json:"chc"`
|
|
Chd int `json:"chd"`
|
|
CreateDate string `json:"createDate"`
|
|
Def int `json:"def"`
|
|
Eff int `json:"eff"`
|
|
Efr int `json:"efr"`
|
|
Gs int `json:"gs"`
|
|
Hp int `json:"hp"`
|
|
Speed int `json:"spd"` // 注意字段名 spd 在 json 中是 speed
|
|
UnitCode string `json:"unitCode"`
|
|
UnitName string `json:"unitName"`
|
|
Sets map[string]int `json:"sets"` // 动态套装类型
|
|
SetsName string `json:"setsName"` // 解析后触发的套装效果名称,例如 "速度,生命"
|
|
}
|
|
|
|
type HeroSetGroup struct {
|
|
SetImmune int `json:"set_immune"`
|
|
SetVampire int `json:"set_vampire"`
|
|
}
|