作者 钟来

水产舆情采集海报生成背景图修改

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

812.2 KB | 宽: | 高:

31.9 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖