删除comment
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.lovenav.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.lovenav.entity.Comment;
|
||||
import com.lovenav.entity.CommentNode;
|
||||
import com.lovenav.entity.CommentUser;
|
||||
@@ -10,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -66,4 +69,13 @@ public class CommentController {
|
||||
public ResponseEntity<CommentUser> queryObserveUserById (Integer Id) {
|
||||
return ResponseEntity.ok(commentService.queryCommentUserById(Id));
|
||||
}
|
||||
|
||||
@RequestMapping("/deleteByCommentId")
|
||||
public String deleteByCommentId(String commentId)
|
||||
{
|
||||
HashMap<String, Object> result = new HashMap<>();
|
||||
result.put("code", 200);
|
||||
result.put("msg", commentService.SelectChildAndDelete(commentId));
|
||||
return JSONObject.toJSONString(result);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user