Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
yinzuomei 4 years ago
parent
commit
7e93a31700
  1. 4
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java
  2. 4
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java
  3. 14
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java
  4. 7
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
  5. 1
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
  6. 8
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java
  7. 7
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

4
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java

@ -2,6 +2,7 @@ package com.epmet.dto.form;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -12,7 +13,10 @@ import java.io.Serializable;
@Data @Data
public class HotSubjectTagFormDTO implements Serializable { public class HotSubjectTagFormDTO implements Serializable {
private static final long serialVersionUID = -5526800827207175876L; private static final long serialVersionUID = -5526800827207175876L;
public interface HotSubjectTagGroup {}
private String customerId; private String customerId;
@NotBlank(message = "orgId不能为空", groups = HotSubjectTagGroup.class)
private String orgId; private String orgId;
@NotBlank(message = "pids不能为空", groups = HotSubjectTagGroup.class)
private String pids; private String pids;
} }

4
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java

@ -43,4 +43,8 @@ public class ArticleListResultDTO implements Serializable {
* */ * */
private String tagName; private String tagName;
/**
* 文章封面
* */
private String articleCoverImg;
} }

14
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java

@ -44,4 +44,18 @@ public class SubjectArticleListResultDTO implements Serializable {
*/ */
private String tagNames; private String tagNames;
/**
* 文章封面
*/
private String articleCoverImg;
public SubjectArticleListResultDTO() {
this.articleTitle = "";
this.articleContent = "";
this.articleId = "";
this.publisherName = "";
this.publishDate = "";
this.tagNames = "";
this.articleCoverImg = "";
}
} }

7
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java

@ -1,8 +1,10 @@
package com.epmet.dto.result; package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* 专题管理已有专题列表 * 专题管理已有专题列表
@ -40,4 +42,9 @@ public class WorkSpecialSubjectResultDTO implements Serializable {
private String addOrgId; private String addOrgId;
private String orgLevel; private String orgLevel;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
} }

1
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java

@ -107,6 +107,7 @@ public class SpecialSubjectController {
*/ */
@PostMapping("hot-subject-taglist") @PostMapping("hot-subject-taglist")
public Result<List<TagInfoResultDTO>> hotSubjectTagList(@LoginUser TokenDto tokenDto, @RequestBody HotSubjectTagFormDTO formDTO) { public Result<List<TagInfoResultDTO>> hotSubjectTagList(@LoginUser TokenDto tokenDto, @RequestBody HotSubjectTagFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<TagInfoResultDTO>>().ok(specialSubjectService.hotSubjectTagList(formDTO)); return new Result<List<TagInfoResultDTO>>().ok(specialSubjectService.hotSubjectTagList(formDTO));
} }

8
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java

@ -211,6 +211,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
result.setAddOrgId(dto.getAddOrgId()); result.setAddOrgId(dto.getAddOrgId());
result.setOrgLevel(dto.getOrgLevel()); result.setOrgLevel(dto.getOrgLevel());
result.setTagColor(dto.getTagColor()); result.setTagColor(dto.getTagColor());
result.setCreatedTime(dto.getCreatedTime());
currentOrgList.add(result); currentOrgList.add(result);
}); });
if (CollectionUtils.isNotEmpty(currentOrgList)) { if (CollectionUtils.isNotEmpty(currentOrgList)) {
@ -234,6 +235,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
result.setAddOrgId(dto.getAddOrgId()); result.setAddOrgId(dto.getAddOrgId());
result.setOrgLevel(dto.getOrgLevel()); result.setOrgLevel(dto.getOrgLevel());
result.setTagColor(dto.getTagColor()); result.setTagColor(dto.getTagColor());
result.setCreatedTime(dto.getCreatedTime());
resultDTOList.add(result); resultDTOList.add(result);
}); });
} }
@ -285,9 +287,9 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
if (CollectionUtils.isNotEmpty(formDTO.getTagIdList())) { if (CollectionUtils.isNotEmpty(formDTO.getTagIdList())) {
formDTO.getTagIdList().forEach(tagId -> { formDTO.getTagIdList().forEach(tagId -> {
PreviewResultDTO previewResultDTO = new PreviewResultDTO(); PreviewResultDTO previewResultDTO = new PreviewResultDTO();
SpecialSubjectDTO subject = baseDao.getInfo(tagId); // SpecialSubjectDTO subject = baseDao.getInfo(tagId);
previewResultDTO.setSpecialSubjectId(subject.getId()); // previewResultDTO.setSpecialSubjectId(subject.getId());
previewResultDTO.setTagName(subject.getTagName()); // previewResultDTO.setTagName(subject.getTagName());
previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo(), formDTO.getPageSize())); previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo(), formDTO.getPageSize()));
result.add(previewResultDTO); result.add(previewResultDTO);
}); });

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

@ -355,11 +355,13 @@
art.PUBLISHER_NAME AS publisherName, art.PUBLISHER_NAME AS publisherName,
art.PUBLISH_DATE AS publishDate, art.PUBLISH_DATE AS publishDate,
IFNULL( art.PREVIEW_CONTENT, '' ) AS articleContent, IFNULL( art.PREVIEW_CONTENT, '' ) AS articleContent,
IFNULL( art.TAGS, '' ) AS tagNames IFNULL( art.TAGS, '' ) AS tagNames,
IFNULL(ac.IMG_URL,'') AS articleCoverImg
FROM ARTICLE art FROM ARTICLE art
LEFT JOIN ARTICLE_PUBLISH_RANGE prange ON LEFT JOIN ARTICLE_PUBLISH_RANGE prange ON
(art.ID = prange.ARTICLE_ID AND prange.DEL_FLAG = '0' AND prange.PUBLISH_STATUS = 'published' AND prange.GRID_ID = #{gridId} ) (art.ID = prange.ARTICLE_ID AND prange.DEL_FLAG = '0' AND prange.PUBLISH_STATUS = 'published' AND prange.GRID_ID = #{gridId} )
LEFT JOIN article_tags ats ON (ats.ARTICLE_ID = art.ID) LEFT JOIN article_tags ats ON (ats.ARTICLE_ID = art.ID)
LEFT JOIN article_cover ac ON (ac.ARTICLE_ID = art.ID AND ac.DEL_FLAG = 0)
WHERE WHERE
art.DEL_FLAG = '0' art.DEL_FLAG = '0'
AND art.STATUS_FLAG = 'published' AND art.STATUS_FLAG = 'published'
@ -394,17 +396,20 @@
art.ID AS articleId, art.ID AS articleId,
art.TITLE AS articleTitle, art.TITLE AS articleTitle,
art.PUBLISHER_NAME AS publishName, art.PUBLISHER_NAME AS publishName,
ac.IMG_URL AS articleCoverImg,
date_format(art.PUBLISH_DATE,'%Y-%m-%d') AS publishDate, date_format(art.PUBLISH_DATE,'%Y-%m-%d') AS publishDate,
IFNULL(art.PREVIEW_CONTENT,'') AS articleContent, IFNULL(art.PREVIEW_CONTENT,'') AS articleContent,
IFNULL(art.TAGS,'') AS tagName IFNULL(art.TAGS,'') AS tagName
FROM FROM
ARTICLE art ARTICLE art
INNER JOIN article_cover ac ON art.ID = ac.ARTICLE_ID
INNER JOIN ARTICLE_PUBLISH_RANGE prange INNER JOIN ARTICLE_PUBLISH_RANGE prange
ON art.ID = prange.ARTICLE_ID ON art.ID = prange.ARTICLE_ID
AND AND
prange.DEL_FLAG = '0' prange.DEL_FLAG = '0'
AND AND
prange.PUBLISH_STATUS = 'published' prange.PUBLISH_STATUS = 'published'
WHERE WHERE
art.DEL_FLAG = '0' art.DEL_FLAG = '0'
AND art.STATUS_FLAG = 'published' AND art.STATUS_FLAG = 'published'

Loading…
Cancel
Save