[修改] 保密到期定时任务
This commit is contained in:
@@ -2,6 +2,7 @@ package com.adc.da.report.Timer;
|
|||||||
|
|
||||||
import com.adc.da.report.dao.mysql.ReportDao;
|
import com.adc.da.report.dao.mysql.ReportDao;
|
||||||
import com.adc.da.report.eo.ReportEntity;
|
import com.adc.da.report.eo.ReportEntity;
|
||||||
|
import com.adc.da.report.service.impl.IReportServiceImpl;
|
||||||
import com.adc.da.util.utils.CollectionUtils;
|
import com.adc.da.util.utils.CollectionUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -25,7 +26,11 @@ public class secrecyDDLTimer {
|
|||||||
@Autowired
|
@Autowired
|
||||||
ReportDao reportDao;
|
ReportDao reportDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IReportServiceImpl iReportService;
|
||||||
|
|
||||||
// @Scheduled(cron="0 0 0 * * *")
|
// @Scheduled(cron="0 0 0 * * *")
|
||||||
|
// @Scheduled(cron="0 0/1 * * * ?")
|
||||||
@Scheduled(cron="0 0/10 * * * ?")
|
@Scheduled(cron="0 0/10 * * * ?")
|
||||||
public void timingOpen() {
|
public void timingOpen() {
|
||||||
log.info("**********************保密到期定时任务开始**********************");
|
log.info("**********************保密到期定时任务开始**********************");
|
||||||
@@ -34,6 +39,7 @@ public class secrecyDDLTimer {
|
|||||||
entity.forEach(e -> {
|
entity.forEach(e -> {
|
||||||
e.setConfidentialLevel("公开(内部公开)");
|
e.setConfidentialLevel("公开(内部公开)");
|
||||||
});
|
});
|
||||||
|
iReportService.updateBatchById(entity);
|
||||||
}
|
}
|
||||||
log.info("**********************保密到期定时任务结束**********************");
|
log.info("**********************保密到期定时任务结束**********************");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user