package com.ruoyi.quartz.task;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.drill.service.IDrillPlanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 应急定时发送消息
 *
 * @author ruoyi
 */
@Component("drillTask")
@Slf4j
public class DrillTask {

    @Resource
    private IDrillPlanService drillPlanService;

    public void checkPlan() {
        log.info("应急定时发送消息开始：{}", DateUtils.getTime());
        drillPlanService.checkPlan();
        log.info("应急定时发送消息结束：{}", DateUtils.getTime());
    }
}
