Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
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
chenweijian
hilo-user
Compare Revisions
feature/group_room_living...master
Source
master
Select Git revision
...
Target
feature/group_room_living
Select Git revision
Compare
Commits (3)
Feature/group room living
· e3fb3ad7
hujiebin
authored
Sep 03, 2023
e3fb3ad7
Merge branch 'feature/group_room_living' into 'master'
· 8c36debc
hujiebin
authored
Sep 03, 2023
Feature/group room living See merge request
!35
8c36debc
feat:SyncGroupRoomLiving功成身退
· 12397b2d
iamhujiebin
authored
Sep 03, 2023
12397b2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
room.go
domain/model/group_m/room.go
+2
-4
No files found.
domain/model/group_m/room.go
View file @
12397b2d
...
@@ -4,7 +4,6 @@ import (
...
@@ -4,7 +4,6 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mylogrus"
"git.hilo.cn/hilo-common/mylogrus"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/redisCli"
"hilo-user/_const/redis_key/group_k"
"hilo-user/_const/redis_key/group_k"
"hilo-user/myerr"
"hilo-user/myerr"
"strconv"
"strconv"
...
@@ -26,7 +25,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
...
@@ -26,7 +25,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
return
nil
,
myerr
.
WrapErr
(
err
)
return
nil
,
myerr
.
WrapErr
(
err
)
}
}
groupUserIdstrs
,
err
:=
redisCli
.
GetRedis
()
.
ZRange
(
model
,
key
,
0
,
-
1
)
.
Result
()
groupUserIdstrs
,
err
:=
model
.
RedisCluster
.
ZRange
(
model
,
key
,
0
,
-
1
)
.
Result
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
myerr
.
WrapErr
(
err
)
return
nil
,
myerr
.
WrapErr
(
err
)
}
}
...
@@ -34,7 +33,6 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
...
@@ -34,7 +33,6 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
resultUserSet
:=
map
[
mysql
.
ID
]
string
{}
resultUserSet
:=
map
[
mysql
.
ID
]
string
{}
for
i
,
_
:=
range
groupUserIdstrs
{
for
i
,
_
:=
range
groupUserIdstrs
{
tempGroupUid
,
userId
:=
analysisMemberStr
(
groupUserIdstrs
[
i
])
tempGroupUid
,
userId
:=
analysisMemberStr
(
groupUserIdstrs
[
i
])
mylogrus
.
MyLog
.
Debugf
(
"RoomLivingUserIdFilter, analysisMemberStr %s, %d"
,
tempGroupUid
,
userId
)
if
_
,
flag
:=
userIdSet
[
userId
];
flag
{
if
_
,
flag
:=
userIdSet
[
userId
];
flag
{
resultUserSet
[
userId
]
=
tempGroupUid
resultUserSet
[
userId
]
=
tempGroupUid
...
@@ -44,7 +42,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
...
@@ -44,7 +42,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
}
}
func
ClearExpired
(
model
*
domain
.
Model
,
key
string
,
expireSec
int64
)
error
{
func
ClearExpired
(
model
*
domain
.
Model
,
key
string
,
expireSec
int64
)
error
{
return
model
.
Redis
.
ZRemRangeByScore
(
model
,
key
,
return
model
.
Redis
Cluster
.
ZRemRangeByScore
(
model
,
key
,
"0"
,
strconv
.
FormatInt
(
time
.
Now
()
.
Unix
()
-
expireSec
,
10
))
.
Err
()
"0"
,
strconv
.
FormatInt
(
time
.
Now
()
.
Unix
()
-
expireSec
,
10
))
.
Err
()
}
}
...
...