diff --git a/cv/group_power_cv/group_rank.go b/cv/group_power_cv/group_rank.go index f97150520014cbe1a525744b990c45683bddb459..e3a44f315667f0d8af89ecd24fd77843a4303073 100644 --- a/cv/group_power_cv/group_rank.go +++ b/cv/group_power_cv/group_rank.go @@ -13,16 +13,16 @@ type CvGroupPowerInfo struct { // 家族基本信息 type CvGroupPowerBase struct { - GroupPowerId uint64 `json:"groupPowerId"` // 家族id - Icon string `json:"icon"` // 家族图片 - Name string `json:"name"` // 家族名 - Nameplate string `json:"nameplate"` // 铭牌 + Id uint64 `json:"id"` // 家族id + Icon string `json:"icon"` // 家族图片 + Name string `json:"name"` // 家族名 + Nameplate string `json:"nameplate"` // 铭牌 } // 家族成员 type CvGroupPowerMember struct { - MemberNum uint32 `json:"memberNum"` // 当前成员数 - MemberLimit uint32 `json:"memberLimit" swaggertype:"integer"` // 成员上限 + MemberNum uint32 `json:"memberNum"` // 当前成员数 + MemberMax uint32 `json:"memberMax"` // 成员上限 } // 家族等级 diff --git a/route/group_power_r/group_rank.go b/route/group_power_r/group_rank.go index c8303bfa4e07ee009addf487b22a7f9b827941c1..0b9a4f0c1fe91b8a2f0f55a45d9c24ccccb60010 100644 --- a/route/group_power_r/group_rank.go +++ b/route/group_power_r/group_rank.go @@ -74,10 +74,10 @@ func GroupPowerRank(c *gin.Context) (*mycontext.MyContext, error) { if myGroupPower != nil && v.GroupPowerId == myGroupPower.GroupPowerId && myGroupPower.Role == groupPower_e.GroupPowerUserRoleMgr { response.MyGroupPower = &group_power_cv.CvGroupPowerRankData{ CvGroupPowerBase: group_power_cv.CvGroupPowerBase{ - GroupPowerId: myGroupPower.GroupPowerId, - Icon: groupPowers[myGroupPower.GroupPowerId].Icon, - Name: groupPowers[myGroupPower.GroupPowerId].Name, - Nameplate: groupPowers[myGroupPower.GroupPowerId].Nameplate, + Id: myGroupPower.GroupPowerId, + Icon: groupPowers[myGroupPower.GroupPowerId].Icon, + Name: groupPowers[myGroupPower.GroupPowerId].Name, + Nameplate: groupPowers[myGroupPower.GroupPowerId].Nameplate, }, CvGroupPowerGrade: group_power_cv.CvGroupPowerGrade{ Grade: grades[myGroupPower.GroupPowerId].Grade, @@ -88,10 +88,10 @@ func GroupPowerRank(c *gin.Context) (*mycontext.MyContext, error) { } response.Items = append(response.Items, group_power_cv.CvGroupPowerRankData{ CvGroupPowerBase: group_power_cv.CvGroupPowerBase{ - GroupPowerId: v.GroupPowerId, - Icon: groupPowers[v.GroupPowerId].Icon, - Name: groupPowers[v.GroupPowerId].Name, - Nameplate: groupPowers[v.GroupPowerId].Nameplate, + Id: v.GroupPowerId, + Icon: groupPowers[v.GroupPowerId].Icon, + Name: groupPowers[v.GroupPowerId].Name, + Nameplate: groupPowers[v.GroupPowerId].Nameplate, }, CvGroupPowerGrade: group_power_cv.CvGroupPowerGrade{ Grade: grades[v.GroupPowerId].Grade, @@ -212,10 +212,10 @@ func GroupPowerGradeDetail(c *gin.Context) (*mycontext.MyContext, error) { } response := group_power_cv.CvGroupPowerGradeDetail{ GroupPowerBase: group_power_cv.CvGroupPowerBase{ - GroupPowerId: groupPower.ID, - Icon: groupPower.Icon, - Name: groupPower.Name, - Nameplate: groupPower.Nameplate, + Id: groupPower.ID, + Icon: groupPower.Icon, + Name: groupPower.Name, + Nameplate: groupPower.Nameplate, }, GroupPowerGrade: group_power_cv.CvGroupPowerGrade{ Grade: grade.Grade, diff --git a/route/group_power_r/inner.go b/route/group_power_r/inner.go index dc21e48ec6fc40497c728401072570db229c5e2c..cd9839c8f6041bebe16cbd78241699f104e95ff2 100644 --- a/route/group_power_r/inner.go +++ b/route/group_power_r/inner.go @@ -45,25 +45,25 @@ func MGetGroupPowers(c *gin.Context) (*mycontext.MyContext, error) { response := make(map[mysql.ID]group_power_cv.CvGroupPowerInfo) for groupPowerId, info := range groupPowers { // 成员上限 - var memberLimit mysql.Num + var memberMax mysql.Num grade := groupPowerGrade[groupPowerId].Grade if grade >= groupPower_e.GroupPowerGrade0 && grade <= groupPower_e.GroupPowerGradeMax { - memberLimit = mysql.Num(group_power_cv.GroupPowerGradePrivilegeNum[groupPowerGrade[groupPowerId].Grade][0].Num) + memberMax = mysql.Num(group_power_cv.GroupPowerGradePrivilegeNum[groupPowerGrade[groupPowerId].Grade][0].Num) } memberNum := mysql.Num(len(groupPowerUsers[groupPowerId])) - if memberNum > memberLimit { - memberLimit = memberNum + if memberNum > memberMax { + memberMax = memberNum } response[groupPowerId] = group_power_cv.CvGroupPowerInfo{ CvGroupPowerBase: group_power_cv.CvGroupPowerBase{ - GroupPowerId: groupPowerId, - Icon: info.Icon, - Name: info.Name, - Nameplate: info.Nameplate, + Id: groupPowerId, + Icon: info.Icon, + Name: info.Name, + Nameplate: info.Nameplate, }, CvGroupPowerMember: group_power_cv.CvGroupPowerMember{ - MemberNum: memberNum, - MemberLimit: memberLimit, + MemberNum: memberNum, + MemberMax: memberMax, }, } }