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
9c2594c4
Commit
9c2594c4
authored
Aug 18, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:继续搞日志
parent
eb5462f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
group.go
cv/group_cv/group.go
+1
-1
factory.go
domain/model/group_m/factory.go
+1
-1
room.go
domain/model/group_m/room.go
+3
-3
user.go
domain/model/tim_m/user.go
+1
-1
group_info.go
route/group_r/group_info.go
+1
-1
group_list.go
route/group_r/group_list.go
+5
-5
No files found.
cv/group_cv/group.go
View file @
9c2594c4
...
@@ -321,7 +321,7 @@ func BuildJoinedGroupInfo(myService *domain.Service, myUserId uint64, originGrou
...
@@ -321,7 +321,7 @@ func BuildJoinedGroupInfo(myService *domain.Service, myUserId uint64, originGrou
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
0
,
err
return
nil
,
0
,
err
}
}
model
.
Log
.
Infof
(
"BuildJoinedGroupInfo, roomEnterTime: %v"
,
roomEnterTime
)
//
model.Log.Infof("BuildJoinedGroupInfo, roomEnterTime: %v", roomEnterTime)
// 排序优先级V8.0版本
// 排序优先级V8.0版本
sort
.
Slice
(
groupIds
,
func
(
i
,
j
int
)
bool
{
sort
.
Slice
(
groupIds
,
func
(
i
,
j
int
)
bool
{
...
...
domain/model/group_m/factory.go
View file @
9c2594c4
...
@@ -253,7 +253,7 @@ func BatchGetAllMicUser(model *domain.Model, groupIds []string) (map[string][]my
...
@@ -253,7 +253,7 @@ func BatchGetAllMicUser(model *domain.Model, groupIds []string) (map[string][]my
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
model
.
Log
.
Infof
(
"BatchGetAllMicUser redis return size = %d, mics: %v"
,
len
(
mics
),
mics
)
//
model.Log.Infof("BatchGetAllMicUser redis return size = %d, mics: %v", len(mics), mics)
if
len
(
mics
)
>=
len
(
groupIds
)
{
if
len
(
mics
)
>=
len
(
groupIds
)
{
for
i
,
g
:=
range
groupIds
{
for
i
,
g
:=
range
groupIds
{
...
...
domain/model/group_m/room.go
View file @
9c2594c4
...
@@ -333,7 +333,7 @@ func RoomLivingExistsGroup(model *domain.Model) (map[string]map[uint64]struct{},
...
@@ -333,7 +333,7 @@ func RoomLivingExistsGroup(model *domain.Model) (map[string]map[uint64]struct{},
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
myerr
.
WrapErr
(
err
)
return
nil
,
myerr
.
WrapErr
(
err
)
}
}
model
.
Log
.
Infof
(
"group_room_living RoomLivingExistsGroup groupUserIdstrs:%v"
,
groupUserIdstrs
)
//
model.Log.Infof("group_room_living RoomLivingExistsGroup groupUserIdstrs:%v", groupUserIdstrs)
groupGroup
:=
map
[
string
]
map
[
uint64
]
struct
{}{}
groupGroup
:=
map
[
string
]
map
[
uint64
]
struct
{}{}
for
i
,
_
:=
range
groupUserIdstrs
{
for
i
,
_
:=
range
groupUserIdstrs
{
tempGroupUid
,
userId
:=
analysisMemberStr
(
groupUserIdstrs
[
i
])
tempGroupUid
,
userId
:=
analysisMemberStr
(
groupUserIdstrs
[
i
])
...
@@ -429,7 +429,7 @@ func BatchGetRoomVisitCount(logE *logrus.Entry, groupIds []string) (map[string]i
...
@@ -429,7 +429,7 @@ func BatchGetRoomVisitCount(logE *logrus.Entry, groupIds []string) (map[string]i
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
logE
.
Infof
(
"MGetRoomVisitCount:%v"
,
roomVisitCount
)
//
logE.Infof("MGetRoomVisitCount:%v", roomVisitCount)
visitCount
:=
make
(
map
[
string
]
int64
)
visitCount
:=
make
(
map
[
string
]
int64
)
for
_
,
groupId
:=
range
groupIds
{
for
_
,
groupId
:=
range
groupIds
{
...
@@ -464,7 +464,7 @@ func BatchGetRoomVisitCountList(logE *logrus.Entry, groupIds []string) (map[stri
...
@@ -464,7 +464,7 @@ func BatchGetRoomVisitCountList(logE *logrus.Entry, groupIds []string) (map[stri
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
logE
.
Infof
(
"MGetRoomVisitCount:%v"
,
roomVisitCount
)
//
logE.Infof("MGetRoomVisitCount:%v", roomVisitCount)
res
:=
make
([]
*
RoomVisit
,
0
,
len
(
groupIds
))
res
:=
make
([]
*
RoomVisit
,
0
,
len
(
groupIds
))
visitCount
:=
make
(
map
[
string
]
int64
)
visitCount
:=
make
(
map
[
string
]
int64
)
...
...
domain/model/tim_m/user.go
View file @
9c2594c4
...
@@ -325,7 +325,7 @@ func GetOnlineStatus(model *domain.Model, extIds []string) (map[string]uint, err
...
@@ -325,7 +325,7 @@ func GetOnlineStatus(model *domain.Model, extIds []string) (map[string]uint, err
model
.
Log
.
Warnf
(
"getOnlineStatus redis failed"
)
model
.
Log
.
Warnf
(
"getOnlineStatus redis failed"
)
left
=
extIds
left
=
extIds
}
else
{
}
else
{
model
.
Log
.
Infof
(
"getOnlineStatus redis return size = %d: %v"
,
len
(
r
),
r
)
//
model.Log.Infof("getOnlineStatus redis return size = %d: %v", len(r), r)
if
len
(
r
)
>=
len
(
extIds
)
{
if
len
(
r
)
>=
len
(
extIds
)
{
for
i
,
e
:=
range
extIds
{
for
i
,
e
:=
range
extIds
{
...
...
route/group_r/group_info.go
View file @
9c2594c4
...
@@ -211,7 +211,7 @@ func GetTheirGroups(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -211,7 +211,7 @@ func GetTheirGroups(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
myContext
,
err
return
myContext
,
err
}
}
model
.
Log
.
Infof
(
"BuildJoinedGroupInfo, roomEnterTime: %v"
,
roomEnterTime
)
//
model.Log.Infof("BuildJoinedGroupInfo, roomEnterTime: %v", roomEnterTime)
// 正在进行的游戏
// 正在进行的游戏
games
:=
game_m
.
GetNotEndGamesMap
(
model
)
games
:=
game_m
.
GetNotEndGamesMap
(
model
)
...
...
route/group_r/group_list.go
View file @
9c2594c4
...
@@ -202,7 +202,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -202,7 +202,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
}
}
}
}
}
}
model
.
Log
.
Infof
(
"GetPopularGroups, countryScore[*]: %v,cost:%v"
,
countryScore
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups, countryScore[*]: %v,cost:%v", countryScore, time.Now().Sub(start))
now
:=
time
.
Now
()
now
:=
time
.
Now
()
bTime
:=
now
.
Add
(
-
time
.
Minute
*
30
)
bTime
:=
now
.
Add
(
-
time
.
Minute
*
30
)
...
@@ -211,7 +211,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -211,7 +211,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
myContext
,
err
return
myContext
,
err
}
}
model
.
Log
.
Infof
(
"GetPopularGroups, diamonds in 30 mins: %v,cost:%v"
,
diamonds
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups, diamonds in 30 mins: %v,cost:%v", diamonds, time.Now().Sub(start))
visitCount
,
err
:=
group_m
.
BatchGetRoomVisitCount
(
model
.
Log
,
groupIds
)
visitCount
,
err
:=
group_m
.
BatchGetRoomVisitCount
(
model
.
Log
,
groupIds
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -275,7 +275,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -275,7 +275,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
// ":" + strconv.FormatUint(diamonds[g], 10) + ":" + strconv.Itoa(int(visitCount[g]))
// ":" + strconv.FormatUint(diamonds[g], 10) + ":" + strconv.Itoa(int(visitCount[g]))
}
}
total
:=
len
(
hotGroupList
)
total
:=
len
(
hotGroupList
)
model
.
Log
.
Infof
(
"GetPopularGroups: hotGroupList size = %d,cost:%v"
,
total
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups: hotGroupList size = %d,cost:%v", total, time.Now().Sub(start))
result
:=
make
([]
group_cv
.
PopularGroupInfo
,
0
)
result
:=
make
([]
group_cv
.
PopularGroupInfo
,
0
)
...
@@ -309,7 +309,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -309,7 +309,7 @@ func GetPopularGroups(c *gin.Context) (*mycontext.MyContext, error) {
//if err != nil {
//if err != nil {
// return myContext, err
// return myContext, err
//}
//}
model
.
Log
.
Infof
(
"GetPopularGroups: final start = %d, end = %d, groupIds %v,cost:%v"
,
beginPos
,
endPos
,
groupIds
,
time
.
Now
()
.
Sub
(
start
))
//
model.Log.Infof("GetPopularGroups: final start = %d, end = %d, groupIds %v,cost:%v", beginPos, endPos, groupIds, time.Now().Sub(start))
roomCount
,
err
:=
group_m
.
BatchGetRoomCount
(
model
,
groupIds
)
roomCount
,
err
:=
group_m
.
BatchGetRoomCount
(
model
,
groupIds
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1258,7 +1258,7 @@ func GetGroupByCountry(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -1258,7 +1258,7 @@ func GetGroupByCountry(c *gin.Context) (*mycontext.MyContext, error) {
endTime
:=
time
.
Now
()
endTime
:=
time
.
Now
()
model
.
Log
.
Infof
(
"GetGroupByCountry: candidates size = %d, takes %d ms banned = %d, visitCount size = %d"
,
model
.
Log
.
Infof
(
"GetGroupByCountry: candidates size = %d, takes %d ms banned = %d, visitCount size = %d"
,
len
(
groups
),
endTime
.
Sub
(
beginTime
)
.
Milliseconds
(),
banCount
,
len
(
visitCount
))
len
(
groups
),
endTime
.
Sub
(
beginTime
)
.
Milliseconds
(),
banCount
,
len
(
visitCount
))
model
.
Log
.
Infof
(
"GetGroupByCountry cost1:%v"
,
time
.
Now
()
.
Sub
(
beginTime
))
//
model.Log.Infof("GetGroupByCountry cost1:%v", time.Now().Sub(beginTime))
hotGroupList
:=
make
([]
*
group_m
.
GroupInfo
,
0
)
hotGroupList
:=
make
([]
*
group_m
.
GroupInfo
,
0
)
...
...
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