feat(kv): 新增删除评论内容功能

- 在 CommentContentController 中新增删除评论内容的接口
- 定义 DeleteCommentContentReqDTO 用于接收删除请求参数
- 在 CommentContentRepository 中新增删除评论正文的方法
- 在 CommentContentService 及其实现类中新增删除评论内容的业务逻辑
- 在 KeyValueFeignApi 中新增删除评论内容的 Feign 接口
- 在 gateApi.http 中添加删除评论内容的测试用例
This commit is contained in:
2025-11-09 14:01:14 +08:00
parent f74397ed1e
commit 93ca81a15b
7 changed files with 76 additions and 4 deletions

View File

@@ -31,4 +31,6 @@ public interface KeyValueFeignApi {
@PostMapping(value = PREFIX + "/comment/content/batchFind")
Response<List<FindCommentContentRspDTO>> batchFindCommentContent(@RequestBody BatchFindCommentContentReqDTO batchFindCommentContentReqDTO);
@PostMapping(value = PREFIX + "/comment/content/delete")
Response<?> deleteCommentContent(@RequestBody DeleteCommentContentReqDTO deleteCommentContentReqDTO);
}

View File

@@ -0,0 +1,25 @@
package com.hanserwei.hannote.kv.dto.req;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DeleteCommentContentReqDTO {
@NotNull(message = "笔记 ID 不能为空")
private Long noteId;
@NotBlank(message = "发布年月不能为空")
private String yearMonth;
@NotBlank(message = "评论正文 ID 不能为空")
private String contentId;
}