From 7fccbc2aa2ec12fe6bf180b1fec5f366408bdfc8 Mon Sep 17 00:00:00 2001 From: caihongcheng <1501738723@qq.com> Date: Thu, 19 May 2022 15:23:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=B1=BB=E5=9E=8B=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=96=87=E7=AB=A0=E6=8E=A5=E5=8F=A3=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/controller/other/ArticleManagerController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java index ea8e22ab..d9372124 100644 --- a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java +++ b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java @@ -42,6 +42,14 @@ public class ArticleManagerController { return ResultUtil.data(articleService.getById(id)); } + @ApiOperation(value = "根据类型查看文章") + @ApiImplicitParam(name = "type", value = "文章类型", required = true, dataType = "String", paramType = "path") + @GetMapping(value = "/type/{type}") + public ResultMessage
getByType(@PathVariable String type) { + + return ResultUtil.data(articleService.customGetByType(type)); + } + @ApiOperation(value = "分页获取") @ApiImplicitParams({ @ApiImplicitParam(name = "categoryId", value = "文章分类ID", paramType = "query"),