mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-23 07:31:51 +08:00
新增待办过期和历史归档任务
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user