Skip to content

Commit

Permalink
根据类型查看文章接口缺失
Browse files Browse the repository at this point in the history
  • Loading branch information
Sectet1ove committed May 19, 2022
1 parent 7c40f59 commit 7fccbc2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ public ResultMessage<Article> get(@PathVariable String id) {
return ResultUtil.data(articleService.getById(id));
}

@ApiOperation(value = "根据类型查看文章")
@ApiImplicitParam(name = "type", value = "文章类型", required = true, dataType = "String", paramType = "path")
@GetMapping(value = "/type/{type}")
public ResultMessage<Article> getByType(@PathVariable String type) {

return ResultUtil.data(articleService.customGetByType(type));
}

@ApiOperation(value = "分页获取")
@ApiImplicitParams({
@ApiImplicitParam(name = "categoryId", value = "文章分类ID", paramType = "query"),
Expand Down

0 comments on commit 7fccbc2

Please sign in to comment.