|
|
@ -27,7 +27,7 @@ import java.util.concurrent.*; |
|
|
|
public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
|
.setNameFormat("factOriginExtract-pool-%d").build(); |
|
|
|
ExecutorService threadPool = new ThreadPoolExecutor(4, 8, |
|
|
|
ExecutorService threadPool = new ThreadPoolExecutor(1, 1, |
|
|
|
10L, TimeUnit.MINUTES, |
|
|
|
new LinkedBlockingQueue<>(500), namedThreadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); |
|
|
|
|
|
|
@ -53,13 +53,14 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
List<String> customerIds = new ArrayList<>(); |
|
|
|
if (StringUtils.isNotBlank(customerId)) { |
|
|
|
customerIds.add(customerId); |
|
|
|
} |
|
|
|
int pageNo = NumConstant.ONE; |
|
|
|
int pageSize = NumConstant.ONE_HUNDRED; |
|
|
|
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); |
|
|
|
if (CollectionUtils.isEmpty(customerIds)) { |
|
|
|
log.error("extractAll 获取客户Id为空"); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
int pageNo = NumConstant.ONE; |
|
|
|
int pageSize = NumConstant.ONE_HUNDRED; |
|
|
|
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); |
|
|
|
if (CollectionUtils.isEmpty(customerIds)) { |
|
|
|
log.error("extractAll 获取客户Id为空"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String finalDateId = dateId; |
|
|
@ -67,7 +68,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
ExtractFormDTO param = new ExtractFormDTO(); |
|
|
|
param.setCustomerId(cId); |
|
|
|
param.setDateId(finalDateId); |
|
|
|
// log.warn();
|
|
|
|
log.debug("extractAll param:{}", JSON.toJSONString(param)); |
|
|
|
submitJob(param); |
|
|
|
}); |
|
|
|
|
|
|
|