From 4cd5f99898813b90dcc9efda01f918892f077181 Mon Sep 17 00:00:00 2001 From: x ronger Date: Tue, 24 Mar 2020 01:07:05 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=88=91=E7=9A=84=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rymcu/vertical/web/api/article/ArticleController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/rymcu/vertical/web/api/article/ArticleController.java b/src/main/java/com/rymcu/vertical/web/api/article/ArticleController.java index 8fa3f41..13aab2c 100644 --- a/src/main/java/com/rymcu/vertical/web/api/article/ArticleController.java +++ b/src/main/java/com/rymcu/vertical/web/api/article/ArticleController.java @@ -31,11 +31,9 @@ public class ArticleController { @Resource private CommentService commentService; - - @GetMapping("/detail/{id}") - public GlobalResult> detail(@PathVariable Integer id){ - ArticleDTO articleDTO = articleService.findArticleDTOById(id,2); + public GlobalResult> detail(@PathVariable Integer id, @RequestParam(defaultValue = "2") Integer type){ + ArticleDTO articleDTO = articleService.findArticleDTOById(id,type); Map map = new HashMap<>(1); map.put("article", articleDTO); return GlobalResultGenerator.genSuccessResult(map);