This commit is contained in:
sjm
2023-12-26 23:16:03 +08:00
parent eda0e41b53
commit 8b6b6a6b7a
6 changed files with 57 additions and 81 deletions

View File

@@ -39,13 +39,6 @@ public class CommentController {
return commentService.AddLikeCount(id);
}
// 显示评论
@RequestMapping(method = RequestMethod.GET, value = "/view_comment")
public ResponseEntity<List<CommentNode>> queryObserveByBlogId (
@ApiParam(name = "url_id", value = "id", required = true) @PathVariable Integer url_id
) {
return ResponseEntity.ok(commentService.queryCommentByUrlId(url_id));
}
// 显示回复
@RequestMapping(method = RequestMethod.GET, value = "/view_reply")
@@ -59,10 +52,8 @@ public ResponseEntity<List<CommentNode>> queryObserveByBlogId (
* @param UrlId 博客id
* @return 博客的评论信息
*/
@GetMapping("/UrlId")
public ResponseEntity<List<CommentNode>> queryCommentByUrlId (
@ApiParam(name = "UrlId", value = "urlid", required = true) @PathVariable Integer UrlId
) {
@RequestMapping(method = RequestMethod.GET, value = "/UrlId")
public ResponseEntity<List<CommentNode>> queryCommentByUrlId (Integer UrlId) {
return ResponseEntity.ok(commentService.queryCommentByUrlId(UrlId));
}
@@ -71,10 +62,8 @@ public ResponseEntity<List<CommentNode>> queryObserveByBlogId (
* @param Id 评论id
* @return 评论信息,携带用户信息
*/
@GetMapping("/Id")
public ResponseEntity<CommentUser> queryObserveUserById (
@ApiParam(name = "Id", value = "评论id", required = true)@PathVariable Integer Id
) {
@RequestMapping(method = RequestMethod.GET, value = "/Id")
public ResponseEntity<CommentUser> queryObserveUserById (Integer Id) {
return ResponseEntity.ok(commentService.queryCommentUserById(Id));
}
}