Commit bae4502eb9f06690cd453e75b4796dfb788a1fdf
Committed by
Gitee
!119 流程模型的几个问题
Merge pull request !119 from @C/master
Showing
4 changed files
with
10 additions
and
0 deletions
yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionExtMapper.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.dal.mysql.definition; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 3 | 4 | import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO; |
| 4 | 5 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | 6 | import org.apache.ibatis.annotations.Mapper; | ... | ... |
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 { |
| 215 | 215 | if (oldDefinition == null) { |
| 216 | 216 | return; |
| 217 | 217 | } |
| 218 | + if(oldDefinition.isSuspended()) { | |
| 219 | + return; | |
| 220 | + } | |
| 218 | 221 | processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode()); |
| 219 | 222 | } |
| 220 | 223 | ... | ... |
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 |
| 103 | 103 | } |
| 104 | 104 | // 执行查询 |
| 105 | 105 | List<ProcessDefinition> processDefinitions = definitionQuery.list(); |
| 106 | + if (CollUtil.isEmpty(processDefinitions)) { | |
| 107 | + return Collections.emptyList(); | |
| 108 | + } | |
| 106 | 109 | |
| 107 | 110 | // 获得 BpmProcessDefinitionDO Map |
| 108 | 111 | List<BpmProcessDefinitionExtDO> processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds( | ... | ... |
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 |
| 236 | 236 | } |
| 237 | 237 | // 执行查询 |
| 238 | 238 | List<ProcessDefinition> processDefinitions = definitionQuery.list(); |
| 239 | + if (CollUtil.isEmpty(processDefinitions)) { | |
| 240 | + return Collections.emptyList(); | |
| 241 | + } | |
| 239 | 242 | |
| 240 | 243 | // 获得 BpmProcessDefinitionDO Map |
| 241 | 244 | List<BpmProcessDefinitionExtDO> processDefinitionDOs = processDefinitionMapper.selectListByProcessDefinitionIds( | ... | ... |