package com.zfire.jiasm.syncdata.upload.worker;


import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
import com.zfire.jiasm.syncdata.service.UploadWorkeCertificateService;
import com.zfire.jiasm.syncdata.service.WorkerUploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

@Slf4j
@Component
public class WorkerUpload {
    @Value("${workercertificatec}")
    private String workercertificatec = "";

    @Autowired
    WorkerUploadService workerUploadService;

    @Scheduled(fixedDelayString = "${workercertificate}")
    public void process() throws Exception {

        workerUploadService.syncData();

    }

}
