Untitled
wyc1230
plain_text
9 months ago
740 B
11
Indexable
private List<StreamBatchInfoDTO> createBatch(
List<MultiStreamBatchDTO> batchList,
MultiOptimizationContext context) {
List<StreamBatchInfoDTO> batchInfoList = batchList.stream()
.filter(this::isPushAvailableBatch)
.map(batch -> asStreamBatchInfoDTO(batch, context))
.filter(batch -> CollectionUtils.isNotEmpty(batch.getPickerJobDTOList()))
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(batchInfoList)) {
return null;
}
List<StreamBatchInfoDTO> result = Lists.newArrayList();
for (StreamBatchInfoDTO batchInfo : batchInfoList) {
callOutboundCreateBatchApi(context.getProcessPath(), context.getNow(), Lists.newArrayList(batchInfo), context.getTraceId());
}
return result;
}
Editor is loading...
Leave a Comment