diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java index 7f82d796ad..3208ad1137 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java +++ b/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 javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -12,7 +13,10 @@ import java.io.Serializable; @Data public class HotSubjectTagFormDTO implements Serializable { private static final long serialVersionUID = -5526800827207175876L; + public interface HotSubjectTagGroup {} private String customerId; + @NotBlank(message = "orgId不能为空", groups = HotSubjectTagGroup.class) private String orgId; + @NotBlank(message = "pids不能为空", groups = HotSubjectTagGroup.class) private String pids; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java index 04d4f14a27..5d420de782 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java +++ b/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 articleCoverImg; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java index d280126528..dc26eb1fbe 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java +++ b/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 articleCoverImg; + + public SubjectArticleListResultDTO() { + this.articleTitle = ""; + this.articleContent = ""; + this.articleId = ""; + this.publisherName = ""; + this.publishDate = ""; + this.tagNames = ""; + this.articleCoverImg = ""; + } } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java index 823ecbed6a..0ebfd26b58 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java +++ b/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; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** * 【专题管理】已有专题列表 @@ -40,4 +42,9 @@ public class WorkSpecialSubjectResultDTO implements Serializable { private String addOrgId; private String orgLevel; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java index 1a55bdf7e6..df840e5c78 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java +++ b/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") public Result> hotSubjectTagList(@LoginUser TokenDto tokenDto, @RequestBody HotSubjectTagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result>().ok(specialSubjectService.hotSubjectTagList(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index c8acefc253..afd8d0df91 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/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 { PreviewResultDTO previewResultDTO = new PreviewResultDTO(); - SpecialSubjectDTO subject = baseDao.getInfo(tagId); - previewResultDTO.setSpecialSubjectId(subject.getId()); - previewResultDTO.setTagName(subject.getTagName()); +// SpecialSubjectDTO subject = baseDao.getInfo(tagId); +// previewResultDTO.setSpecialSubjectId(subject.getId()); +// previewResultDTO.setTagName(subject.getTagName()); previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo(), formDTO.getPageSize())); result.add(previewResultDTO); }); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index c46370b357..03351836b9 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -355,11 +355,13 @@ art.PUBLISHER_NAME AS publisherName, art.PUBLISH_DATE AS publishDate, 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 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} ) 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 art.DEL_FLAG = '0' AND art.STATUS_FLAG = 'published' @@ -394,17 +396,20 @@ art.ID AS articleId, art.TITLE AS articleTitle, art.PUBLISHER_NAME AS publishName, + ac.IMG_URL AS articleCoverImg, date_format(art.PUBLISH_DATE,'%Y-%m-%d') AS publishDate, IFNULL(art.PREVIEW_CONTENT,'') AS articleContent, IFNULL(art.TAGS,'') AS tagName FROM ARTICLE art + INNER JOIN article_cover ac ON art.ID = ac.ARTICLE_ID INNER JOIN ARTICLE_PUBLISH_RANGE prange ON art.ID = prange.ARTICLE_ID AND prange.DEL_FLAG = '0' AND prange.PUBLISH_STATUS = 'published' + WHERE art.DEL_FLAG = '0' AND art.STATUS_FLAG = 'published'