From 61017153e806241b87c3c1d0b0e8882a5a80abef Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Fri, 28 Apr 2023 16:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _const/rediskey/key.go | 22 +++++++++++++++++++++- _const/rediskey/key_func.go | 7 +++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 8b99185..13fc9a0 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -17,5 +17,25 @@ const ( ConvertToTRTCNum = "group:covertTrtc:%s" // 某天声网房间转换成trtc的数量 // 活动相关 - TmpActUserActId = "act:tmp:%d:%d" // 模板关联活动对应的用户参与的活动id + TmpActUserActId = "act:tmp:%d:%d" // 模板关联活动对应的用户参与的活动id + ActChargeDiamond = "act:charge:%s:%d" // 活动数据,今日充值钻石数,日期:用户id + + TimesModGroupActivity = "addGroupActivity" + TimesLatGroupActivity = "groupTxId" + + ActChargeGetPoint = "act:chargeGetPoint:%s:%d:%d" // 活动数据,今日充值档位哪些用户获得过,日期:档位:用户id + ActIdChargeDiamond = "act:charge:%d:%s:%d" // 活动数据,今日充值钻石数,活动id:日期:用户id + ActIdChargeGetPoint = "act:chargeGetPoint:%d:%s:%d:%d" // 活动数据,今日充值档位哪些用户获得过,活动id:日期:档位:用户id + ActIdChargeCent = "act:charge:%d:%d" // 活动数据,活动期间充值美分,活动id:用户id + + ChargeDollar = "charge:%s:%d" // 今日充值美元,日期:用户id + // 每月首次充值返利 + MonthChargeTimes = "charge:times:%s:%d" // 本月充值次数,月份:用户id + + // 斋月活动 + RamadanDailyTaskGet = "ramadan:dailyTask:%s:%d:%d" // 斋月活动数据,某天的日常任务奖励是否已经领取,日期:模板活动id:用户id + RamadanGetDailyLottery = "ramadan:getDailyLottery:%s:%d:%d" // 斋月活动数据,某天的充值获得抽奖次数是否已经完成,日期:模板活动id:用户id + + // 开斋节活动 + OpenRamadanSendGiftLeftDiamond = "act:openRamadan:diamond:%d:%d" // 开斋节活动,剩余还没转换成积分的送礼钻石,活动id:用户id ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index 0334657..c452f7c 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -50,3 +50,10 @@ func GetConvertToTRTCNum() string { func GetUserTmpActId(relateId, userId uint64) string { return fmt.Sprintf(TmpActUserActId, relateId, userId) } + +func GetActChargeDiamond(userId, actId uint64) string { + if actId > 500 { + return fmt.Sprintf(ActIdChargeDiamond, actId, time.Now().Format(utils.DATE_FORMAT), userId) + } + return fmt.Sprintf(ActChargeDiamond, time.Now().Format(utils.DATE_FORMAT), userId) +} -- 2.22.0