diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 761c777ef4bfffe4bd397b5da1018ac67f9a6198..1cc86091edf83eb3f57128f972e0e9faf9ab61e7 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -51,4 +51,5 @@ const ( ExchangePinkCostDiamond = "finance:exPinkDiamond:%s:%d" // 某天兑换粉钻所花费的黄钻 日期:用户id GameAutoMathEnterRoom = "game:autoEnter:%d:%s" // 快速游戏,进入某个房间 Game1V1EnterRoom = "game:oneAndOne:%s" // 1v1游戏,进入某个房间,%s: imGroupId + Game1V1GameChannel = "game:gameChannel:%s" // 1v1游戏,发布订阅channel,游戏创建成功后的通知,%s: imGroupId ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index 6d3a58a8f34d4da5bc3b6fe940174b33273a130d..a0de79d63c9740db59c49136d2a6f7592d0f9274 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -111,3 +111,7 @@ func GetAutoMathEnterRoom(userId uint64, imGroupId string) string { func GetGame1V1EnterRoom(imGroupId string) string { return fmt.Sprintf(Game1V1EnterRoom, imGroupId) } + +func GetGame1V1GameChannel(imGroupId string) string { + return fmt.Sprintf(Game1V1GameChannel, imGroupId) +}