From 209ec56071e8386aeac2bd06c850e802ac7ff2e2 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Tue, 22 Aug 2023 15:56:48 +0800 Subject: [PATCH] group support --- _const/rediskey/key.go | 3 +++ _const/rediskey/key_func.go | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 22e9fd0..02c48db 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -56,4 +56,7 @@ const ( Game1V1RoomRobot = "game:oneAndOneRobot:%s" // 1v1游戏,某个房间匹配到的机器人,%s: txGroupId, val: 机器人uid Game1V1GameTimesRecord = "game:timesRecord:%s:%d:%d:%d" // 1v1游戏,游戏次数活动记录,天日期:玩家Id:游戏gameId:对方玩家id Game1V1GameWinTimesRecord = "game:winTimesRecord:%s:%d:%d:%d" // 1v1游戏,游戏获胜次数活动记录,天日期:获胜玩家Id:游戏gameId:对方玩家id + + GroupSupportConsumeSummary = "group:support:consumeSummary" // 群组扶持,周流水记录,zset数据 + GroupSupportCountSupporter = "group:support:supporter:%s" // 群组扶持,%s:imGroupId,SADD新的支持者 ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index fa680eb..5aae928 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -131,3 +131,11 @@ func GetGame1V1GameTimesRecord(userId1, userId2 uint64, gameId int) string { func GetGame1V1GameWinTimesRecord(userId1, userId2 uint64, gameId int) string { return fmt.Sprintf(Game1V1GameWinTimesRecord, time.Now().Format(utils.COMPACT_DATE_FORMAT), userId1, gameId, userId2) } + +func GetGroupSupportConsumeSummary() string { + return GroupSupportConsumeSummary +} + +func GetGroupSupportCountSupporter(imGroupId string) string { + return fmt.Sprintf(GroupSupportCountSupporter, imGroupId) +} -- 2.22.0