Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
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-common
Commits
25976455
Commit
25976455
authored
Feb 20, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:rpc多加一个socket命令给你
parent
cf5c61b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
user_center_coder.go
rpc/user_center_coder.go
+2
-0
user_center_func.go
rpc/user_center_func.go
+16
-0
No files found.
rpc/user_center_coder.go
View file @
25976455
...
...
@@ -58,6 +58,8 @@ const (
MsgTypeMatchV2Confirm
=
141
// 匹配-v2-确认
MsgTypeMatchV2CallReady
=
142
// 匹配-v2-callReady
MsgTypeMatchV2AddTimeGift
=
143
// 匹配-v2-送礼加时长
MsgRoomInviteMember
=
144
// 邀请用户成为房间会员
MsgDiamondChange
=
145
// 钻石数变化
)
const
(
...
...
rpc/user_center_func.go
View file @
25976455
...
...
@@ -65,3 +65,19 @@ func SendGlobalRocketNotice(groupId string, period string, round uint32, stage u
}
return
nil
}
func
SendDiamondChange
(
userId
uint64
)
error
{
rspUids
,
err
:=
multicast
([]
uint64
{
userId
},
MsgDiamondChange
,
[]
byte
(
""
))
//记录socket,注意闭包问题
go
func
(
userId
uint64
,
rspUids
[]
uint64
,
err
error
)
{
AddRpcLog
(
MsgDiamondChange
,
userId
,
""
,
rspUids
,
err
)
}(
userId
,
rspUids
,
err
)
if
err
!=
nil
{
mylogrus
.
MyLog
.
Errorf
(
"grpc SendDiamondChange send fail"
)
return
err
}
else
{
mylogrus
.
MyLog
.
Info
(
"grpc SendDiamondChange send success"
)
}
return
nil
}
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