package org.jeecg.modules.ctop.job;

import cn.com.ctop.common.module.service.IRefreshTokenService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * DONE
 */
public class ByteDanceRefreshTokenJob implements Job {
    @Autowired
    private IRefreshTokenService refreshTokenService;

    /**
     * 刷新token
     *
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                refreshTokenService.byteDanceRefresh(null);
            }
        };
        thread.start();

    }
}
