From 697f2d9e26044526d9e38d317799ee28b077aca7 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Tue, 13 Jun 2023 17:58:38 +0800 Subject: [PATCH] level --- _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 9ddf660..6c24494 100644 --- a/_const/rediskey/key.go +++ b/_const/rediskey/key.go @@ -43,6 +43,6 @@ const ( // 定时任务的互斥锁 cronLock = "cronLock:{subKey}" - ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:ip地址 - ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号 + ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:level:ip地址 + ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:level:设备号 ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index c40d669..7e59f59 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -83,10 +83,10 @@ func GetCronLockKey(subKey string) string { return strings.Replace(cronLock, "{subKey}", subKey, -1) } -func GetActIpAwardTimesKey(actId uint64, awardType int, ip string) string { - return fmt.Sprintf(ActIpGetAwardTimes, actId, awardType, ip) +func GetActIpAwardTimesKey(actId uint64, awardType, level int, ip string) string { + return fmt.Sprintf(ActIpGetAwardTimes, actId, awardType, level, ip) } -func GetActImeiAwardTimesKey(actId uint64, awardType int, device string) string { - return fmt.Sprintf(ActImeiGetAwardTimes, actId, awardType, device) +func GetActImeiAwardTimesKey(actId uint64, awardType, level int, device string) string { + return fmt.Sprintf(ActImeiGetAwardTimes, actId, awardType, level, device) } -- 2.22.0