package com.easyproject.scheduled.task;

import com.easyproject.scheduled.service.ICheckTokenSetTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 方法说明: 检查token设置
 * @param
 * @return
 * @author java-101
 * @date 2025-03-22 19:49:58
 */
@Slf4j
@Component
public class CheckTokenSetTask {

    @Resource
    private ICheckTokenSetTaskService checkTokenSetTaskService;

    /**
     * 方法说明: 定时执行-每天凌晨00：05：00开始执行-检查token是否过期
     * @param
     * @return
     * @author java-101
     * @date 2025-03-22 19:52:34
     */
    @Scheduled(cron = "0 20 20 * * ?")
    public void checkTokenSetIsExpirationTask() {
        log.info("===== ↓↓↓↓↓ 定时检查【TOKEN设置-是否到期】开始 ↓↓↓↓↓ =====");
        checkTokenSetTaskService.checkTokenSetIsExpirationTask();
        log.info("===== ↑↑↑↑↑ 定时检查【TOKEN设置-是否到期】结束 ↑↑↑↑↑=====");
    }

}
