You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
909 B
Java
32 lines
909 B
Java
7 months ago
|
package com.supervision.job;
|
||
|
|
||
|
import com.supervision.police.service.CaseEvidenceService;
|
||
|
import com.xxl.job.core.context.XxlJobHelper;
|
||
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.stereotype.Component;
|
||
|
|
||
|
@Slf4j
|
||
|
@Component
|
||
|
public class XxlJobTask {
|
||
|
@Autowired
|
||
|
private CaseEvidenceService caseEvidenceService;
|
||
|
|
||
|
/**
|
||
|
* 睡觉通知
|
||
|
*/
|
||
|
@XxlJob("evidenceAnalysis")
|
||
|
public void evidenceAnalysis() {
|
||
|
String param = XxlJobHelper.getJobParam();
|
||
|
log.info("【证据解析】任务开始。ID: 【{}】", param);
|
||
|
try {
|
||
|
caseEvidenceService.evidenceAnalysis(param);
|
||
|
} catch (Exception e) {
|
||
|
log.error("任务执行失败", e);
|
||
|
} finally {
|
||
|
log.info("任务执行完成");
|
||
|
}
|
||
|
}
|
||
|
}
|