Browse Source

新增定时任务:证书到期提醒

zhongwei
ty 11 months ago
parent
commit
e7f4d3d541
  1. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java

@ -15,6 +15,7 @@ import com.hnac.hzims.scheduled.service.basic.IImsCertificatetNoticeService;
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetService;
import com.hnac.hzims.scheduled.service.basic.IImsPresonManagementService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.junit.jupiter.api.Test;
@ -35,6 +36,8 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.hnac.hzims.operational.main.constant.MainConstants.CERTIFICATET_DEAD_LINE_NOTICE;
/**
* 排班到期定时任务通知
@ -63,12 +66,12 @@ public class BasicScheduledTask {
/**
* realId刷新
*/
// @XxlJob(CERTIFICATET_DEAD_LINE_NOTICE)
@Scheduled(cron = "0/40 * * * * ? ")
// public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException {
public ReturnT<String> certificatetDeadLineNotice() throws ParseException {
@XxlJob(CERTIFICATET_DEAD_LINE_NOTICE)
// @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException {
// public ReturnT<String> certificatetDeadLineNotice() throws ParseException {
// String param="";
Date endTime = new Date();
String param="";
if (StringUtils.isNotBlank(param)) {
endTime = new SimpleDateFormat("yyyy-MM-dd").parse(param);
}

Loading…
Cancel
Save