Commit 45691f25 by rongkailun

【修改】专业术语添加英文标题非空判断

parent 86e5661d
...@@ -220,7 +220,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements ...@@ -220,7 +220,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
public List<GlossaryEntity> glossaryList(NewsParams newsParams) { public List<GlossaryEntity> glossaryList(NewsParams newsParams) {
List<GlossaryEntity> list = this.newsDao.glossaryList(newsParams); List<GlossaryEntity> list = this.newsDao.glossaryList(newsParams);
if ("4".equals(newsParams.getType())) { if ("4".equals(newsParams.getType())) {
list = list.stream().filter(item -> item.getTitleEn().substring(0, 1).equals(newsParams.getTitle())).collect(Collectors.toList()); list = list.stream().filter(it->StringUtils.isNotBlank(it.getTitleEn())).filter(item -> item.getTitleEn().substring(0, 1).equals(newsParams.getTitle())).collect(Collectors.toList());
} }
return list; return list;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment