Commit 76e5c9d1 by 吴迪

【新增】修改红色提示

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