diff --git a/domain/service/group_power_s/group_power.go b/domain/service/group_power_s/group_power.go index c8611f5d9404209f74489c861d45facc43f9a1ed..be31fbd3ea95895a7dc8774ccdb134661ac545c0 100644 --- a/domain/service/group_power_s/group_power.go +++ b/domain/service/group_power_s/group_power.go @@ -80,7 +80,8 @@ func GetGroupPowerMaxMemberNum(model *domain.Model, familyId uint64, groupPowerG //检查是否是贵族 if flag, err := noble_m.CheckNobleLevel(model.Db, ownerId, 6); err != nil { } else if flag { - newNumMap := map[groupPower_e.GroupPowerGrade]int{1: 400, 2: 600, 3: 1000, 4: 1400} + newNumMap := map[groupPower_e.GroupPowerGrade]int{groupPower_e.GroupPowerGrade0: 400, groupPower_e.GroupPowerGrade1: 600, + groupPower_e.GroupPowerGrade2: 1000, groupPower_e.GroupPowerGrade3: 1400} if newNum, ok := newNumMap[groupPowerGrade]; ok { maxNum = newNum } diff --git a/test/group_power_test.go b/test/group_power_test.go index c8300997d445e401828bab84c167a705ceb8d956..a525325a7e1144ac8e3f5c2835959084bd165e4e 100644 --- a/test/group_power_test.go +++ b/test/group_power_test.go @@ -5,6 +5,7 @@ import ( "git.hilo.cn/hilo-common/domain" "hilo-group/domain/model/groupPower_m" "hilo-group/domain/model/group_m" + "hilo-group/domain/service/group_power_s" "testing" ) @@ -23,3 +24,8 @@ func TestIsUseTRTC(t *testing.T) { fmt.Println("true--------------") } } + +func TestIsMaxMember(t *testing.T) { + maxNum := group_power_s.GetGroupPowerMaxMemberNum(domain.CreateModelNil(), 263, grade.Grade) + fmt.Println("true--------------") +}