From a9e1505680c7dd45840975b38451ef88d451e6d4 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 17 三月 2026 14:41:12 +0800
Subject: [PATCH] 代码优化

---
 server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java b/server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java
index 344c970..f17d742 100644
--- a/server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java
+++ b/server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java
@@ -13,10 +13,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @author 姹熻箘韫�
@@ -33,6 +30,15 @@
     @PostMapping("/apply")
     public ApiResponse<Comment> apply(@RequestBody CommentApplyRequest comment) {
         return ApiResponse.success(commentService.apply(comment,getMemberId()));
+    }
+
+
+    @LoginRequired
+    @ApiOperation("鍒犻櫎璇勮")
+    @GetMapping("/delete/{id}")
+    public ApiResponse deleteById(@PathVariable Integer id) {
+        commentService.deleteById(id,getMemberId());
+        return ApiResponse.success(null);
     }
 
 
@@ -54,7 +60,6 @@
      * @param pageWrap 鍒嗛〉瀵硅薄
      * @return PageData<Comment>
      */
-    @LoginRequired
     @ApiOperation("鍒嗛〉娲诲姩鎺㈠簵璇勮鍥炲鏌ヨ")
     @PostMapping("/findActivityReplyCommentDTOPage")
     public ApiResponse<PageData<ActivityReplyCommentDTO>> findActivityReplyCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){

--
Gitblit v1.9.3