From 1a6142c446bf467157098b75af646fd13828acd1 Mon Sep 17 00:00:00 2001 From: x ronger Date: Thu, 26 Dec 2019 00:04:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/rymcu/vertical/web/api/common/CommonApiController.java | 2 -- .../java/com/rymcu/vertical/web/api/topic/TopicController.java | 2 +- .../java/com/rymcu/vertical/web/api/user/UserController.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/rymcu/vertical/web/api/common/CommonApiController.java b/src/main/java/com/rymcu/vertical/web/api/common/CommonApiController.java index 88397d0..9917ebe 100644 --- a/src/main/java/com/rymcu/vertical/web/api/common/CommonApiController.java +++ b/src/main/java/com/rymcu/vertical/web/api/common/CommonApiController.java @@ -97,8 +97,6 @@ public class CommonApiController { return GlobalResultGenerator.genSuccessResult(map); } - - @GetMapping("/article/{id}") public GlobalResult> detail(@PathVariable Integer id){ ArticleDTO articleDTO = articleService.findArticleDTOById(id,1); diff --git a/src/main/java/com/rymcu/vertical/web/api/topic/TopicController.java b/src/main/java/com/rymcu/vertical/web/api/topic/TopicController.java index 0f580e6..a67ff64 100644 --- a/src/main/java/com/rymcu/vertical/web/api/topic/TopicController.java +++ b/src/main/java/com/rymcu/vertical/web/api/topic/TopicController.java @@ -35,7 +35,7 @@ public class TopicController { @GetMapping("/{name}") public GlobalResult articles(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "10") Integer rows, @PathVariable String name){ PageHelper.startPage(page, rows); - List list = articleService.findArticlesByTopicName(name); + List list = articleService.findArticlesByTopicUri(name); PageInfo pageInfo = new PageInfo(list); Map map = Utils.getArticlesGlobalResult(pageInfo); return GlobalResultGenerator.genSuccessResult(map); diff --git a/src/main/java/com/rymcu/vertical/web/api/user/UserController.java b/src/main/java/com/rymcu/vertical/web/api/user/UserController.java index 026b2fc..206578f 100644 --- a/src/main/java/com/rymcu/vertical/web/api/user/UserController.java +++ b/src/main/java/com/rymcu/vertical/web/api/user/UserController.java @@ -34,7 +34,7 @@ public class UserController { } @GetMapping("/{nickname}/articles") - public GlobalResult userArticles(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "10") Integer rows, @PathVariable String nickname){ + public GlobalResult userArticles(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "12") Integer rows, @PathVariable String nickname){ UserDTO userDTO = userService.findUserDTOByNickname(nickname); if (userDTO == null){ return GlobalResultGenerator.genErrorResult("用户不存在!");