#I69ZVX 修改不能保存表情问题,优化脚本

This commit is contained in:
暮光:城中城
2023-01-11 20:06:22 +08:00
parent e54d4972e1
commit c805465684
3 changed files with 36 additions and 32 deletions

View File

@@ -333,6 +333,9 @@ public class WikiPageController {
UpdateWrapper<WikiPageContent> wrapper = new UpdateWrapper<>();
wrapper.eq("page_id", pageId);
WikiPageContent pageContent = wikiPageContentService.getOne(wrapper);
if (pageContent == null || StringUtils.isBlank(pageContent.getContent())) {
return DocResponseJson.warn("文档内容为空,不能导出!");
}
try {
ByteArrayInputStream bais = new ByteArrayInputStream(pageContent.getContent().getBytes("GBK"));
POIFSFileSystem poifs = new POIFSFileSystem();