diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionNewsServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionNewsServiceImpl.java index 83646bff..4dca897c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionNewsServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionNewsServiceImpl.java @@ -83,7 +83,9 @@ public class InspectionNewsServiceImpl extends ServiceImpl list = baseMapper.selectInspectionNewsList(page,inspectionNews); list.getRecords().forEach(it->{ - it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + if (StringUtils.isNotEmpty(it.getNewsContent())){ + it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + } }); return list; } @@ -94,7 +96,9 @@ public class InspectionNewsServiceImpl extends ServiceImpl list = baseMapper.selectList(queryWrapper); list.forEach(it->{ - it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + if (StringUtils.isNotEmpty(it.getNewsContent())){ + it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + } }); return list; } @@ -299,7 +303,9 @@ public class InspectionNewsServiceImpl extends ServiceImpl news = baseMapper.msgList(page, ifShow); news.getRecords().forEach(it->{ - it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + if(StringUtils.isNotEmpty(it.getNewsContent())) { + it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); + } }); return news; }