...
|
...
|
@@ -97,7 +97,7 @@ public class TimeTaskServiceImpl implements ITimeTaskService { |
|
|
Integer id = drawlineActivity.getId();
|
|
|
long endTime = drawlineActivity.getEndTime().longValue() * 1000;
|
|
|
|
|
|
// 判断活动是否过期,过期立即执行抽奖,否则延迟到活动结束后两分钟执行抽奖
|
|
|
// 判断活动是否过期,过期立即执行抽奖,否则活动结束前5分钟执行抽奖
|
|
|
if (currentTime > endTime) {
|
|
|
jsonArray.add(luckyDraw(id, endTime));
|
|
|
} else {
|
...
|
...
|
@@ -106,13 +106,15 @@ public class TimeTaskServiceImpl implements ITimeTaskService { |
|
|
}
|
|
|
TIMETASK_LUCKYDRAW_LIST.add(id);
|
|
|
|
|
|
long delay = endTime - currentTime - 300000;
|
|
|
delay = 0 > delay ? 0 : delay;
|
|
|
LUCKYDRAW_TASK_EXE.schedule(new Runnable() {
|
|
|
|
|
|
@Override
|
|
|
public void run() {
|
|
|
luckyDraw(id, endTime);
|
|
|
}
|
|
|
}, endTime - currentTime - 300000, TimeUnit.MILLISECONDS);
|
|
|
}, delay, TimeUnit.MILLISECONDS);
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|