List转成List<String>形式
List idList = dtoList.stream().map(e -> e.getParentChannelId()).filter(x -> x!=null).collect(Collectors.toList());
List转成map形式
Map map = parentDtoList.stream().collect(Collectors.toMap(w -> w.getId(), w -> w.getName()));
List转成List<String>形式
List idList = dtoList.stream().map(e -> e.getParentChannelId()).filter(x -> x!=null).collect(Collectors.toList());
List转成map形式
Map map = parentDtoList.stream().collect(Collectors.toMap(w -> w.getId(), w -> w.getName()));