新增待办过期和历史归档任务

This commit is contained in:
jsowell
2026-07-17 18:06:21 +08:00
parent 09d98eb18d
commit b6b052b9df
9 changed files with 229 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package com.jsowell.quartz.task;
import com.jsowell.system.domain.dto.TodoTaskMaintenanceResult;
import com.jsowell.system.service.TodoTaskMaintenanceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 待办过期和历史归档定时任务。
*/
@Component("todoTaskMaintenanceTask")
public class TodoTaskMaintenanceTask {
private static final Logger log = LoggerFactory.getLogger(TodoTaskMaintenanceTask.class);
@Autowired
private TodoTaskMaintenanceService todoTaskMaintenanceService;
public void maintain() {
TodoTaskMaintenanceResult result = todoTaskMaintenanceService.maintain();
log.info("待办维护任务完成expiredCount={}, archivedCount={}, archiveBefore={}",
result.getExpiredCount(), result.getArchivedCount(), result.getArchiveBefore());
}
}