This commit is contained in:
张良(004796)
2024-03-04 18:54:18 +08:00
commit 273ee16e8c
585 changed files with 41565 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
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);
}
}*/
}

View File

@@ -0,0 +1,29 @@
package com.ruoyi.xq.job;
import com.ruoyi.xq.service.SmsVerifyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ClearDaysJob {
@Autowired
private SmsVerifyService smsVerifyService;
// 凌晨8点执行
@Scheduled(cron = "0 0 8 * * ? ")
public void clearRun() {
try {
log.info("定时删除短信记录== 开始");
smsVerifyService.clearSmsVerify(60);
log.info("定时删除短信记录== 结束");
}catch (Exception e){
log.error("定时删除短信记录== 异常",e);
}
}
}

View File

@@ -0,0 +1,32 @@
package com.ruoyi.xq.job;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ForbidJob {
/*@Autowired
private UserForbidManager userForbidManager;
@Autowired
private SysPushService sysPushService;
*//**
* 每12小时执行一次
*//*
@Scheduled(cron = "0 0 11,23 * * ? ")
public void checkForbid(){
try {
userForbidManager.checkAll();
}catch (Exception e){
log.error("黑名单失效检测失败!",e);
}
try {
sysPushService.checkAll();
}catch (Exception e){
log.error("系统推送定时任务检测失败!",e);
}
}*/
}

View File

@@ -0,0 +1,20 @@
package com.ruoyi.xq.job;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class IncomeStatisticsJob {
/*@Autowired
private DayIncomeStatisticsService dayIncomeStatisticsService;
// @Scheduled(cron = "0 0/6 * * * ?")
public void persistentDb() {
try {
dayIncomeStatisticsService.refreshByDate(LocalDate.now());
}catch (Exception e){
log.error("更新每日收益统计失败!",e);
}
}*/
}