package com.jeeplus.notify.service;

import com.jeeplus.notify.mapper.NotifyMapper;
import com.jeeplus.sys.utils.SpringContextHolder;
import org.quartz.DisallowConcurrentExecution;
import com.jeeplus.quartz.domain.Task;

/**
 * 通告定时任务
 */
@DisallowConcurrentExecution
public class NotifyTimeTask extends Task{

    private NotifyMapper mapper = SpringContextHolder.getBean(NotifyMapper.class);


    @Override
    public void run() {
        // 定时将时间结束的通告改为结束状态
        mapper.updateNotifyClose();
    }
}
