From 3b613ec7c186902f8a4acf917c922a4ad779213f Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Tue, 22 Aug 2023 17:59:07 +0800 Subject: [PATCH] group support --- _const/rediskey/key.go | 4 ++-- _const/rediskey/key_func.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 9650a55..9f7886a 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -57,6 +57,6 @@ const ( 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数据 member:imGroupId, score:diamond - GroupSupportCountSupporter = "group:support:supporter:%s" // 群组扶持,%s:imGroupId,SADD新的支持者 + GroupSupportConsumeSummary = "group:support:consumeSummary:%s" // 群组扶持,周流水记录,zset数据,%s:日期 member:imGroupId, score:diamond + GroupSupportCountSupporter = "group:support:supporter:%s:%s" // 群组扶持,日期:imGroupId,SADD新的支持者 ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index 5aae928..82f6069 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -132,10 +132,10 @@ 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 GetGroupSupportConsumeSummary(period string) string { + return fmt.Sprintf(GroupSupportConsumeSummary, period) } -func GetGroupSupportCountSupporter(imGroupId string) string { - return fmt.Sprintf(GroupSupportCountSupporter, imGroupId) +func GetGroupSupportCountSupporter(period, imGroupId string) string { + return fmt.Sprintf(GroupSupportCountSupporter, period, imGroupId) } -- 2.22.0