...
|
...
|
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
import com.netflix.config.DynamicLongProperty;
|
|
|
import com.netflix.config.DynamicPropertyFactory;
|
|
|
import com.yoho.activity.common.utils.PropertiesUtil;
|
|
|
import com.yoho.activity.queue.constant.Const;
|
|
|
import com.yoho.activity.queue.service.ITimeTaskService;
|
|
|
|
...
|
...
|
@@ -20,6 +21,11 @@ public class LuckyDrawService { |
|
|
private ITimeTaskService timeTaskService;
|
|
|
|
|
|
public LuckyDrawService() {
|
|
|
// 判断定时任务配置,true时执行定时任务,false不执行
|
|
|
if (!PropertiesUtil.getExecuteTask()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// 服务启动后5分钟执行任务,起一个每天(默认间隔)执行一次的线程,对活动进行抽奖
|
|
|
DynamicLongProperty interval = DynamicPropertyFactory.getInstance().getLongProperty("drawline.luckydraw.interval", 1440);
|
|
|
|
...
|
...
|
|