Commit 1b42a226 authored by chenweijian's avatar chenweijian

redis key

parent b14c1035
......@@ -44,5 +44,5 @@ const (
cronLock = "cronLock:{subKey}"
ActIpGetAwardTimes = "act:ipAwardTimes:%d:%d:%s" // 一个ip在活动中的领奖次数 活动id:领奖类型:ip地址
ActDeviceGetAwardTimes = "act:deviceAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号
ActImeiGetAwardTimes = "act:imeiAwardTimes:%d:%d:%s" // 一个设备在活动中的领奖次数 活动id:领奖类型:设备号
)
......@@ -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)
}
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