- 修改 GetDetailReq 结构体,将 Code 字段改为 HeroCode - 更新 GetDetailRes 结构体,将 Rarity 字段改为 Stars,类型从 string 改为 int -调整 EpicHeroVO 结构体,移除 orm 标签,将 Rarity 改为 Stars- 更新相关控制器和逻辑层代码,以适应上述变更
100 lines
3.1 KiB
Go
100 lines
3.1 KiB
Go
package v1
|
|
|
|
type EpicHeroVO struct {
|
|
Id int64 `json:"id"` // 文件编号
|
|
HeroName string `json:"heroName"` // 配置编号
|
|
HeroCode string `json:"heroCode"` // 文件名
|
|
HeroAttrLv60 string `json:"heroAttrLv60"` // 文件路径
|
|
NickName string `json:"nickName"` // 配置编号
|
|
Stars int `json:"stars"` // 配置编号
|
|
Role string `json:"role"` // 配置编号
|
|
Zodiac string `json:"zodiac"` // 配置编号
|
|
HeadImgUrl string `json:"headImgUrl"` // 配置编号
|
|
Attribute string `json:"attribute"` // 配置编号
|
|
Remark string `json:"remark"` // 配置编号
|
|
}
|
|
|
|
// HeroRespSimpleVO 简要信息
|
|
type HeroRespSimpleVO struct {
|
|
Id string `json:"id"`
|
|
HeroCode string `json:"heroCode"`
|
|
HeroName string `json:"heroName"`
|
|
NickName string `json:"nickName"`
|
|
HeadImgUrl string `json:"headImgUrl"`
|
|
Stars int `json:"stars"`
|
|
Role string `json:"role"`
|
|
Attribute string `json:"attribute"`
|
|
}
|
|
|
|
// Hero60AttributeVO 基础属性
|
|
type Hero60AttributeVO struct {
|
|
Cp int `json:"cp"`
|
|
Atk int `json:"atk"`
|
|
Hp int `json:"hp"`
|
|
Spd int `json:"spd"`
|
|
Def int `json:"def"`
|
|
Chc float64 `json:"chc"`
|
|
Chd float64 `json:"chd"`
|
|
Dac float64 `json:"dac"`
|
|
Eff float64 `json:"eff"`
|
|
Efr float64 `json:"efr"`
|
|
}
|
|
|
|
// HeroSetAvgVO 平均属性
|
|
type HeroSetAvgVO struct {
|
|
Cp int `json:"cp"`
|
|
Atk int `json:"atk"`
|
|
Hp int `json:"hp"`
|
|
Spd int `json:"spd"`
|
|
Def int `json:"def"`
|
|
Chc float64 `json:"chc"`
|
|
Chd float64 `json:"chd"`
|
|
Dac float64 `json:"dac"`
|
|
Eff float64 `json:"eff"`
|
|
Efr float64 `json:"efr"`
|
|
}
|
|
|
|
// HeroSetPercentVO 套装百分比
|
|
type HeroSetPercentVO struct {
|
|
SetName string `json:"setName"`
|
|
Percent float64 `json:"percent"`
|
|
}
|
|
|
|
// HeroArtifactPercentVO 神器百分比
|
|
type HeroArtifactPercentVO struct {
|
|
ArtifactCode string `json:"artifactCode"`
|
|
ArtifactName string `json:"artifactName"`
|
|
Rarity string `json:"rarity"`
|
|
Role string `json:"role"`
|
|
ImageUrl string `json:"imageUrl"`
|
|
Percent float64 `json:"percent"`
|
|
}
|
|
|
|
// HeroSetShowVO 展示用的装备数据
|
|
type HeroSetShowVO struct {
|
|
Cp int `json:"cp"`
|
|
Atk int `json:"atk"`
|
|
Hp int `json:"hp"`
|
|
Spd int `json:"spd"`
|
|
Def int `json:"def"`
|
|
Chc float64 `json:"chc"`
|
|
Chd float64 `json:"chd"`
|
|
Dac float64 `json:"dac"`
|
|
Eff float64 `json:"eff"`
|
|
Efr float64 `json:"efr"`
|
|
Hds string `json:"hds"`
|
|
Ctr string `json:"ctr"`
|
|
ArfName string `json:"arfName"`
|
|
ArfPic string `json:"arfPic"`
|
|
}
|
|
|
|
// HeroDetailVO 角色详情主对象
|
|
type HeroDetailVO struct {
|
|
HeroRespSimpleVO *HeroRespSimpleVO `json:"heroRespSimpleVO"`
|
|
Hero60AttributeVO *Hero60AttributeVO `json:"hero60AttributeVO"`
|
|
HeroSetAvgVO *HeroSetAvgVO `json:"heroSetAvgVO"`
|
|
HeroSetPercentVOS []*HeroSetPercentVO `json:"heroSetPercentVOS"`
|
|
HeroArtifactPercentVOS []*HeroArtifactPercentVO `json:"heroArtifactPercentVOS"`
|
|
HeroSetShows []*HeroSetShowVO `json:"heroSetShows"`
|
|
}
|