41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
|
package com.celnet.datadump.job;
|
||
|
|
||
|
import com.alibaba.fastjson.JSON;
|
||
|
import com.celnet.datadump.param.DataCheckDeletedParam;
|
||
|
import com.celnet.datadump.service.DataCheckDeletedService;
|
||
|
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.lang3.StringUtils;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.stereotype.Component;
|
||
|
|
||
|
/**
|
||
|
* @author Red
|
||
|
* @description 检测删除数据任务
|
||
|
* @date 2022/12/06
|
||
|
*/
|
||
|
@Component
|
||
|
@Slf4j
|
||
|
public class DataCheckDeletedJob {
|
||
|
|
||
|
@Autowired
|
||
|
private DataCheckDeletedService dataCheckDeletedService;
|
||
|
|
||
|
@XxlJob("dataCheckDeletedJob")
|
||
|
public ReturnT<String> dataCheckDeletedJob(String paramStr) throws Throwable {
|
||
|
log.info("dataCheckDeletedJob execute start ..................");
|
||
|
DataCheckDeletedParam param = new DataCheckDeletedParam();
|
||
|
try {
|
||
|
if (StringUtils.isNotBlank(paramStr)) {
|
||
|
param = JSON.parseObject(paramStr, DataCheckDeletedParam.class);
|
||
|
}
|
||
|
} catch (Throwable throwable) {
|
||
|
return new ReturnT<>(500, "参数解析失败!");
|
||
|
}
|
||
|
return dataCheckDeletedService.checkDeletedData(param);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|