|
|
@@ -1,6 +1,8 @@
|
|
|
package seecoder.devcloud.web.controller.tree;
|
|
|
|
|
|
|
|
|
+import org.apache.ibatis.annotations.Delete;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import seecoder.devcloud.web.po.TreeNodePO;
|
|
|
@@ -12,7 +14,7 @@ import java.util.List;
|
|
|
@RestController
|
|
|
@RequestMapping("/tree")
|
|
|
/**
|
|
|
- * @Author chenyz
|
|
|
+ * @Author cyz,xzh
|
|
|
* @Description 需求树相关操作
|
|
|
*/
|
|
|
public class TreeNodesController {
|
|
|
@@ -31,14 +33,17 @@ public class TreeNodesController {
|
|
|
*/
|
|
|
@GetMapping("/{projectId}")
|
|
|
public Response listTreeNodesByProjectId(@PathVariable("projectId") int projectId){
|
|
|
- // TODO
|
|
|
- return null;
|
|
|
+ return treeNodeService.listTreeNodesByProjectId(projectId);
|
|
|
}
|
|
|
|
|
|
|
|
|
- @PostMapping("/addNode")
|
|
|
+ @PostMapping("/node")
|
|
|
public Response insertTreeNode(){
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @DeleteMapping("/node/{nodeId}")
|
|
|
+ public Response deleteTreeNode(@PathVariable("nodeId") int nodeId) {
|
|
|
+ return Response.ok(treeNodeService.deleteTreeNode(nodeId));
|
|
|
+ }
|
|
|
}
|