diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java index 814d1e797c..3aed178f5f 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -110,6 +110,11 @@ public class DraftPcListResultDTO implements Serializable { */ private List contentList; + /** + * 文章内容 + */ + private List fileList; + @Data public static class Content { /** diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java index c776b6c943..0e25e4fd03 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java @@ -117,6 +117,11 @@ public class PublishedListResultDTO implements Serializable { */ private List contentList; + /** + * 附件列表 + */ + private List fileList; + @Data public static class Content { /** diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 0cad108d8a..197738d76e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1821,12 +1821,23 @@ public class ArticleServiceImpl extends BaseServiceImpl tWrapper1 = new LambdaQueryWrapper<>(); tWrapper1.eq(ArticleContentEntity::getArticleId, formDTO.getArticleId()); tWrapper1.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR); + tWrapper1.ne(ArticleContentEntity::getContentType,"file"); tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum); List contentEntityList = articleContentDao.selectList(tWrapper1); if (!CollectionUtils.isEmpty(contentEntityList)) { List contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class); resultDTO.setContentList(contentList); } + LambdaQueryWrapper fileWrapper = new LambdaQueryWrapper<>(); + fileWrapper.eq(ArticleContentEntity::getArticleId, formDTO.getArticleId()); + fileWrapper.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR); + fileWrapper.eq(ArticleContentEntity::getContentType,"file"); + fileWrapper.orderByDesc(ArticleContentEntity::getOrderNum); + List fileContentEntityList = articleContentDao.selectList(fileWrapper); + if (!CollectionUtils.isEmpty(fileContentEntityList)) { + List fileList = ConvertUtils.sourceToTarget(fileContentEntityList, PublishedListResultDTO.Content.class); + resultDTO.setFileList(fileList); + } //标签列表 LambdaQueryWrapper tWrapper2 = new LambdaQueryWrapper<>(); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index 5d786be693..27111b4545 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -266,7 +266,8 @@ public class DraftServiceImpl extends BaseServiceImpl imp //查询文章内容 LambdaQueryWrapper tWrapper1 = new LambdaQueryWrapper<>(); tWrapper1.eq(DraftContentEntity::getDraftId, formDTO.getDraftId()); - tWrapper1.eq(DraftContentEntity::getDelFlag, NumConstant.ZERO_STR); + tWrapper1.eq(DraftContentEntity::getDelFlag, NumConstant.ZERO_STR) + .ne(DraftContentEntity::getContentType,"file"); tWrapper1.orderByDesc(DraftContentEntity::getOrderNum); List contentEntityList = draftContentDao.selectList(tWrapper1); if (!CollectionUtils.isEmpty(contentEntityList)) { @@ -274,6 +275,16 @@ public class DraftServiceImpl extends BaseServiceImpl imp resultDTO.setContentList(contentList); } + LambdaQueryWrapper fileWrapper = new LambdaQueryWrapper<>(); + fileWrapper.eq(DraftContentEntity::getDraftId, formDTO.getDraftId()); + fileWrapper.eq(DraftContentEntity::getDelFlag, NumConstant.ZERO_STR) + .eq(DraftContentEntity::getContentType,"file"); + fileWrapper.orderByDesc(DraftContentEntity::getOrderNum); + List fileContentEntityList = draftContentDao.selectList(fileWrapper); + if (!CollectionUtils.isEmpty(fileContentEntityList)) { + List fileContentList = ConvertUtils.sourceToTarget(fileContentEntityList, DraftPcListResultDTO.Content.class); + resultDTO.setFileList(fileContentList); + } //标签列表 if(!CollectionUtils.isEmpty(resultDTO.getTagNameList())){ LambdaQueryWrapper tWrapper2 = new LambdaQueryWrapper<>();