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); }