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()));
本文标题:无标题文章
本文链接:https://www.haomeiwen.com/subject/rtemdqtx.html
网友评论