|
@@ -0,0 +1,63 @@
|
|
|
|
|
+package seecoder.devcloud.web.controller.project;
|
|
|
|
|
+
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+import seecoder.devcloud.web.model.vo.Response;
|
|
|
|
|
+import seecoder.devcloud.web.model.vo.project.BugListCreateVO;
|
|
|
|
|
+import seecoder.devcloud.web.model.vo.project.BugListUpdateBasicVO;
|
|
|
|
|
+import seecoder.devcloud.web.model.vo.project.BugListVO;
|
|
|
|
|
+import seecoder.devcloud.web.service.project.BugListService;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @author PuHong Weng
|
|
|
|
|
+ * @date 2021/3/21
|
|
|
|
|
+ * @description:
|
|
|
|
|
+ */
|
|
|
|
|
+@Api(tags = "Bug List相关 API")
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/bug_list")
|
|
|
|
|
+public class BugListController {
|
|
|
|
|
+
|
|
|
|
|
+ private final BugListService bugListService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ public BugListController(BugListService bugListService) {
|
|
|
|
|
+ this.bugListService = bugListService;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping
|
|
|
|
|
+ @ApiOperation(value = "创建一条bug list", httpMethod = "POST")
|
|
|
|
|
+ @ApiImplicitParam(value = "bugListCreateVO", dataType = "object", paramType = "body")
|
|
|
|
|
+ public Response create(@RequestBody BugListCreateVO bugListCreateVO){
|
|
|
|
|
+ bugListService.create(bugListCreateVO);
|
|
|
|
|
+ return Response.buildSuccess();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PutMapping("/finish")
|
|
|
|
|
+ @ApiOperation(value = "标记bug list已解决", httpMethod = "POST")
|
|
|
|
|
+ @ApiImplicitParam(value = "id", dataType = "int", paramType = "query")
|
|
|
|
|
+ public Response finish(@RequestParam("id") Integer id){
|
|
|
|
|
+ bugListService.finish(id);
|
|
|
|
|
+ return Response.buildSuccess();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ @ApiOperation(value = "获取一个项目所有bug list", httpMethod = "GET")
|
|
|
|
|
+ @ApiImplicitParam(value = "projectId", dataType = "int", paramType = "query")
|
|
|
|
|
+ List<BugListVO> list(@RequestParam("projectId") Integer projectId){
|
|
|
|
|
+ return bugListService.list(projectId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PutMapping
|
|
|
|
|
+ @ApiOperation(value = "更新bug list基本信息, 不需要更新的信息不需要填", httpMethod = "PUT")
|
|
|
|
|
+ @ApiImplicitParam(value = "bugListUpdateBasicVO", dataType = "object", paramType = "body")
|
|
|
|
|
+ Response updateBasicInfo(@RequestBody BugListUpdateBasicVO bugListUpdateBasicVO){
|
|
|
|
|
+ bugListService.updateBasicInfo(bugListUpdateBasicVO);
|
|
|
|
|
+ return Response.buildSuccess();
|
|
|
|
|
+ }
|
|
|
|
|
+}
|