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
8e903140
Commit
8e903140
authored
Aug 18, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:继续搞日志
parent
9c2594c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
userRoomVisit.go
domain/cache/room_c/userRoomVisit.go
+1
-1
mic.go
domain/model/group_m/mic.go
+1
-1
group_list.go
route/group_r/group_list.go
+7
-7
No files found.
domain/cache/room_c/userRoomVisit.go
View file @
8e903140
...
...
@@ -65,7 +65,7 @@ func GetUserRoomVisit(userId uint64) (map[string]int64, error) {
if
err
!=
nil
{
return
nil
,
err
}
mylogrus
.
MyLog
.
Infof
(
"GetUserRoomVisit, ZRangeWithScores %s, return %v"
,
key
,
ret
)
//
mylogrus.MyLog.Infof("GetUserRoomVisit, ZRangeWithScores %s, return %v", key, ret)
result
:=
make
(
map
[
string
]
int64
,
0
)
for
_
,
i
:=
range
ret
{
...
...
domain/model/group_m/mic.go
View file @
8e903140
...
...
@@ -875,7 +875,7 @@ var micGroupNumCache = gcache.New(10000).LRU().Build()
func
GetMicHasInGroupNum
(
model
*
domain
.
Model
)
(
map
[
string
]
int64
,
error
)
{
// get from cache
if
data
,
err
:=
micGroupNumCache
.
Get
(
micGroupNumKey
);
err
==
nil
{
model
.
Log
.
Infof
(
"GetMicHasInGroupNum cache hit:%v"
,
data
)
//
model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data)
// 正服才缓存
if
config
.
AppIsRelease
()
{
return
data
.
(
map
[
string
]
int64
),
nil
...
...
route/group_r/group_list.go
View file @
8e903140
...
...
@@ -98,7 +98,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
return
myContext
,
err
}
gameGroups
:=
group_m
.
GetGameGroupsMap
(
model
)
model
.
Log
.
Infof
(
"GetPopularGroups: page size = %d, page index = %d, banMap %v, hidenMap %v,cost:%v"
,
pageSize
,
pageIndex
,
bannedGroups
,
hiddenGroups
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups: page size = %d, page index = %d, banMap %v, hidenMap %v,cost:%v", pageSize, pageIndex, bannedGroups, hiddenGroups, time.Now().Sub(start))
hotGroupList
:=
make
([]
group_m
.
GroupInfo
,
0
)
...
...
@@ -129,7 +129,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
}
groupIds
=
append
(
groupIds
,
i
)
}
model
.
Log
.
Infof
(
"GetPopularGroups, micGroupNum: %v, banned %d, hidden %d,cost:%v"
,
micGroupNum
,
banCount
,
hiddenCount
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups, micGroupNum: %v, banned %d, hidden %d,cost:%v", micGroupNum, banCount, hiddenCount, time.Now().Sub(start))
// 3. 处理置顶群
topGroupIds
,
err
:=
getTopGroups
(
model
,
bannedGroups
,
hiddenGroups
,
area
)
...
...
@@ -857,7 +857,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
return
myContext
,
err
}
model
.
Log
.
Infof
(
"GetGroupVisitors %s: memberNum = %d, user size = %d"
,
groupId
,
len
(
rows
),
len
(
userIds
))
//
model.Log.Infof("GetGroupVisitors %s: memberNum = %d, user size = %d", groupId, len(rows), len(userIds))
result
:=
GetGroupVisitorsRsp
{
Total
:
uint
(
len
(
userIds
))}
...
...
@@ -879,7 +879,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
result
.
Online
++
}
}
model
.
Log
.
Infof
(
"GetGroupVisitors %s: statusMap size = %d, onLine = %d"
,
groupId
,
len
(
statusMap
),
result
.
Online
)
//
model.Log.Infof("GetGroupVisitors %s: statusMap size = %d, onLine = %d", groupId, len(statusMap), result.Online)
roles
,
_
,
err
:=
group_m
.
GetRolesInGroup
(
model
,
groupId
)
if
err
!=
nil
{
...
...
@@ -900,7 +900,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
return
myContext
,
err
}
model
.
Log
.
Infof
(
"GetGroupVisitors %s, users %v, roles: %v, nobles: %v, vips: %v"
,
groupId
,
userIds
,
roles
,
nobleLevels
,
vips
)
//
model.Log.Infof("GetGroupVisitors %s, users %v, roles: %v, nobles: %v, vips: %v", groupId, userIds, roles, nobleLevels, vips)
roomUsers
,
err
:=
group_m
.
RoomLivingExistsUserId
(
groupId
)
if
err
!=
nil
{
...
...
@@ -955,7 +955,7 @@ func GetGroupVisitors(c *gin.Context) (*mycontext.MyContext, error) {
return
false
})
model
.
Log
.
Infof
(
"GetGroupVisitors %s, sorted users: %v"
,
groupId
,
userIds
)
//
model.Log.Infof("GetGroupVisitors %s, sorted users: %v", groupId, userIds)
endPos
:=
pageSize
*
pageIndex
if
endPos
>
len
(
userIds
)
{
...
...
@@ -1248,7 +1248,7 @@ func GetGroupByCountry(c *gin.Context) (*mycontext.MyContext, error) {
return
myContext
,
err
}
model
.
Log
.
Infof
(
"GetGroupByCountry: page size = %d, page index = %d, banMap %v"
,
pageSize
,
pageIndex
,
bannedGroups
)
//
model.Log.Infof("GetGroupByCountry: page size = %d, page index = %d, banMap %v", pageSize, pageIndex, bannedGroups)
beginTime
:=
time
.
Now
()
groups
,
banCount
,
visitCount
,
err
:=
getCandidatesByCountry
(
model
,
bannedGroups
,
countryShortName
)
...
...
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