SyncJob.java
815 Bytes
package com.sincere.quartz.job;
import com.sincere.quartz.third.yixueyun.YXYReadService;
import com.sincere.quartz.third.yixueyun.YXYWriteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
/**
* @author chen
* @version 1.0
* @date 2019/12/24 0024 10:54
*/
@Service
@Slf4j
public class SyncJob {
@Autowired
YXYWriteService yxyWriteService ;
@Autowired
YXYReadService yxyReadService ;
@Scheduled(cron = "30 1 22 * * ? ")
// @Scheduled(fixedDelay = 120 * 60 * 1000)
public void Sync(){
//翼校通的同步 之后还有钉钉的同步等等
yxyReadService.sync();
yxyWriteService.sync();
}
}