|
...
|
...
|
@@ -242,9 +242,14 @@ public class ServerController extends BaseController |
|
|
|
{
|
|
|
|
return AjaxResult.error("参数不能为空");
|
|
|
|
}
|
|
|
|
// 流处理:过滤标题并转换为Entry
|
|
|
|
List<AbstractMap.SimpleEntry<String, String>> dataList = list.stream()
|
|
|
|
.filter(dto -> !"非新闻内容".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()))
|
|
|
|
// .collect(Collectors.toList());
|
|
|
|
try {
|
|
|
|
logger.info("转换数据:{}",dataList);
|
|
|
|
String savePath = MultiTextImageGenerator.generateImage(dataList, new StyleConfig());
|
...
|
...
|
|