package com.santos.iost.TimeTask;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.santos.iost.dao.SoSsDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.text.ParseException;

@Slf4j
@Component
@EnableScheduling
public class SynTimed {
    @Autowired
    SoSsDao soSsDao;

    /*自动登录定时任务40分钟执行一次*/
    @Scheduled(fixedDelay = 1000*60*30)
    public void timed() throws IOException {

        System.out.println("更新token");
       soSsDao.init();
    }

    //可以使用页面上的任务来控制方法

}
