diff --git a/protocol/userProxy.proto b/protocol/userProxy.proto index 5a1f665de8f3086d8a0a519e3b613e45c467f8d3..15ce5057e44f9449dc6b0da98f15fa8e51a94472 100644 --- a/protocol/userProxy.proto +++ b/protocol/userProxy.proto @@ -355,6 +355,7 @@ message RoomInviteMember { /* id == 145 钻石变化 */ message DiamondChange { uint32 remainDiamond = 1; + uint32 remainPinkDiamond = 2; } /* id == 146 游戏横幅 */ diff --git a/rpc/user_center_func.go b/rpc/user_center_func.go index 8325600e887d349890081e2a0c293ec48436f697..e0546d0c74806f82d9ac2b93b3426456a8fe6759 100644 --- a/rpc/user_center_func.go +++ b/rpc/user_center_func.go @@ -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{ - RemainDiamond: diamond, + RemainDiamond: diamond, + RemainPinkDiamond: pinkDiamond, } if buffer, err := proto.Marshal(msg); err == nil { rspUids, err := multicast([]uint64{userId}, MsgDiamondChange, buffer) diff --git a/script/utils/utils_test.go b/script/utils/utils_test.go index 28d1a39c6c1c2d6febb0b1bbf416e6337e438d42..e845ecadf22a232191a100d63d731355dd6d607d 100644 --- a/script/utils/utils_test.go +++ b/script/utils/utils_test.go @@ -10,6 +10,6 @@ func TestTestCommon(t *testing.T) { } func TestJwt(t *testing.T) { - token, _ := jwt.GenerateToken(4549, "f98c7fe5698e447c998615332eb660d1", "hiloApi") + token, _ := jwt.GenerateToken(7619, "f2ab93523f2a4f94825d544a67607290", "hiloApi") t.Logf(token) }