From 5c933863b4f4b639f781b6ff2e3222e8cace0487 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Apr 2023 15:14:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?/gov/voice/article/detailV2=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E5=86=85=E5=AE=B9=E5=92=8C=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/PublishedListResultDTO.java | 5 +++++ .../com/epmet/service/impl/ArticleServiceImpl.java | 11 +++++++++++ 2 files changed, 16 insertions(+) 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 0d8e015696..ab7bd3a92f 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<>(); From 580e64ce9aadb939a6011405c078fa141f2d8a9d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Apr 2023 15:16:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?/gov/voice/draft/detailV2=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=92=8C=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/DraftPcListResultDTO.java | 5 +++++ .../com/epmet/service/impl/DraftServiceImpl.java | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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-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<>();