3.30 每日总结 (开发评论模块)

@Operation(summary = "根据文章id分页查询评论列表")
@GetMapping("/page")
public Result page(CommentDTO dto){
return commentService.pageByAid(dto);
}



@Operation(summary = "添加评论")
@PostMapping("/save")
@SaCheckLogin
public Result save(@RequestBody CommentDTO commentDTO) {
return commentService.saveComment(commentDTO);
}

// @Operation(summary = "删除评论")
// @DeleteMapping("/remove/{id}")
// public R remove(@PathVariable Integer id) {
// return R.ok(commentService.removeById(id));
// }

// @Operation(summary = "评论点赞")
// @PostMapping("/liked")
// public R liked(@RequestBody LikedDTO likedDTO) {
// User user = AuthUtils.get();
// likedDTO.setUid(user.getId());
// return R.ok(commentLikeService.liked(likedDTO));
// }
//
// @Operation(summary = "查询当前用户的点赞的评论id")
// @GetMapping("/cidList/{uid}")
// public R<List<Long>> cidList(@PathVariable Long uid) {
// return R.ok(commentLikeService.cidListByUid(uid));
// }
}



posted @ 2025-04-09 11:55  笠大  阅读(6)  评论(0)    收藏  举报