feat(kv): 新增删除评论内容功能
- 在 CommentContentController 中新增删除评论内容的接口 - 定义 DeleteCommentContentReqDTO 用于接收删除请求参数 - 在 CommentContentRepository 中新增删除评论正文的方法 - 在 CommentContentService 及其实现类中新增删除评论内容的业务逻辑 - 在 KeyValueFeignApi 中新增删除评论内容的 Feign 接口 - 在 gateApi.http 中添加删除评论内容的测试用例
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user