From 1556c50459a9e0ea62941848cc2374e136006e8d Mon Sep 17 00:00:00 2001 From: smallchill Date: Thu, 2 May 2019 15:47:22 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/{tool => utils}/CommonUtil.java | 2 +- .../engine/config/FlowableConfiguration.java | 9 -------- .../controller/FlowManagerController.java | 22 ------------------- .../flow/engine/service/FlowService.java | 12 ---------- .../engine/service/impl/FlowServiceImpl.java | 17 -------------- 5 files changed, 1 insertion(+), 61 deletions(-) rename blade-common/src/main/java/org/springblade/common/{tool => utils}/CommonUtil.java (95%) diff --git a/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java b/blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java similarity index 95% rename from blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java rename to blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java index db3a2e2f..c424bc8c 100644 --- a/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java +++ b/blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java @@ -14,7 +14,7 @@ * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ -package org.springblade.common.tool; +package org.springblade.common.utils; /** * 通用工具类 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java index e075f107..1bc6d72a 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java @@ -20,9 +20,7 @@ import lombok.AllArgsConstructor; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.flowable.spring.boot.FlowableProperties; -import org.springblade.core.secure.registry.SecureRegistry; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** @@ -43,11 +41,4 @@ public class FlowableConfiguration implements EngineConfigurationConfigurer { * @return */ boolean deleteDeployment(String deploymentIds); - - /** - * 资源展示 - * - * @param processId 流程ID - * @param instanceId 流程实例ID - * @param resourceType 资源类型(xml|image) - * @return - */ - InputStream resource(String processId, String instanceId, String resourceType); - /** * 上传部署流程 * diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java index 40d53cae..ab525c59 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java @@ -44,7 +44,6 @@ import org.flowable.engine.task.Comment; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.StringPool; import org.springblade.core.tool.utils.StringUtil; import org.springblade.flow.core.entity.BladeFlow; import org.springblade.flow.core.utils.TaskUtil; @@ -244,22 +243,6 @@ public class FlowServiceImpl extends ServiceImpl implemen return true; } - @Override - public InputStream resource(String processId, String instanceId, String resourceType) { - if (StringUtils.isBlank(processId)) { - ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(instanceId).singleResult(); - processId = processInstance.getProcessDefinitionId(); - } - ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processId).singleResult(); - String resourceName = StringPool.EMPTY; - if (resourceType.equals(IMAGE_NAME)) { - resourceName = processDefinition.getDiagramResourceName(); - } else if (resourceType.equals(XML_NAME)) { - resourceName = processDefinition.getResourceName(); - } - return repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), resourceName); - } - @Override public boolean deployUpload(List files, String category) { files.forEach(file -> {