代码格式优化

This commit is contained in:
x ronger 2019-12-26 00:04:11 +08:00
parent 4a814a16fa
commit 1a6142c446
3 changed files with 2 additions and 4 deletions

View File

@ -97,8 +97,6 @@ public class CommonApiController {
return GlobalResultGenerator.genSuccessResult(map);
}
@GetMapping("/article/{id}")
public GlobalResult<Map<String, Object>> detail(@PathVariable Integer id){
ArticleDTO articleDTO = articleService.findArticleDTOById(id,1);

View File

@ -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<ArticleDTO> list = articleService.findArticlesByTopicName(name);
List<ArticleDTO> list = articleService.findArticlesByTopicUri(name);
PageInfo<ArticleDTO> pageInfo = new PageInfo(list);
Map map = Utils.getArticlesGlobalResult(pageInfo);
return GlobalResultGenerator.genSuccessResult(map);

View File

@ -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("用户不存在!");