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
d2dde326
Commit
d2dde326
authored
Dec 16, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本校验
parent
1e4e0007
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+6
-2
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
d2dde326
...
...
@@ -187,9 +187,14 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//设置超时时间,未设置默认5天
flow
.
setFlowTimeout
(
null
==
pluginFlow
.
getConfig
().
getFlowTimeout
()
?
TimeUnit
.
DAYS
.
toMillis
(
5
)
:
pluginFlow
.
getConfig
().
getFlowTimeout
());
Flow
oldFlow
=
flowMapper
.
getByWorkSpaceAndName
(
workspaceId
,
pluginFlow
.
getName
());
String
versionName
=
pluginFlow
.
getVersionName
();
if
(
StringUtils
.
isNoneBlank
(
versionName
))
{
FlowVersion
byWorkSpaceAndName
=
flowVersionMapper
.
getByWorkSpaceAndName
(
workspaceId
,
flow
.
getFlowName
(),
versionName
);
ValidationUtil
.
isTrueValidation
(
byWorkSpaceAndName
!=
null
,
"该工作流版本已经存在,请联系调度团队!"
);
}
//判断是否是重发
if
((
pluginFlow
.
isRePublish
()
&&
!
isInnner
)
||
(
isInnner
&&
null
!=
oldFlow
))
{
String
versionName
=
pluginFlow
.
getVersionName
();
flow
.
setFlowId
(
oldFlow
.
getFlowId
());
//当版本号不存在
if
(
StringUtils
.
isBlank
(
versionName
))
{
...
...
@@ -204,7 +209,6 @@ public class ApiFlowServiceImpl implements ApiFlowService {
updateNodeByFlow
(
pluginFlow
.
getNodeList
(),
flow
,
upFlowName
);
}
else
{
String
versionName
=
pluginFlow
.
getVersionName
();
if
(
StringUtils
.
isBlank
(
versionName
))
{
flow
.
setVersionName
(
JobVersionGenUtil
.
generateVersionName
(
1
));
}
else
{
...
...
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