Commit 697f2d9e authored by chenweijian's avatar chenweijian

level

parent 463668ff
...@@ -43,6 +43,6 @@ const ( ...@@ -43,6 +43,6 @@ const (
// 定时任务的互斥锁 // 定时任务的互斥锁
cronLock = "cronLock:{subKey}" cronLock = "cronLock:{subKey}"
ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:ip地址 ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:level:ip地址
ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号 ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:level:设备号
) )
...@@ -83,10 +83,10 @@ func GetCronLockKey(subKey string) string { ...@@ -83,10 +83,10 @@ func GetCronLockKey(subKey string) string {
return strings.Replace(cronLock, "{subKey}", subKey, -1) return strings.Replace(cronLock, "{subKey}", subKey, -1)
} }
func GetActIpAwardTimesKey(actId uint64, awardType int, ip string) string { func GetActIpAwardTimesKey(actId uint64, awardType, level int, ip string) string {
return fmt.Sprintf(ActIpGetAwardTimes, actId, awardType, ip) return fmt.Sprintf(ActIpGetAwardTimes, actId, awardType, level, ip)
} }
func GetActImeiAwardTimesKey(actId uint64, awardType int, device string) string { func GetActImeiAwardTimesKey(actId uint64, awardType, level int, device string) string {
return fmt.Sprintf(ActImeiGetAwardTimes, actId, awardType, device) return fmt.Sprintf(ActImeiGetAwardTimes, actId, awardType, level, device)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment