Commit dbff571a authored by hujiebin's avatar hujiebin

feat:兼容

parent c5d3146d
...@@ -494,7 +494,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -494,7 +494,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr
for _, v := range groupInfo { for _, v := range groupInfo {
owners = append(owners, v.Owner) owners = append(owners, v.Owner)
} }
powerIds, powerNames, _, err := group_power_cv.BatchGetGroupPower(model.Db, owners) powerIds, powerNames, powerNameplates, powerGrades, err := group_power_cv.BatchGetGroupPower(model.Db, owners)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -570,9 +570,16 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -570,9 +570,16 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr
MicNumType: int(g.MicNumType), MicNumType: int(g.MicNumType),
GroupMedals: medals, GroupMedals: medals,
}, },
HasOnMic: len(micUsers) > 0, HasOnMic: len(micUsers) > 0,
GroupPowerId: powerIds[g.Owner], GroupPowerId: powerIds[g.Owner],
GroupPowerName: powerNames[g.Owner], GroupPowerName: powerNames[g.Owner],
GroupPowerNameplate: powerNameplates[g.Owner],
GroupPower: GroupPower{
Id: powerIds[g.Owner],
Name: powerNames[g.Owner],
Nameplate: powerNameplates[g.Owner],
Grade: powerGrades[g.Owner],
},
}, },
MicUsers: micUsers, MicUsers: micUsers,
RoomUserCount: uint(roomCount[i]), RoomUserCount: uint(roomCount[i]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment