...
|
...
|
@@ -131,7 +131,11 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel { |
|
|
let endTime = new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1).getTime();
|
|
|
let usedArr = await this.client.zrangebyscoreAsync(`turntable:${obj.act_id}:user:${obj.uid}:prize`, startTime, endTime);
|
|
|
|
|
|
residueCount = data.conf.day_limit_times - usedArr.length;
|
|
|
if (usedArr.length > 100) {
|
|
|
await this.client.del(`turntable:${obj.act_id}:user:${obj.uid}:prize`);
|
|
|
}
|
|
|
|
|
|
residueCount = data.conf.day_limit_times;
|
|
|
}
|
|
|
} else {
|
|
|
residueCount = 0;
|
...
|
...
|
@@ -208,7 +212,11 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel { |
|
|
let endTime = new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1).getTime();
|
|
|
let usedArr = await this.client.zrangebyscoreAsync(`turntable:${obj.act_id}:user:${obj.uid}:prize`, startTime, endTime);
|
|
|
|
|
|
residueCount = conf.day_limit_times - usedArr.length;
|
|
|
if (usedArr.length > 100) {
|
|
|
await this.client.del(`turntable:${obj.act_id}:user:${obj.uid}:prize`);
|
|
|
}
|
|
|
|
|
|
residueCount = conf.day_limit_times;
|
|
|
}
|
|
|
|
|
|
if (residueCount > 0) {
|
...
|
...
|
|