package com.jiayue.ipfcst.fileupload.job;

import com.jiayue.ipfcst.fileupload.service.FtpUploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * ftp客户端上报定时
 *
 * @author xsl
 * @version 3.0
 * @since 2020/4/24 14:54
 */
@Slf4j
@Service
@EnableScheduling
public class FtpClientUploadJob{
  @Autowired
  FtpUploadService ftpUploadService;

  @Scheduled(fixedDelay = 60000)
  public void execute() {
    log.info("FTP/SFTP上报定时任务执行开始");
    ftpUploadService.startFtpUpload();
    log.info("FTP/SFTP上报定时任务执行结束");
  }
}
