From 21824cd555b8e8fd353b707bfdd4d9369ba5f9d7 Mon Sep 17 00:00:00 2001 From: Jarrett <291979254@qq.com> Date: Thu, 7 Sep 2023 23:13:22 +0800 Subject: [PATCH] add: admin delete comments by batch --- src/main/java/com/jiaruiblog/controller/CommentController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jiaruiblog/controller/CommentController.java b/src/main/java/com/jiaruiblog/controller/CommentController.java index 20af0f1..70928be 100644 --- a/src/main/java/com/jiaruiblog/controller/CommentController.java +++ b/src/main/java/com/jiaruiblog/controller/CommentController.java @@ -72,7 +72,8 @@ public BaseApiResult remove(@RequestBody Comment comment, HttpServletRequest req return commentService.remove(comment, userId); } - @ApiOperation(value = "根据id列表移除批量评论", notes = "根据id移除批量评论") + @Permission(value = PermissionEnum.ADMIN) + @ApiOperation(value = "根据id列表移除批量评论", notes = "管理员才能进行此项操作根据id移除批量评论") @DeleteMapping(value = "/auth/removeBatch") public BaseApiResult removeBatch(@RequestBody BatchIdDTO batchIdDTO) { List commentIdList = batchIdDTO.getIds();