// 异步记录提交进件的信息
FutureTask<String> futureTask = new FutureTask<>(new RiskDataAppCustomerInfoCallable(appCustomerInfoDto, riskDataFeignApi, mbCustId));
taskExecutor.execute(futureTask);
// RiskDataAppCustomerInfoCallable类处理逻辑
import java.util.concurrent.Callable;
public class RiskDataAppCustomerInfoCallable implements Callable<String> {
static Logger log = LoggerFactory.getLogger(RiskDataAppCustomerInfoCallable.class);
private RiskDataFeignApi riskDataFeignApi;
private AppCustomerInfoDto appCustomerInfoDto;
private long mbCustId;
public RiskDataAppCustomerInfoCallable(AppCustomerInfoDto appCustomerInfoDto, RiskDataFeignApi riskDataFeignApi, long mbCustId) {
this.appCustomerInfoDto = appCustomerInfoDto;
this.riskDataFeignApi = riskDataFeignApi;
this.mbCustId = mbCustId;
}
@Override
public String call() throws Exception {
try {
// 主逻辑处理
} catch (Exception e) {
log.error("出错", e);
}
return "";
}
}