From 580f4d3c2ca9eee53eee95a4de2f6610b790780a Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 12 二月 2026 18:24:13 +0800
Subject: [PATCH] 小程序 接口开发
---
server/dmmall_web/src/main/java/com/doumee/api/web/CommentApi.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 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 a4011d2..344c970 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
@@ -1,5 +1,6 @@
package com.doumee.api.web;
+import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
@@ -8,6 +9,7 @@
import com.doumee.dao.web.dto.CommentDTO;
import com.doumee.dao.web.dto.activity.ActivityCommentDTO;
import com.doumee.dao.web.dto.activity.ActivityReplyCommentDTO;
+import com.doumee.dao.web.request.CommentApplyRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -26,12 +28,11 @@
public class CommentApi extends ApiController{
- @PreventRepeat
- @ApiOperation("鏂板缓")
- @PostMapping("/create")
- @RequiresPermissions("business:comment:create")
- public ApiResponse create(@RequestBody Comment comment) {
- return ApiResponse.success(commentService.create(comment,getMemberId()));
+ @LoginRequired
+ @ApiOperation("鍙戝竷璇勮")
+ @PostMapping("/apply")
+ public ApiResponse<Comment> apply(@RequestBody CommentApplyRequest comment) {
+ return ApiResponse.success(commentService.apply(comment,getMemberId()));
}
@@ -41,7 +42,6 @@
* @param pageWrap 鍒嗛〉瀵硅薄
* @return PageData<Comment>
*/
- @PreventRepeat
@ApiOperation("鍒嗛〉娲诲姩鎺㈠簵璇勮鏌ヨ")
@PostMapping("/findActivityCommentDTOPage")
public ApiResponse<PageData<ActivityCommentDTO>> findActivityCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){
@@ -54,7 +54,7 @@
* @param pageWrap 鍒嗛〉瀵硅薄
* @return PageData<Comment>
*/
- @PreventRepeat
+ @LoginRequired
@ApiOperation("鍒嗛〉娲诲姩鎺㈠簵璇勮鍥炲鏌ヨ")
@PostMapping("/findActivityReplyCommentDTOPage")
public ApiResponse<PageData<ActivityReplyCommentDTO>> findActivityReplyCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){
--
Gitblit v1.9.3