Commit 9e768f4f authored by hujiebin's avatar hujiebin

feat:家族房间,去掉micUser

parent 9d7d5fe1
...@@ -455,32 +455,32 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -455,32 +455,32 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr
} }
// roomMicUserMap不影响排序 // roomMicUserMap不影响排序
roomMicUserMap, err := group_m.BatchGetAllMicUser(model, groupIds) //roomMicUserMap, err := group_m.BatchGetAllMicUser(model, groupIds)
if err != nil { //if err != nil {
return nil, err // return nil, err
} //}
uids := make([]uint64, 0) //uids := make([]uint64, 0)
micUsersMap := make(map[string][]uint64, 0) //micUsersMap := make(map[string][]uint64, 0)
for _, v := range groupInfo { //for _, v := range groupInfo {
micUsersMap[v.ImGroupId] = make([]uint64, 0) // micUsersMap[v.ImGroupId] = make([]uint64, 0)
//
if len(v.Password) <= 0 { // if len(v.Password) <= 0 {
// 密码群不显示麦上头像 // // 密码群不显示麦上头像
u := roomMicUserMap[v.ImGroupId] // u := roomMicUserMap[v.ImGroupId]
if len(u) >= 4 { // if len(u) >= 4 {
micUsersMap[v.ImGroupId] = u[0:4] // micUsersMap[v.ImGroupId] = u[0:4]
} else if len(u) > 0 { // } else if len(u) > 0 {
micUsersMap[v.ImGroupId] = u // micUsersMap[v.ImGroupId] = u
} // }
uids = append(uids, micUsersMap[v.ImGroupId]...) // uids = append(uids, micUsersMap[v.ImGroupId]...)
} // }
} //}
uids = utils.UniqueSliceUInt64(uids) //uids = utils.UniqueSliceUInt64(uids)
userTiny, err := user_cv.GetUserTinyMap(uids) //userTiny, err := user_cv.GetUserTinyMap(uids)
if err != nil { //if err != nil {
return nil, err // return nil, err
} //}
roomCount, err := group_m.BatchGetRoomCount(model, groupIds) roomCount, err := group_m.BatchGetRoomCount(model, groupIds)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -549,10 +549,10 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -549,10 +549,10 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr
for _, v := range groupInfo { for _, v := range groupInfo {
g := v g := v
i := v.ImGroupId i := v.ImGroupId
micUsers := make([]user_cv.CvUserTiny, 0) //micUsers := make([]user_cv.CvUserTiny, 0)
for _, j := range micUsersMap[i] { //for _, j := range micUsersMap[i] {
micUsers = append(micUsers, userTiny[j]) // micUsers = append(micUsers, userTiny[j])
} //}
var maxStage *uint16 = nil var maxStage *uint16 = nil
if s, ok := maxStageMap[i]; ok { if s, ok := maxStageMap[i]; ok {
...@@ -601,7 +601,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -601,7 +601,7 @@ 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], GroupPowerNameplate: powerNameplates[g.Owner],
...@@ -612,7 +612,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr ...@@ -612,7 +612,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr
Grade: powerGrades[g.Owner], Grade: powerGrades[g.Owner],
}, },
}, },
MicUsers: micUsers, //MicUsers: micUsers,
RoomUserCount: uint(roomCount[i]), RoomUserCount: uint(roomCount[i]),
MaxStage: maxStage, MaxStage: maxStage,
GameTypes: games[g.TxGroupId], GameTypes: games[g.TxGroupId],
......
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