From 1b42a22652a6a0c6180c37e8154657a46cff911b Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Tue, 13 Jun 2023 16:32:10 +0800 Subject: [PATCH] redis key --- _const/rediskey/key.go | 4 ++-- _const/rediskey/key_func.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_const/rediskey/key.go b/_const/rediskey/key.go index 8172ad0..9ddf660 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地址 - ActDeviceGetAwardTimes = "act:deviceAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号 + ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:ip地址 + ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号 ) diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index 150cfa3..c40d669 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 GetActIpGetAwardTimesKey(actId uint64, awardType int, ip string) string { +func GetActIpAwardTimesKey(actId uint64, awardType int, ip string) string { return fmt.Sprintf(ActIpGetAwardTimes, actId, awardType, ip) } -func GetActDeviceGetAwardTimesKey(actId uint64, awardType int, device string) string { - return fmt.Sprintf(ActDeviceGetAwardTimes, actId, awardType, device) +func GetActImeiAwardTimesKey(actId uint64, awardType int, device string) string { + return fmt.Sprintf(ActImeiGetAwardTimes, actId, awardType, device) } -- 2.22.0