package com.copy.trade.timmer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.copy.trade.service.ICustomerService;
import com.copy.trade.service.IStatisticsDataService;

@Component
public class StatisticsDataTimer {

	@Autowired
	private IStatisticsDataService statisticsDataServiceImpl;
	
	@Autowired
	private ICustomerService customerServiceImpl;
	
	//每天16点执行一次
	//@Scheduled(cron = "0/10 * * * * *")
	@Scheduled(cron = "0 0 0 * * ?")
	//@Scheduled(cron = "0 0 14 * * ?")
	public void timer() {
		statisticsDataServiceImpl.statisticsByDayNew();
		customerServiceImpl.automaticUnfollow();
	} 

}
