diff --git a/_const/enum/groupPower_e/grade.go b/_const/enum/groupPower_e/grade.go index d504b38db9327e7e02e0617198671451e0d19453..9879b25fd0a8bc3e3690d091f475d389e8340806 100644 --- a/_const/enum/groupPower_e/grade.go +++ b/_const/enum/groupPower_e/grade.go @@ -5,21 +5,20 @@ import "git.hilo.cn/hilo-common/resource/mysql" type GroupPowerGrade int const ( - GroupPowerGrade0 GroupPowerGrade = 0 - GroupPowerGrade1 GroupPowerGrade = 1 // 青铜 - GroupPowerGrade2 GroupPowerGrade = 2 // 白银 - GroupPowerGrade3 GroupPowerGrade = 3 // 黄金 - GroupPowerGrade4 GroupPowerGrade = 4 // 黑金 + GroupPowerGrade0 GroupPowerGrade = 0 // 青铜 + GroupPowerGrade1 GroupPowerGrade = 1 // 白银 + GroupPowerGrade2 GroupPowerGrade = 2 // 黄金 + GroupPowerGrade3 GroupPowerGrade = 3 // 黑金 - GroupPowerGradeMax = GroupPowerGrade4 + GroupPowerGradeMax = GroupPowerGrade3 ) var ( GroupPowerGradeExp = map[GroupPowerGrade]mysql.Num{ + GroupPowerGrade0: 0, GroupPowerGrade1: 2500000, GroupPowerGrade2: 15000000, - GroupPowerGrade3: 45000000, // todo - GroupPowerGrade4: 60000000, + GroupPowerGrade3: 60000000, } ) diff --git a/cv/group_power_cv/group_rank.go b/cv/group_power_cv/group_rank.go index b15675f8d289e9d33b0c2c427ad7d68b9ba8c1e8..ce427664d2b308ffc7bb0c57853bc04ab39ae151 100644 --- a/cv/group_power_cv/group_rank.go +++ b/cv/group_power_cv/group_rank.go @@ -63,28 +63,27 @@ type CvGroupPowerGradeDetail struct { } var CvResGradeList = []CvResGrade{ - {groupPower_e.GroupPowerGrade1, "青铜icon", "青铜bigIcon"}, // todo - {groupPower_e.GroupPowerGrade2, "白银icon", "白银bigIcon"}, // todo - {groupPower_e.GroupPowerGrade3, "黄金icon", "黄金bigIcon"}, // todo - {groupPower_e.GroupPowerGrade4, "黑金icon", "黑金bigIcon"}, // todo + {groupPower_e.GroupPowerGrade0, "青铜icon", "青铜bigIcon"}, // todo + {groupPower_e.GroupPowerGrade1, "白银icon", "白银bigIcon"}, // todo + {groupPower_e.GroupPowerGrade2, "黄金icon", "黄金bigIcon"}, // todo + {groupPower_e.GroupPowerGrade3, "黑金icon", "黑金bigIcon"}, // todo } var GroupPowerGradePrivilegeNum = map[groupPower_e.GroupPowerGrade][]CvPrivilege{ - groupPower_e.GroupPowerGrade0: {}, - groupPower_e.GroupPowerGrade1: { + groupPower_e.GroupPowerGrade0: { {groupPower_e.GroupPowerPrivilegeMemberNum, 300}, {groupPower_e.GroupPowerPrivilegeMgrNum, 10}, {groupPower_e.GroupPowerPrivilegeNameplate, 1}, {groupPower_e.GroupPowerPrivilegeMedal, 1}, }, - groupPower_e.GroupPowerGrade2: { + groupPower_e.GroupPowerGrade1: { {groupPower_e.GroupPowerPrivilegeMemberNum, 500}, {groupPower_e.GroupPowerPrivilegeMgrNum, 15}, {groupPower_e.GroupPowerPrivilegeNameplate, 1}, {groupPower_e.GroupPowerPrivilegeMedal, 1}, {groupPower_e.GroupPowerPrivilegeNameplateEdit, 1}, }, - groupPower_e.GroupPowerGrade3: { + groupPower_e.GroupPowerGrade2: { {groupPower_e.GroupPowerPrivilegeMemberNum, 800}, {groupPower_e.GroupPowerPrivilegeMgrNum, 20}, {groupPower_e.GroupPowerPrivilegeNameplate, 1}, @@ -92,7 +91,7 @@ var GroupPowerGradePrivilegeNum = map[groupPower_e.GroupPowerGrade][]CvPrivilege {groupPower_e.GroupPowerPrivilegeNameplateEdit, 1}, {groupPower_e.GroupPowerPrivilegeNameplateHeadwear, 1}, }, - groupPower_e.GroupPowerGrade4: { + groupPower_e.GroupPowerGrade3: { {groupPower_e.GroupPowerPrivilegeMemberNum, 1200}, {groupPower_e.GroupPowerPrivilegeMgrNum, 25}, {groupPower_e.GroupPowerPrivilegeNameplate, 1}, diff --git a/domain/model/groupPower_m/group_grade.go b/domain/model/groupPower_m/group_grade.go index 99796297e7ded24d47a11e33a13194d5ced15893..2334292a58fb9dba9383b124ac1aae957e46db0e 100644 --- a/domain/model/groupPower_m/group_grade.go +++ b/domain/model/groupPower_m/group_grade.go @@ -112,8 +112,8 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp mysql.N } // 达到经验值之后升级 for grade := groupPower_e.GroupPowerGradeMax; grade >= groupPower_e.GroupPowerGrade0; grade-- { - if latestGrade.Exp > mysql.Num(groupPower_e.GroupPowerGradeExp[grade]) { - if latestGrade.Grade < grade { // 积分清零后,等级保持一段时间 + if latestGrade.Exp > groupPower_e.GroupPowerGradeExp[grade] { + if latestGrade.Grade < grade { // 升级 expireAt := now.EndOfMonth() expireAt = utils.AddDate(expireAt, 0, 1) // 等级有效期到下个月月底 updateAttrs := map[string]interface{}{