From 00d9645673b6937c4cdb12fd00b9b73bcf806eb6 Mon Sep 17 00:00:00 2001 From: cks Date: Wed, 6 Apr 2022 11:40:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20=E6=B5=81=E7=A8=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=88=A0=E9=99=A4=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E6=97=A0=E6=B5=81=E7=A8=8B=E6=A8=A1=E5=9E=8B=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dal/mysql/definition/BpmProcessDefinitionExtMapper.java | 4 +++- .../module/bpm/service/definition/BpmModelServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java b/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java index d857e145c..2f9041c89 100644 --- a/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.definition; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import org.apache.ibatis.annotations.Mapper; @@ -11,7 +12,8 @@ import java.util.List; public interface BpmProcessDefinitionExtMapper extends BaseMapperX { default List selectListByProcessDefinitionIds(Collection processDefinitionIds) { - return selectList("process_definition_id", processDefinitionIds); + return selectList(new LambdaQueryWrapperX() + .inIfPresent(BpmProcessDefinitionExtDO::getProcessDefinitionId,processDefinitionIds)); } default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) { diff --git a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 319f732d7..9f947a743 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -215,6 +215,9 @@ public class BpmModelServiceImpl implements BpmModelService { if (oldDefinition == null) { return; } + if(oldDefinition.isSuspended()){ + return; + } processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode()); } From bdfea0c5da5a3ff91b72c070e44bda790dbd6c76 Mon Sep 17 00:00:00 2001 From: cks Date: Fri, 8 Apr 2022 08:59:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=201.=20=E7=B2=BE=E5=87=86=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=EF=BC=8C=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9C=A8service=E4=B8=AD=202.=20=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dal/mysql/definition/BpmProcessDefinitionExtMapper.java | 3 +-- .../module/bpm/service/definition/BpmModelServiceImpl.java | 2 +- .../service/definition/BpmProcessDefinitionServiceImpl.java | 3 +++ .../service/definition/BpmProcessDefinitionServiceImpl.java | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java b/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java index 2f9041c89..3ff53f2d9 100644 --- a/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java @@ -12,8 +12,7 @@ import java.util.List; public interface BpmProcessDefinitionExtMapper extends BaseMapperX { default List selectListByProcessDefinitionIds(Collection processDefinitionIds) { - return selectList(new LambdaQueryWrapperX() - .inIfPresent(BpmProcessDefinitionExtDO::getProcessDefinitionId,processDefinitionIds)); + return selectList("process_definition_id", processDefinitionIds); } default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) { diff --git a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 9f947a743..bbeadd6b5 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -215,7 +215,7 @@ public class BpmModelServiceImpl implements BpmModelService { if (oldDefinition == null) { return; } - if(oldDefinition.isSuspended()){ + if(oldDefinition.isSuspended()) { return; } processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode()); diff --git a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index 5d41da654..011a948b6 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-activiti/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -103,6 +103,9 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } // 执行查询 List processDefinitions = definitionQuery.list(); + if (CollUtil.isEmpty(processDefinitions)) { + return Collections.emptyList(); + } // 获得 BpmProcessDefinitionDO Map List processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds( diff --git a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java index a6591bd93..b54e95813 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java @@ -236,6 +236,9 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ } // 执行查询 List processDefinitions = definitionQuery.list(); + if (CollUtil.isEmpty(processDefinitions)) { + return Collections.emptyList(); + } // 获得 BpmProcessDefinitionDO Map List processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds(