Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
f509b53e
Commit
f509b53e
authored
Aug 28, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into fix/group_country
parents
7ee9713e
01ee2e7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
group.go
cv/group_cv/group.go
+32
-32
No files found.
cv/group_cv/group.go
View file @
f509b53e
...
...
@@ -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
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment