package com.mosty.yjzl.task;

import com.mosty.yjzl.service.TbZlxxService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 每隔几分钟执行一次任务的修改与变更
 * 查询是否有任务已经超期
 */
@Component
@AllArgsConstructor
public class TbZlxxGqTask {

    private final TbZlxxService tbZlxxService;

    @Scheduled(cron = "0 */60 * * * ?")
    public void run() {
        this.tbZlxxService.changeZlGqzt();
    }
}
