|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
package com.ruoyi.pt.quartz;
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.pt.service.RemoteCallsService;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
@ -15,15 +17,17 @@ import java.time.format.DateTimeFormatter;
|
|
|
|
|
* @author wu
|
|
|
|
|
* @since 2023/12/26 16:19
|
|
|
|
|
*/
|
|
|
|
|
@Component
|
|
|
|
|
@EnableAsync
|
|
|
|
|
@Configuration
|
|
|
|
|
@EnableScheduling
|
|
|
|
|
public class PushQuartz {
|
|
|
|
|
|
|
|
|
|
public static final Logger log = LoggerFactory.getLogger(PushQuartz.class);
|
|
|
|
|
@Resource
|
|
|
|
|
private RemoteCallsService remoteCallsService;
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 1 * * * ?")
|
|
|
|
|
@Scheduled(cron = "0 0 1 * * ? ")
|
|
|
|
|
public void pushData() {
|
|
|
|
|
log.info("==============开始定时任务============");
|
|
|
|
|
// 获取社会治理中心增量事件保存到events_import表
|
|
|
|
|
remoteCallsService.getEventDate();
|
|
|
|
|
// 获取昨天的数据
|
|
|
|
|