流程模型删除错误问题
无流程模型查询报错问题
This commit is contained in:
cks 2022-04-06 11:40:45 +08:00
parent d60be0bb53
commit 00d9645673
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.bpm.dal.mysql.definition; 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.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -11,7 +12,8 @@ import java.util.List;
public interface BpmProcessDefinitionExtMapper extends BaseMapperX<BpmProcessDefinitionExtDO> { public interface BpmProcessDefinitionExtMapper extends BaseMapperX<BpmProcessDefinitionExtDO> {
default List<BpmProcessDefinitionExtDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) { default List<BpmProcessDefinitionExtDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
return selectList("process_definition_id", processDefinitionIds); return selectList(new LambdaQueryWrapperX<BpmProcessDefinitionExtDO>()
.inIfPresent(BpmProcessDefinitionExtDO::getProcessDefinitionId,processDefinitionIds));
} }
default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) { default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) {

View File

@ -215,6 +215,9 @@ public class BpmModelServiceImpl implements BpmModelService {
if (oldDefinition == null) { if (oldDefinition == null) {
return; return;
} }
if(oldDefinition.isSuspended()){
return;
}
processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode()); processDefinitionService.updateProcessDefinitionState(oldDefinition.getId(), SuspensionState.SUSPENDED.getStateCode());
} }