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
7c650262
Commit
7c650262
authored
Aug 15, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IsGameRoom
parent
17462cb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
group.go
cv/group_cv/group.go
+10
-2
groupInfo.go
domain/model/group_m/groupInfo.go
+1
-0
No files found.
cv/group_cv/group.go
View file @
7c650262
...
...
@@ -251,13 +251,21 @@ type CvCountry struct {
AreaCodeName
*
string
`json:"areaShortName"`
}
func
BuildJoinedGroupInfo
(
myService
*
domain
.
Service
,
myUserId
uint64
,
g
roupIds
[]
string
,
pageSize
,
pageIndex
int
)
([]
JoinedGroupInfo
,
int
,
error
)
{
func
BuildJoinedGroupInfo
(
myService
*
domain
.
Service
,
myUserId
uint64
,
originG
roupIds
[]
string
,
pageSize
,
pageIndex
int
)
([]
JoinedGroupInfo
,
int
,
error
)
{
model
:=
domain
.
CreateModel
(
myService
.
CtxAndDb
)
groupInfo
,
err
:=
group_m
.
BatchGetGroupInfo
(
model
,
g
roupIds
)
groupInfo
,
err
:=
group_m
.
BatchGetGroupInfo
(
model
,
originG
roupIds
)
if
err
!=
nil
{
return
nil
,
0
,
err
}
var
groupIds
[]
string
for
_
,
groupId
:=
range
originGroupIds
{
if
group
,
ok
:=
groupInfo
[
groupId
];
ok
{
if
group
.
IsGameRoom
==
0
{
groupIds
=
append
(
groupIds
,
groupId
)
}
}
}
// todo: 可以移到后面,减小查询范围,因为roomMicUserMap不影响排序
roomMicUserMap
,
err
:=
group_m
.
BatchGetAllMicUser
(
model
,
groupIds
)
...
...
domain/model/group_m/groupInfo.go
View file @
7c650262
...
...
@@ -47,6 +47,7 @@ type GroupInfo struct {
CreatedTime
time
.
Time
`gorm:"->"`
UpdatedTime
time
.
Time
`gorm:"->"`
VisitCount
int64
`gorm:"-"`
// 热度
IsGameRoom
int
}
func
GenerateGroupCode
(
n
uint16
)
string
{
...
...
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