|
|
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import cn.seecoder.common.exceptions.ServiceException;
|
|
|
@@ -90,4 +91,11 @@ public class ProjectController {
|
|
|
public Response generaterelateCode(@RequestParam("projectId") Integer projectId,@RequestParam("relateCode") String relateCode) {
|
|
|
return Response.buildSuccess(projectService.relateProjects(projectId,relateCode));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看一个项目关联的所有项目", httpMethod = "GET")
|
|
|
+ @GetMapping("/relate/{projectId}")
|
|
|
+ @ApiImplicitParam(name = "projectId", dataType = "int", paramType = "query")
|
|
|
+ public Response<List<ProjectVO>> getRelatedProject(@PathVariable("projectId") Integer projectId) {
|
|
|
+ return Response.buildSuccess(projectService.getRelatedProjects(projectId));
|
|
|
+ }
|
|
|
}
|