package com.huigou.topsun.syncOrg.scheduled;

import com.huigou.topsun.syncOrg.application.OrgSyncApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;

import java.io.IOException;
/**
 * @Auther: xin.lu
 * @Date: 2024/03/24/9:45
 * @Description:
 */
@Component
@EnableScheduling
public class OrgSync {
    @Autowired
    private OrgSyncApplication orgSyncApplication;

    /** * 每10分钟执行一次 */
    //@Scheduled(cron = "0 0/10 * * * ?")
    public void syncOrgToSap() throws IOException {
        orgSyncApplication.syncPersonListToSap();
    }
}
