package com.youchain.modules.quartz.task;

import com.youchain.modules.quartz.repository.QuartzJobRepository;
import com.youchain.modules.quartz.repository.QuartzLogRepository;
import com.youchain.repository.LogRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class logTask {

    @Autowired
    private LogRepository logRepository;

    @Autowired
    private QuartzLogRepository quartzLogRepository;

    /**
     * 清理系统日志
     */
    public void cleanLog() {
        logRepository.cleanSysLog();
        quartzLogRepository.cleanQuartzLog();
    }
}
