From fccffdde3e05befdc13a96e74b9090fabb27763d Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 26 Apr 2023 10:52:29 +0800 Subject: [PATCH] 3.7 --- domain/service/group_power_s/group_power.go | 3 ++- test/group_power_test.go | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/domain/service/group_power_s/group_power.go b/domain/service/group_power_s/group_power.go index c8611f5..be31fbd 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 c830099..a525325 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--------------") +} -- 2.22.0