package com.newvideo.job;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
import com.newvideo.log.LogHelper;
|
import com.newvideo.service.imp.StatisticsService;
|
import com.newvideo.util.Constant;
|
|
/**
|
*
|
*
|
* @author Administrator
|
*
|
*/
|
@Component
|
public class StatisticsJob {
|
|
@Resource
|
private StatisticsService statisticsService;
|
|
@Scheduled(cron = "0 0 0,3 * * ?")
|
public void doJob() {
|
if (!Constant.JobTasker)
|
return;
|
|
new Thread(new Runnable() {
|
|
public void run() {
|
statisticsService.areaPlayStatistic();
|
}
|
}).start();
|
|
new Thread(new Runnable() {
|
|
public void run() {
|
statisticsService.hotSearchStatistics();
|
}
|
}).start();
|
|
new Thread(new Runnable() {
|
|
public void run() {
|
statisticsService.secondCategoryPlayStatistic();
|
}
|
}).start();
|
|
}
|
|
@Scheduled(cron = "0 1 0 * * ?")
|
public void run(){
|
if (!Constant.JobTasker)
|
return;
|
statisticsService.categoryPlayStatistic();
|
}
|
}
|