package com.ruoyi.xq.job;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Clear2HoursJob {

   /* @Autowired
    private DynamicService dynamicService;
    @Autowired
    private UserChatRecordService userChatRecordService;


    // 每隔小时执行一次
//    @Scheduled(cron = "0 0 0/2 * * ? *")
    public void clearRun() {
        try {
            log.info("定时删除动态== 开始");
            dynamicService.clearDynamic(12);
            log.info("定时删除动态== 结束");
        }catch (Exception e){
            log.error("定时删除动态== 异常",e);
        }
        try {
            log.info("定时删除聊天记录== 开始");
            userChatRecordService.clearChatRecord(24);
            log.info("定时删除聊天记录== 结束");
        }catch (Exception e){
            log.error("定时删除聊天记录== 异常",e);
        }

    }*/
}
