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
d2526a18
Commit
d2526a18
authored
Jun 07, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钻石变化新的通知
parent
a0eb0a20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
userProxy.proto
protocol/userProxy.proto
+1
-0
user_center_func.go
rpc/user_center_func.go
+3
-2
utils_test.go
script/utils/utils_test.go
+1
-1
No files found.
protocol/userProxy.proto
View file @
d2526a18
...
@@ -355,6 +355,7 @@ message RoomInviteMember {
...
@@ -355,6 +355,7 @@ message RoomInviteMember {
/* id == 145 钻石变化 */
/* id == 145 钻石变化 */
message
DiamondChange
{
message
DiamondChange
{
uint32
remainDiamond
=
1
;
uint32
remainDiamond
=
1
;
uint32
remainPinkDiamond
=
2
;
}
}
/* id == 146 游戏横幅 */
/* id == 146 游戏横幅 */
...
...
rpc/user_center_func.go
View file @
d2526a18
...
@@ -68,9 +68,10 @@ func SendGlobalRocketNotice(groupId string, period string, round uint32, stage u
...
@@ -68,9 +68,10 @@ func SendGlobalRocketNotice(groupId string, period string, round uint32, stage u
}
}
// 发送钻石变化通知
// 发送钻石变化通知
func
SendDiamondChange
(
userId
uint64
,
diamond
uint32
)
error
{
func
SendDiamondChange
(
userId
uint64
,
diamond
,
pinkDiamond
uint32
)
error
{
msg
:=
&
userProxy
.
DiamondChange
{
msg
:=
&
userProxy
.
DiamondChange
{
RemainDiamond
:
diamond
,
RemainDiamond
:
diamond
,
RemainPinkDiamond
:
pinkDiamond
,
}
}
if
buffer
,
err
:=
proto
.
Marshal
(
msg
);
err
==
nil
{
if
buffer
,
err
:=
proto
.
Marshal
(
msg
);
err
==
nil
{
rspUids
,
err
:=
multicast
([]
uint64
{
userId
},
MsgDiamondChange
,
buffer
)
rspUids
,
err
:=
multicast
([]
uint64
{
userId
},
MsgDiamondChange
,
buffer
)
...
...
script/utils/utils_test.go
View file @
d2526a18
...
@@ -10,6 +10,6 @@ func TestTestCommon(t *testing.T) {
...
@@ -10,6 +10,6 @@ func TestTestCommon(t *testing.T) {
}
}
func
TestJwt
(
t
*
testing
.
T
)
{
func
TestJwt
(
t
*
testing
.
T
)
{
token
,
_
:=
jwt
.
GenerateToken
(
4549
,
"f98c7fe5698e447c998615332eb660d1
"
,
"hiloApi"
)
token
,
_
:=
jwt
.
GenerateToken
(
7619
,
"f2ab93523f2a4f94825d544a67607290
"
,
"hiloApi"
)
t
.
Logf
(
token
)
t
.
Logf
(
token
)
}
}
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