Commit 53d06260 by guominglei

修改引用报错

parent 54fec14a
......@@ -33,6 +33,17 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://10.0.120.2/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://10.0.120.2/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
......
......@@ -25,17 +25,10 @@ public class ApiFlowController {
@Resource
private ApiFlowService apiFlowService;
@PostMapping("add")
@ApiOperation("新建工作流,默认开始调度")
public String addFlow(@RequestBody PluginFlow flow){
apiFlowService.addFlow(flow);
return "SUCCESS";
}
@PostMapping("update")
@ApiOperation("更新工作流,默认开始调度")
public String updateFlow(@RequestBody PluginFlow flow){
apiFlowService.updateFlow(flow);
@PostMapping("publish")
@ApiOperation("发布工作流,并开始调度")
public String publishFlow(@RequestBody PluginFlow flow){
apiFlowService.publishFlow(flow);
return "SUCCESS";
}
......
......@@ -10,10 +10,6 @@ import com.byit.job.dto.plugin.PluginFlowDepend;
*/
public interface ApiFlowService {
void addFlow(PluginFlow flow);
void updateFlow(PluginFlow flow);
void deleteFlow(String flowName);
void addDepend(String flowName, String dependFlowName, String workspaceName);
......@@ -31,4 +27,6 @@ public interface ApiFlowService {
String stopSchedule(String flowName, String workspaceName);
void reStartSchedule(String runId);
void publishFlow(PluginFlow flow);
}
......@@ -26,12 +26,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
private WorkspaceMapper workspaceMapper;
@Override
public void addFlow(PluginFlow flow) {
}
@Override
public void updateFlow(PluginFlow flow) {
public void publishFlow(PluginFlow flow) {
}
......@@ -79,4 +74,5 @@ public class ApiFlowServiceImpl implements ApiFlowService {
public void reStartSchedule(String runId) {
}
}
......@@ -13,4 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional(rollbackFor = Exception.class)
public class ApiWorkspaceServiceImpl implements ApiWorkspaceService {
@Override
public void add(String workspaceName) {
}
}
/*
package com.byit.service.impl;
import com.byit.enums.FlowPropertyEnum;
import com.byit.enums.NodePropertyEnum;
import com.byit.job.utils.CronExpression;
import com.byit.mapper.FlowDependentMapper;
import com.byit.mapper.FlowMapper;
import com.byit.mapper.NodeDependencyMapper;
import com.byit.mapper.NodeMapper;
......@@ -26,16 +24,16 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
*/
/**
* @description: 工作流业务逻辑实现类
* @author: gml
* @create: 2019-12-23 17:33
*//*
*/
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class)
public class FlowServiceImpl implements FlowService {
@Resource
......@@ -43,8 +41,6 @@ public class FlowServiceImpl implements FlowService {
@Resource
private NodeMapper nodeMapper;
@Resource
private FlowDependentMapper flowDependentMapper;
@Resource
private NodeDependencyMapper nodeDependencyMapper;
@Override
......@@ -53,7 +49,7 @@ public class FlowServiceImpl implements FlowService {
//设置在工作流上的节点相关信息
List<NodeVo> nodeVoList = flowVo.getNodeVoList();
if (null != nodeVoList && nodeVoList.size() > 0){
if (null != nodeVoList && nodeVoList.size() > 0) {
//设置在工作流上的节点数目
log.info("将【{}】个节点在工作流【{}】调度流程中", nodeVoList.size(), flowVo.getFlowName());
//重新组织节点的依赖和调度关系
......@@ -77,12 +73,11 @@ public class FlowServiceImpl implements FlowService {
return flow;
}
*/
/**
/**
* 重新组织节点的依赖和调度关系
* @param flowVo
* @param nodeVoList
*//*
*/
private void reNodeDepend(FlowVo flowVo, List<NodeVo> nodeVoList) {
......@@ -128,40 +123,40 @@ public class FlowServiceImpl implements FlowService {
}
*/
/**
/**
* 重新组织工作流的依赖关系
*
* @param flowVo
*//*
*/
private void reFlowDepend(FlowVo flowVo) {
//先去除所有的工作流依赖
List<FlowDependentKey> flowDependentKeyList = flowDependentMapper.findByFlowId(flowVo.getFlowId());
//解除跟上游工作流的绑定
log.info("将【{}】工作流上游工作流设置为没有下游工作流", flowVo.getFlowName());
for (FlowDependentKey flowDependentKey: flowDependentKeyList) {
Flow flow = flowMapper.getById(flowDependentKey.getDependFlowId());
flow.setIsHaveDepend(FlowPropertyEnum.NO_HAVE_DEPEND.getCode());
flowMapper.updateByIdSelective(flow);
}
log.info("删除【{}】工作流的依赖关系", flowVo.getFlowName());
flowDependentMapper.deleteByFlowId(flowVo.getFlowId());
log.info("开始建立【{}】工作流的依赖关系,并将上游工作流设置为拥有下游工作流", flowVo.getFlowName());
//判断是否有工作流依赖
if (null != flowVo.getFlowDepend() && flowVo.getFlowDepend().size() > 0){
List<Integer> flowDependList = flowVo.getFlowDepend();
for (Integer flowDependId : flowDependList){
Flow flow = flowMapper.getById(flowDependId);
flow.setIsHaveDepend(FlowPropertyEnum.HAVE_DEPEND.getCode());
flowMapper.updateByIdSelective(flow);
flowDependentMapper.insert(flowVo.getFlowId(), flowDependId);
}
flowVo.setIsTop(FlowPropertyEnum.ISNOT_TOP.getCode());
}else {
flowVo.setIsTop(FlowPropertyEnum.IS_TOP.getCode());
}
// //先去除所有的工作流依赖
// List<FlowDependentKey> flowDependentKeyList = flowDependentMapper.findByFlowId(flowVo.getFlowId());
// //解除跟上游工作流的绑定
// log.info("将【{}】工作流上游工作流设置为没有下游工作流", flowVo.getFlowName());
// for (FlowDependentKey flowDependentKey: flowDependentKeyList) {
// Flow flow = flowMapper.getById(flowDependentKey.getDependFlowId());
// flow.setIsHaveDepend(FlowPropertyEnum.NO_HAVE_DEPEND.getCode());
// flowMapper.updateByIdSelective(flow);
// }
// log.info("删除【{}】工作流的依赖关系", flowVo.getFlowName());
// flowDependentMapper.deleteByFlowId(flowVo.getFlowId());
//
// log.info("开始建立【{}】工作流的依赖关系,并将上游工作流设置为拥有下游工作流", flowVo.getFlowName());
// //判断是否有工作流依赖
// if (null != flowVo.getFlowDepend() && flowVo.getFlowDepend().size() > 0){
// List<Integer> flowDependList = flowVo.getFlowDepend();
// for (Integer flowDependId : flowDependList){
// Flow flow = flowMapper.getById(flowDependId);
// flowMapper.updateByIdSelective(flow);
// flowDependentMapper.insert(flowVo.getFlowId(), flowDependId);
// }
// flowVo.setIsTop(FlowPropertyEnum.ISNOT_TOP.getCode());
// }else {
// flowVo.setIsTop(FlowPropertyEnum.IS_TOP.getCode());
// }
}
......@@ -259,7 +254,8 @@ public class FlowServiceImpl implements FlowService {
/**
* 判断是否可以包含这个工作流
* @param flowVo 当前工作流
*
* @param flowVo 当前工作流
* @param nodeVo
* @return
*/
......@@ -286,5 +282,4 @@ public class FlowServiceImpl implements FlowService {
flowMapper.updateByIdSelective(virtualFlow);
return null;
}
}
*/
}
\ No newline at end of file
......@@ -181,4 +181,16 @@
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://10.0.120.2/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://10.0.120.2/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment