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 2f9041c893..3ff53f2d9c 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 9f947a7435..bbeadd6b56 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 5d41da6549..011a948b66 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 a6591bd934..b54e958130 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(