Browse Source

Merge remote-tracking branch 'origin/lingshan_master' into dev

master
yinzuomei 2 years ago
parent
commit
d9326a8afd
  1. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java
  2. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java
  3. 11
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  4. 13
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java

5
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<Content> contentList;
/**
* 文章内容
*/
private List<Content> fileList;
@Data
public static class Content {
/**

5
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<Content> contentList;
/**
* 附件列表
*/
private List<Content> fileList;
@Data
public static class Content {
/**

11
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<ArticleDao, ArticleEntit
LambdaQueryWrapper<ArticleContentEntity> 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<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(contentEntityList)) {
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class);
resultDTO.setContentList(contentList);
}
LambdaQueryWrapper<ArticleContentEntity> 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<ArticleContentEntity> fileContentEntityList = articleContentDao.selectList(fileWrapper);
if (!CollectionUtils.isEmpty(fileContentEntityList)) {
List<PublishedListResultDTO.Content> fileList = ConvertUtils.sourceToTarget(fileContentEntityList, PublishedListResultDTO.Content.class);
resultDTO.setFileList(fileList);
}
//标签列表
LambdaQueryWrapper<ArticleTagsEntity> tWrapper2 = new LambdaQueryWrapper<>();

13
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<DraftDao, DraftEntity> imp
//查询文章内容
LambdaQueryWrapper<DraftContentEntity> 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<DraftContentEntity> contentEntityList = draftContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(contentEntityList)) {
@ -274,6 +275,16 @@ public class DraftServiceImpl extends BaseServiceImpl<DraftDao, DraftEntity> imp
resultDTO.setContentList(contentList);
}
LambdaQueryWrapper<DraftContentEntity> 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<DraftContentEntity> fileContentEntityList = draftContentDao.selectList(fileWrapper);
if (!CollectionUtils.isEmpty(fileContentEntityList)) {
List<DraftPcListResultDTO.Content> fileContentList = ConvertUtils.sourceToTarget(fileContentEntityList, DraftPcListResultDTO.Content.class);
resultDTO.setFileList(fileContentList);
}
//标签列表
if(!CollectionUtils.isEmpty(resultDTO.getTagNameList())){
LambdaQueryWrapper<TagCustomerEntity> tWrapper2 = new LambdaQueryWrapper<>();

Loading…
Cancel
Save