From a2756c79ebe96d0cae45d6c58893d0d66ef95a22 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Tue, 22 Jul 2025 11:47:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E8=8A=82=E7=82=B9=E5=88=86=E6=89=B9?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E5=85=BC=E5=AE=B9=E8=80=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/combop/AutoexecCombopProcessConfigInitApi.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopProcessConfigInitApi.java b/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopProcessConfigInitApi.java index 8e70088e..fc984e52 100644 --- a/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopProcessConfigInitApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/combop/AutoexecCombopProcessConfigInitApi.java @@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.auth.core.AuthAction; import neatlogic.framework.autoexec.auth.AUTOEXEC_BASE; +import neatlogic.framework.autoexec.constvalue.AutoexecParallelPolicy; import neatlogic.framework.autoexec.constvalue.CombopNodeSpecify; import neatlogic.framework.autoexec.constvalue.ParamMappingMode; import neatlogic.framework.autoexec.dao.mapper.AutoexecCombopMapper; @@ -344,6 +345,10 @@ public class AutoexecCombopProcessConfigInitApi extends PrivateApiComponentBase parallelPolicyObj.put("name", "并发策略"); parallelPolicyObj.put("isRequired", 1); String parallelPolicy = executeConfigVo.getParallelPolicy(); + //兼容老数据 + if (StringUtils.isBlank(parallelPolicy) && roundCount != null) { + parallelPolicy = AutoexecParallelPolicy.ROUND_COUNT.getValue(); + } if (StringUtils.isNotBlank(parallelPolicy)) { parallelPolicyObj.put("mappingMode", ParamMappingMode.CONSTANT.getValue()); parallelPolicyObj.put("value", parallelPolicy); -- Gitee From 44b5254a76cded2dafa701ca4da121dd3f98c84e Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Thu, 24 Jul 2025 11:02:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=E4=BE=9B=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E5=88=9B=E5=BB=BA=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=8E=A5=E5=8F=A3=E6=8C=87=E5=AE=9A=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E4=BA=BA=E6=89=A7=E8=A1=8C=E6=9D=83=E9=99=90=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/action/CreateAutoexecCombopJobPublicApi.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java index dbc04f61..db991b61 100644 --- a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java @@ -37,12 +37,16 @@ import neatlogic.framework.cmdb.crossover.IResourceAccountCrossoverMapper; import neatlogic.framework.cmdb.dto.resourcecenter.AccountProtocolVo; import neatlogic.framework.cmdb.exception.resourcecenter.ResourceCenterAccountProtocolNotFoundException; import neatlogic.framework.common.constvalue.ApiParamType; +import neatlogic.framework.common.constvalue.systemuser.SystemUser; import neatlogic.framework.crossover.CrossoverServiceFactory; import neatlogic.framework.dao.mapper.UserMapper; +import neatlogic.framework.dto.AuthenticationInfoVo; import neatlogic.framework.dto.UserVo; +import neatlogic.framework.exception.user.UserNotFoundException; import neatlogic.framework.restful.annotation.*; import neatlogic.framework.restful.constvalue.OperationTypeEnum; import neatlogic.framework.restful.core.privateapi.PrivateApiComponentBase; +import neatlogic.framework.service.AuthenticationInfoService; import neatlogic.module.autoexec.dao.mapper.AutoexecCombopVersionMapper; import neatlogic.module.autoexec.service.AutoexecCombopService; import neatlogic.module.autoexec.service.AutoexecJobActionService; @@ -78,6 +82,9 @@ public class CreateAutoexecCombopJobPublicApi extends PrivateApiComponentBase { @Resource AutoexecCombopService autoexecCombopService; + @Resource + private AuthenticationInfoService authenticationInfoService; + @Override public String getName() { return "nmaaja.createautoexecjobfromcomboppublicapi.getname"; @@ -130,6 +137,10 @@ public class CreateAutoexecCombopJobPublicApi extends PrivateApiComponentBase { UserVo assignUserTmp = userMapper.getUserByUser(assignExecUserParam); if (assignUserTmp != null) { assignExecUser = assignUserTmp.getUuid(); + AuthenticationInfoVo authenticationInfo = authenticationInfoService.getAuthenticationInfo(assignExecUser); + UserContext.init(assignUserTmp, authenticationInfo, SystemUser.SYSTEM.getTimezone()); + }else{ + throw new UserNotFoundException(assignExecUserParam); } } JSONObject param = jsonObj.getJSONObject("param"); -- Gitee From 906881a0799207de52dbf8009212effa2f8c3cce Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Thu, 24 Jul 2025 14:55:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=88=9B=E5=BB=BA=E6=8E=A5=E5=8F=A3=E5=8F=AA=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E2=80=9C=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86=E6=9D=83?= =?UTF-8?q?=E9=99=90=E2=80=9D=E7=9A=84=E7=94=A8=E6=88=B7=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/job/action/CreateAutoexecCombopJobPublicApi.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java index db991b61..600e536d 100644 --- a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java @@ -19,7 +19,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.asynchronization.threadlocal.UserContext; import neatlogic.framework.auth.core.AuthAction; -import neatlogic.framework.autoexec.auth.AUTOEXEC_BASE; +import neatlogic.framework.autoexec.auth.AUTOEXEC_JOB_MODIFY; import neatlogic.framework.autoexec.constvalue.*; import neatlogic.framework.autoexec.dao.mapper.AutoexecCombopMapper; import neatlogic.framework.autoexec.dto.AutoexecParamVo; @@ -64,7 +64,7 @@ import java.util.stream.Collectors; **/ @Service -@AuthAction(action = AUTOEXEC_BASE.class) +@AuthAction(action = AUTOEXEC_JOB_MODIFY.class) @OperationType(type = OperationTypeEnum.CREATE) public class CreateAutoexecCombopJobPublicApi extends PrivateApiComponentBase { @Resource -- Gitee