package jnpf.doclibrary.crontask;

import jnpf.doclibrary.service.SpaceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 资料库定时任务
 *
 * @author yanwenfu
 * @create 2023-07-26
 */
@Slf4j
@Component
public class DocLibraryCronTask {

    @Resource
    private SpaceService spaceService;

    @Scheduled(cron="0 1 0 * * ?")
    public void deleteOverdueViewRecord() {
        log.info("删除过期的浏览记录...");
        // spaceService.deleteOverdueViewRecord();
    }

    @Scheduled(cron="0 1 0 * * ?")
    public void deleteOverdueRubbish() {
        log.info("删除过期的回收站资料...");
        // spaceService.deleteOverdueRubbish();
    }
}
