package com.ruzhoukj.sms.task; import com.ruzhoukj.sms.service.ReportDataInfoService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; @Component @Slf4j public class PerformanceTask { @Resource private ReportDataInfoService reportDataInfoService; //每天八点查询一次绩效 @Scheduled(cron = "0 0 20 * * ?") private void performanceTask() { reportDataInfoService.countPerformance(); } }