From c92ab030e0b3683ef290ec31b1f4ffc78b989502 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Jun 2020 15:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=96=87=E7=AB=A0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4=E4=B8=BADTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/PublishArticleFormDTO.java | 19 +++++++++++++++++++ .../epmet/controller/ArticleController.java | 9 ++++----- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishArticleFormDTO.java diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishArticleFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishArticleFormDTO.java new file mode 100644 index 0000000000..4aff23c34e --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishArticleFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 政府端-发布文章参数 + */ +@Data +public class PublishArticleFormDTO implements Serializable { + + private static final long serialVersionUID = -1659776209159063672L; + /** + * 要发布的草稿Id + */ + private String draftId; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 944fa4b8e7..1cfb55bde0 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -208,16 +208,15 @@ public class ArticleController { /** * desc:发布文章 - * @param draftId + * @param formDTO * @throws Exception */ @PostMapping("publish") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result publishArticle(@LoginUser TokenDto tokenDto, String draftId) throws Exception { - Boolean isSuccess = articleService.publish(tokenDto, draftId); + public Result publishArticle(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception { + Boolean isSuccess = articleService.publish(tokenDto, formDTO.getDraftId()); if (isSuccess){ - //TODO 异步校验内容 - scanContent(tokenDto,draftId); + scanContent(tokenDto,formDTO.getDraftId()); } return new Result().ok(isSuccess); }