diff --git a/cv/group_cv/group.go b/cv/group_cv/group.go index f596ee404cffe965043dcc93a9c2a266a1daa847..3ded63faf950196cd7efe17442fad13cff377fe4 100644 --- a/cv/group_cv/group.go +++ b/cv/group_cv/group.go @@ -455,32 +455,32 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr } // roomMicUserMap不影响排序 - roomMicUserMap, err := group_m.BatchGetAllMicUser(model, groupIds) - if err != nil { - return nil, err - } - uids := make([]uint64, 0) - micUsersMap := make(map[string][]uint64, 0) - for _, v := range groupInfo { - micUsersMap[v.ImGroupId] = make([]uint64, 0) - - if len(v.Password) <= 0 { - // 密码群不显示麦上头像 - u := roomMicUserMap[v.ImGroupId] - if len(u) >= 4 { - micUsersMap[v.ImGroupId] = u[0:4] - } else if len(u) > 0 { - micUsersMap[v.ImGroupId] = u - } - uids = append(uids, micUsersMap[v.ImGroupId]...) - } - } - - uids = utils.UniqueSliceUInt64(uids) - userTiny, err := user_cv.GetUserTinyMap(uids) - if err != nil { - return nil, err - } + //roomMicUserMap, err := group_m.BatchGetAllMicUser(model, groupIds) + //if err != nil { + // return nil, err + //} + //uids := make([]uint64, 0) + //micUsersMap := make(map[string][]uint64, 0) + //for _, v := range groupInfo { + // micUsersMap[v.ImGroupId] = make([]uint64, 0) + // + // if len(v.Password) <= 0 { + // // 密码群不显示麦上头像 + // u := roomMicUserMap[v.ImGroupId] + // if len(u) >= 4 { + // micUsersMap[v.ImGroupId] = u[0:4] + // } else if len(u) > 0 { + // micUsersMap[v.ImGroupId] = u + // } + // uids = append(uids, micUsersMap[v.ImGroupId]...) + // } + //} + + //uids = utils.UniqueSliceUInt64(uids) + //userTiny, err := user_cv.GetUserTinyMap(uids) + //if err != nil { + // return nil, err + //} roomCount, err := group_m.BatchGetRoomCount(model, groupIds) if err != nil { return nil, err @@ -549,10 +549,10 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr for _, v := range groupInfo { g := v i := v.ImGroupId - micUsers := make([]user_cv.CvUserTiny, 0) - for _, j := range micUsersMap[i] { - micUsers = append(micUsers, userTiny[j]) - } + //micUsers := make([]user_cv.CvUserTiny, 0) + //for _, j := range micUsersMap[i] { + // micUsers = append(micUsers, userTiny[j]) + //} var maxStage *uint16 = nil if s, ok := maxStageMap[i]; ok { @@ -601,7 +601,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr MicNumType: int(g.MicNumType), GroupMedals: medals, }, - HasOnMic: len(micUsers) > 0, + //HasOnMic: len(micUsers) > 0, GroupPowerId: powerIds[g.Owner], GroupPowerName: powerNames[g.Owner], GroupPowerNameplate: powerNameplates[g.Owner], @@ -612,7 +612,7 @@ func BuildPopularGroupInfo(model *domain.Model, myUserId uint64, groupInfo []*gr Grade: powerGrades[g.Owner], }, }, - MicUsers: micUsers, + //MicUsers: micUsers, RoomUserCount: uint(roomCount[i]), MaxStage: maxStage, GameTypes: games[g.TxGroupId],