Browse Source

代码调整

dev
sunyuchao 3 years ago
parent
commit
81f350f103
  1. 24
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java
  2. 24
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java
  3. 9
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  4. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java
  5. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml
  6. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml

24
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java

@ -34,7 +34,7 @@ public class DraftPcListResultDTO implements Serializable {
/**
* 发布单位ID
*/
private String publisherId;
private String publisher;
/**
* 发布单位
*/
@ -95,6 +95,26 @@ public class DraftPcListResultDTO implements Serializable {
/**
* 文章内容
*/
private List<String> contentList;
private List<Content> contentList;
@Data
public static class Content {
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text文件file视频video富文本rich_text
*/
private String contentType;
/**
* 文件名称
*/
private String fileName;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
}
}

24
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java

@ -36,7 +36,7 @@ public class PublishedListResultDTO implements Serializable {
/**
* 发布单位ID
*/
private String publisherId;
private String publisher;
/**
* 发布单位
*/
@ -97,5 +97,25 @@ public class PublishedListResultDTO implements Serializable {
/**
* 文章内容
*/
private List<String> contentList;
private List<Content> contentList;
@Data
public static class Content {
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text文件file视频video富文本rich_text
*/
private String contentType;
/**
* 文件名称
*/
private String fileName;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
}
}

9
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -48,10 +48,7 @@ import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.*;
import com.epmet.dao.*;
import com.epmet.dto.ArticleVisitRecordDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.DraftCoverDTO;
import com.epmet.dto.DraftDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.*;
@ -1735,8 +1732,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
tWrapper1.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR);
tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum);
List<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(entityList)) {
List<String> contentList = contentEntityList.stream().map(ArticleContentEntity::getContent).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(contentEntityList)) {
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class);
resultDTO.setContentList(contentList);
}

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java

@ -270,7 +270,7 @@ public class DraftServiceImpl extends BaseServiceImpl<DraftDao, DraftEntity> imp
tWrapper1.orderByDesc(DraftContentEntity::getOrderNum);
List<DraftContentEntity> contentEntityList = draftContentDao.selectList(tWrapper1);
if (!CollectionUtils.isEmpty(contentEntityList)) {
List<String> contentList = contentEntityList.stream().map(DraftContentEntity::getContent).collect(Collectors.toList());
List<DraftPcListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, DraftPcListResultDTO.Content.class);
resultDTO.setContentList(contentList);
}

2
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

@ -432,7 +432,7 @@
a.title AS "title",
IFNULL(a.preview_content, "") AS "previewContent",
a.publish_range_desc AS "publishRangeDesc",
a.publisher_id AS "publisherId",
a.publisher_id AS "publisher",
a.publisher_name AS "publisherName",
a.publisher_type AS "publisherType",
a.publish_date AS "publishDate",

2
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml

@ -184,7 +184,7 @@
a.title AS "title",
IFNULL(a.preview_content, "") AS "previewContent",
a.publish_range_desc AS "publishRangeDesc",
a.publisher_id AS "publisherId",
a.publisher_id AS "publisher",
a.publisher_name AS "publisherName",
a.publisher_type AS "publisherType",
a.publish_date AS "publishDate",

Loading…
Cancel
Save