|
...
|
...
|
@@ -244,8 +244,8 @@ public class ServerController extends BaseController |
|
|
|
}
|
|
|
|
// 流处理:过滤标题并转换为Entry
|
|
|
|
List<AbstractMap.SimpleEntry<String, String>> dataList = list.stream()
|
|
|
|
.filter(dto -> !"非新闻内容".equals(dto.getTitle()))
|
|
|
|
.map(dto -> new AbstractMap.SimpleEntry<>(dto.getTitle(), dto.getContent()))
|
|
|
|
.filter(dto -> dto != null && dto.getTitle() != null && !"非新闻内容".equals(dto.getTitle())&& !"".equals(dto.getTitle()))
|
|
|
|
.map(dto -> new AbstractMap.SimpleEntry<>(dto.getTitle(), dto.getContent()))
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
// List<AbstractMap.SimpleEntry<String, String>> dataList = list.stream()
|
|
|
|
// .map(dto -> new AbstractMap.SimpleEntry<>(dto.getTitle(), dto.getContent()))
|
...
|
...
|
|