You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/08/06 16:49:54 UTC

[GitHub] [dolphinscheduler] flytowns opened a new pull request #5958: [Feature][JsonSplit-api]processDefinition switch/delete/batchDelete interface (#5500 #5501)

flytowns opened a new pull request #5958:
URL: https://github.com/apache/dolphinscheduler/pull/5958


   * feat: processDefinition switch interface
   * feat: processDefinition delete interface
   * feat: processDefinition batch delete interface
   * test: batch delete
   * fix: make the type of varable version from long to int (the parameter of switch interface)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] JinyLeeChina commented on a change in pull request #5958: [Feature][JsonSplit-api]processDefinition switch/delete/batchDelete interface (#5500 #5501)

Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on a change in pull request #5958:
URL: https://github.com/apache/dolphinscheduler/pull/5958#discussion_r684727109



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -567,41 +567,41 @@ public Result deleteProcessDefinitionById(@ApiIgnore @RequestAttribute(value = C
      *
      * @param loginUser login user
      * @param projectCode project code
-     * @param processDefinitionIds process definition id list
+     * @param processDefinitionCodes process definition code list
      * @return delete result code
      */
     @ApiOperation(value = "batchDeleteByCodes", notes = "BATCH_DELETE_PROCESS_DEFINITION_BY_IDS_NOTES")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", type = "String")
+            @ApiImplicitParam(name = "processDefinitionCodes", value = "PROCESS_DEFINITION_CODES", type = "String")
     })
     @GetMapping(value = "/batch-delete")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR)
     @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
-    public Result batchDeleteProcessDefinitionByIds(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                                    @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
-                                                    @RequestParam("processDefinitionIds") String processDefinitionIds
+    public Result batchDeleteProcessDefinitionByCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+                                                      @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+                                                      @RequestParam("processDefinitionCodes") String processDefinitionCodes
     ) {
         Map<String, Object> result = new HashMap<>();
-        List<String> deleteFailedIdList = new ArrayList<>();
-        if (StringUtils.isNotEmpty(processDefinitionIds)) {
-            String[] processDefinitionIdArray = processDefinitionIds.split(",");
-            for (String strProcessDefinitionId : processDefinitionIdArray) {
-                int processDefinitionId = Integer.parseInt(strProcessDefinitionId);
+        List<String> deleteFailedCodeList = new ArrayList<>();
+        if (StringUtils.isNotEmpty(processDefinitionCodes)) {
+            String[] processDefinitionCodeArray = processDefinitionCodes.split(",");
+            for (String strProcessDefinitionCode : processDefinitionCodeArray) {
+                long processDefinitionCode = Long.parseLong(strProcessDefinitionCode);
                 try {
-                    Map<String, Object> deleteResult = processDefinitionService.deleteProcessDefinitionById(loginUser, projectCode, processDefinitionId);
+                    Map<String, Object> deleteResult = processDefinitionService.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);

Review comment:
       Please modify to batch operation




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] flytowns closed pull request #5958: [Feature][JsonSplit-api]processDefinition switch/delete/batchDelete interface (#5500 #5501)

Posted by GitBox <gi...@apache.org>.
flytowns closed pull request #5958:
URL: https://github.com/apache/dolphinscheduler/pull/5958


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org