Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
a2c9fc23
Commit
a2c9fc23
authored
Aug 05, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
4368eecb
c0567c93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+3
-11
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
a2c9fc23
...
@@ -205,7 +205,6 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -205,7 +205,6 @@ public class ApiFlowServiceImpl implements ApiFlowService {
List
<
Node
>
nodeList
=
nodeMapper
.
findOnforkByFlowId
(
flow
.
getFlowId
());
List
<
Node
>
nodeList
=
nodeMapper
.
findOnforkByFlowId
(
flow
.
getFlowId
());
//删除在调度上的节点的相关依赖
//删除在调度上的节点的相关依赖
nodeList
.
forEach
(
node
->
nodeDependencyMapper
.
deleteByNodeId
(
node
.
getNodeId
()));
nodeList
.
forEach
(
node
->
nodeDependencyMapper
.
deleteByNodeId
(
node
.
getNodeId
()));
nodeMapper
.
updateOnforkDown
(
flow
.
getFlowId
());
//查找并删除工作流下的虚节点
//查找并删除工作流下的虚节点
List
<
Node
>
virtualNodeList
=
nodeMapper
.
findVirtualByFlowId
(
flow
.
getFlowId
());
List
<
Node
>
virtualNodeList
=
nodeMapper
.
findVirtualByFlowId
(
flow
.
getFlowId
());
...
@@ -220,23 +219,16 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -220,23 +219,16 @@ public class ApiFlowServiceImpl implements ApiFlowService {
flowMapper
.
updateByIdSelective
(
virtualFlow
);
flowMapper
.
updateByIdSelective
(
virtualFlow
);
}
}
}
}
//删除工作流下
虚拟
的节点
//删除工作流下
所有
的节点
nodeMapper
.
delete
VirtualNode
(
flow
.
getFlowId
());
nodeMapper
.
delete
ByFlowId
(
flow
.
getFlowId
());
//重新组建节点和依赖关系
//重新组建节点和依赖关系
HashMap
<
String
,
Integer
>
nameIdRel
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
nameIdRel
=
new
HashMap
<>();
//保存节点信息
//保存节点信息
for
(
PluginBaseNode
pluginNode
:
pluginNodeList
){
for
(
PluginBaseNode
pluginNode
:
pluginNodeList
){
//查询这个节点是否存在 存在就修改节点 不存在就新建节点
Node
node
=
new
Node
();
Node
node
=
nodeMapper
.
getByNameAndFlow
(
pluginNode
.
getName
(),
flow
.
getFlowId
());
if
(
null
==
node
){
node
=
new
Node
();
buildNode
(
pluginNode
,
flow
,
node
);
buildNode
(
pluginNode
,
flow
,
node
);
Integer
nodeId
=
nodeMapper
.
insertSelective
(
node
);
Integer
nodeId
=
nodeMapper
.
insertSelective
(
node
);
}
else
{
buildNode
(
pluginNode
,
flow
,
node
);
nodeMapper
.
updateByIdSelective
(
node
);
}
nameIdRel
.
put
(
node
.
getNodeName
(),
node
.
getNodeId
());
nameIdRel
.
put
(
node
.
getNodeName
(),
node
.
getNodeId
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment