zhangyongtian commented on code in PR #14089:
URL: 
https://github.com/apache/dolphinscheduler/pull/14089#discussion_r1193287437


##########
dolphinscheduler-ui/src/service/modules/process-definition/index.ts:
##########
@@ -255,3 +256,10 @@ export function viewProcessDefinitionVariables(code: 
number, processCode: number
   })
 }
 
+export function batchOnlineByCodeStates(data: CodeStateListReq, code: number): 
any {
+    return axios({
+        url: `/projects/${code}/process-definition/batch-release`,
+        method: 'post',
+        data
+    })
+}

Review Comment:
   Okay, I'll make the necessary modifications



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -3054,4 +3058,48 @@ public void deleteOtherRelation(Project project, 
Map<String, Object> result, Pro
 
     }
 
+    /**
+     * Batch release process definitions by code states.
+     *
+     * @param loginUser    Login user.
+     * @param projectCode  Project code.
+     * @param codeStates   Code states in JSON format.
+     * @return Result of the batch release process definitions.
+     */
+    @Override
+    @Transactional
+    public Map<String, Object> batchReleaseProcessDefinitions(User loginUser, 
long projectCode, String codeStates) {
+        Map<String, Object> result = new HashMap<>();
+        if (StringUtils.isEmpty(codeStates)) {
+            log.error("Parameter codeStates is empty, projectCode is {}.", 
projectCode);
+            putMsg(result, Status.PROCESS_DEFINITION_CODES_IS_EMPTY);
+            throw new 
ServiceException(Status.PROCESS_DEFINITION_CODES_IS_EMPTY);
+        }
+
+        try {
+            Map<String, String> codeStateMap = new Gson().fromJson(codeStates, 
new TypeToken<Map<String, String>>() {

Review Comment:
   Okay, I'll make the necessary modifications



-- 
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: [email protected]

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

Reply via email to