对目标数组去重,并筛选出要用的数组
//数组去重
idList.stream().distinct();
//数组筛选
list.stream().filter(coo->idList.contains(coo.get("cooperationId").toString()));
相当于:
//数组去重
idList.stream().distinct();
list=list.stream().filter((Map<String, String> coo)->(
idList.contains(coo.get("cooperationId").toString())
)).collect(Collectors.toList());