取2个List对象,根据里面2个List相同的字段进行比较取值
List collect = textContentDTOS.stream().map(m -> {
assets.stream().filter(m2 -> Objects.equals(m.getAssetId(), m2.getAssetId())).forEach(m2 -> {
m.setAssetName(m2.getAssetName());
});
return m;
}).collect(Collectors.toList());


