package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.common.module.service.IRefreshTokenService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class KuaiShouRefreshTokenJob {
    @Autowired
    private IRefreshTokenService refreshTokenService;

    /**
     * 刷新token
     * @throws JobExecutionException
     */
    @XxlJob("kuaiShouRefreshTokenJob")
    public ReturnT<String> execute(String param) throws Exception {
        refreshTokenService.getKuaiShouRefresh();
        return ReturnT.SUCCESS;
    }
}

