From f12c66d34fe06c0d6ec76f2cb719c13059ac2b49 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 22 Apr 2025 11:49:20 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E5=8F=91=E5=B8=83-=E9=80=9A=E8=BF=87=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF=E5=88=9B=E5=BB=BA=E7=9A=84=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BD=9C=E4=B8=9A=E7=BC=BA=E5=B0=91=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E7=B1=BB=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1376921932234752]一键发布-通过超级流水线创建的批量作业缺少来源类目 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1376921932234752 --- .../handler/BatchDeployJobSourceHandler.java | 53 +++++++++++++++++++ .../service/DeployBatchJobServiceImpl.java | 1 + 2 files changed, 54 insertions(+) create mode 100644 src/main/java/neatlogic/module/deploy/job/source/handler/BatchDeployJobSourceHandler.java diff --git a/src/main/java/neatlogic/module/deploy/job/source/handler/BatchDeployJobSourceHandler.java b/src/main/java/neatlogic/module/deploy/job/source/handler/BatchDeployJobSourceHandler.java new file mode 100644 index 00000000..24529501 --- /dev/null +++ b/src/main/java/neatlogic/module/deploy/job/source/handler/BatchDeployJobSourceHandler.java @@ -0,0 +1,53 @@ +/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see .*/ + +package neatlogic.module.deploy.job.source.handler; + +import com.alibaba.fastjson.JSONObject; +import neatlogic.framework.autoexec.dto.job.AutoexecJobRouteVo; +import neatlogic.framework.autoexec.source.IAutoexecJobSource; +import neatlogic.framework.deploy.constvalue.JobSource; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.List; + +@Component +public class BatchDeployJobSourceHandler implements IAutoexecJobSource { + + @Override + public String getValue() { + return JobSource.BATCHDEPLOY.getValue(); + } + + @Override + public String getText() { + return JobSource.BATCHDEPLOY.getText(); + } + + @Override + public List getListByUniqueKeyList(List uniqueKeyList) { + if (CollectionUtils.isEmpty(uniqueKeyList)) { + return null; + } + List resultList = new ArrayList<>(); + for (String str : uniqueKeyList) { + String label = "一键发布"; + resultList.add(new AutoexecJobRouteVo(str, label, new JSONObject())); + } + return resultList; + } +} diff --git a/src/main/java/neatlogic/module/deploy/service/DeployBatchJobServiceImpl.java b/src/main/java/neatlogic/module/deploy/service/DeployBatchJobServiceImpl.java index 43d051af..276401c9 100644 --- a/src/main/java/neatlogic/module/deploy/service/DeployBatchJobServiceImpl.java +++ b/src/main/java/neatlogic/module/deploy/service/DeployBatchJobServiceImpl.java @@ -117,6 +117,7 @@ public class DeployBatchJobServiceImpl implements DeployBatchJobService, IDeploy jobVo.setParentId(deployJobVo.getId()); jobVo.setInvokeId(deployJobVo.getId()); jobVo.setRouteId(deployJobVo.getInvokeId().toString()); + jobVo.setSource(deployJobVo.getSource()); DeployJobModuleVo deployJobModuleVo = new DeployJobModuleVo(); if (jobTemplateVo.getConfig() != null) { JSONArray selectNodeList = jobTemplateVo.getConfig().getJSONArray("selectNodeList"); -- Gitee