Commit 9cd35792 by 吴迪

【新增】

parent aca7ece3
......@@ -546,8 +546,16 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
List<SearchVo> list = this.newsDao.getSearchInfo(name, page);
if(CollectionUtils.isNotEmpty(list)) {
for (SearchVo searchVo : list) {
if(StringUtils.isNotBlank(searchVo.getContent())) {
searchVo.setContent("");
searchVo.setContent(searchVo.getContent().replaceAll(name,"<font color='red'>"+name+"</font>"));
}
if(StringUtils.isNotBlank(searchVo.getTitle())) {
searchVo.setTitle(searchVo.getTitle().replaceAll(name,"<font color='red'>"+name+"</font>"));
}
if(StringUtils.isNotBlank(searchVo.getKeyword())) {
searchVo.setKeyword(searchVo.getKeyword().replaceAll(name,"<font color='red'>"+name+"</font>"));
}
}
}
......
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