package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.alarm.modules.service.IAlarmRuleRecordService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class KuaishouAlarmRuleRecordJob {
    @Autowired
    private IAlarmRuleRecordService alarmRuleRecordService;

    /**
     * 预警规则记录表 定期删除，只保留10天数据
     */
    @XxlJob("cleanAlarmRuleRecordJob")
    public void execute() throws Exception {
        alarmRuleRecordService.deleteByTime();
    }
}
