package com.pj.project4sp.apilog;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.time.LocalDate;

@Component
@Slf4j
public class Task {
    @Resource
    SpApilogMapper spApilogMapper;
    @Scheduled(cron = "0 0 4 * * ?")
    public void cleanLog(){
        log.info("start clean api log");
        LocalDate today=LocalDate.now();
        //spApilogMapper.cleanHistoryLog(today.minusDays(-2).toString());
    }
}
