yangyichao-mango commented on a change in pull request #2884:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r461539404



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/BaseService.java
##########
@@ -32,7 +32,7 @@
 /**
  * base service
  */
-public class BaseService {
+public class BaseService{

Review comment:
       Hi,
   Please revert this blank.

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/BaseService.java
##########
@@ -32,7 +32,7 @@
 /**
  * base service
  */
-public class BaseService {
+public class BaseService{

Review comment:
       Hi,
   Please revert this blank.

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -1256,7 +1427,7 @@ public void importSubProcess(User loginUser, Project 
targetProject, ArrayNode js
      * @return tree view json data
      * @throws Exception exception
      */
-    public Map<String, Object> viewTree(Integer processId, Integer limit) 
throws Exception {
+    public Map<String, Object> viewTree(Integer processId, Integer limit) 
throws Exception{

Review comment:
       Please revert this changes

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,39 @@ public Result createProcessDefinition(@ApiIgnore 
@RequestAttribute(value = Const
     }
 
     /**
-     * copy process definition
+     * copy or move process definition
      *
      * @param loginUser   login user
      * @param projectName project name
-     * @param processId   process definition id
+     * @param isCopy  isCopy
+     * @param processDefinitionIds   process definition ids
+     * @param targetProjectId target project id
      * @return copy result code
      */
-    @ApiOperation(value = "copyProcessDefinition", notes= 
"COPY_PROCESS_DEFINITION_NOTES")
+    @ApiOperation(value = "copyOrMoveProcessDefinition", notes= 
"COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "processId", value = 
"PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+            @ApiImplicitParam(name = "processDefinitionIds", value = 
"PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = 
"3,4"),
+            @ApiImplicitParam(name = "targetProjectId", value = 
"TARGET_PROJECT_ID", required = true, type = "Integer"),
+            @ApiImplicitParam(name = "isCopy", value = "IS_COPY", required = 
true, type = "boolean")
     })
-    @PostMapping(value = "/copy")
+    @PostMapping(value = "/copy-or-move")

Review comment:
       Hi,
   Will it be better to split copy and move to two api for single 
responsibility?

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -205,9 +217,9 @@ public Result updateProcessDefinition(@ApiIgnore 
@RequestAttribute(value = Const
     @ResponseStatus(HttpStatus.OK)
     @ApiException(RELEASE_PROCESS_DEFINITION_ERROR)
     public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value 
= Constants.SESSION_USER) User loginUser,
-                                            @ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
-                                            @RequestParam(value = "processId", 
required = true) int processId,
-                                            @RequestParam(value = 
"releaseState", required = true) int releaseState) {
+                                           @ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+                                           @RequestParam(value = "processId", 
required = true) int processId,
+                                           @RequestParam(value = 
"releaseState", required = true) int releaseState) {

Review comment:
       Please revert this changes.

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -231,8 +243,8 @@ public Result releaseProcessDefinition(@ApiIgnore 
@RequestAttribute(value = Cons
     @ResponseStatus(HttpStatus.OK)
     @ApiException(QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR)
     public Result queryProcessDefinitionById(@ApiIgnore 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                              @ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
-                                              @RequestParam("processId") 
Integer processId
+                                             @ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+                                             @RequestParam("processId") 
Integer processId

Review comment:
       Please revert the changes about blank, thx a lot, it is suggested to add 
the blank according to the checkstyle.xml, you can configure the 
checkstyle.xml[1] to your ide.
   
   [1] 
https://github.com/apache/incubator-dolphinscheduler/blob/dev/style/checkstyle.xml




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to