...
This commit is contained in:
parent
3444868612
commit
9ff764fd9d
|
@ -276,8 +276,8 @@ public class CensusController {
|
|||
});
|
||||
});
|
||||
return task;
|
||||
}).collect(Collectors.toList());
|
||||
CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[completableFutures.size()])).join();
|
||||
}).collect(Collectors.toList()); // 所有topN部门全异步查出应用领域
|
||||
CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[completableFutures.size()])).join(); // 等待所有异步任务完成
|
||||
result.sort(Comparator.comparing(x ->
|
||||
{
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
@ -288,7 +288,7 @@ public class CensusController {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}).reversed().thenComparing(i -> i.toString())
|
||||
);
|
||||
); // 按应用领域数目逆序排序
|
||||
return new Result<List<Map<String, Object>>>().ok(result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue