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
72f267d1
Commit
72f267d1
authored
Oct 22, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂停BUG
parent
6b3ed7aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+10
-9
ScriptExecutorJobTask.java
...re/src/main/java/com/byit/task/ScriptExecutorJobTask.java
+13
-9
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+1
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
72f267d1
...
@@ -1699,18 +1699,19 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1699,18 +1699,19 @@ public class ApiFlowServiceImpl implements ApiFlowService {
return
;
return
;
}
}
RunRecording
mainRunRecording
=
runRecordList
.
stream
().
filter
(
runRecording
->
flowName
.
equals
(
runRecording
.
getFlowName
())).
findFirst
().
orElse
(
null
);
RunRecording
mainRunRecording
=
runRecordList
.
stream
().
filter
(
runRecording
->
flowName
.
equals
(
runRecording
.
getFlowName
())).
findFirst
().
orElse
(
null
);
Integer
stopCount
=
0
;
Integer
stopCount
;
if
(
mainRunRecording
!=
null
)
{
if
(
mainRunRecording
!=
null
)
{
stopCount
=
mainRunRecording
.
getStopCount
();
stopCount
=
mainRunRecording
.
getStopCount
();
stopCount
=
stopCount
-
1
;
if
(
stopCount
>
0
&&
"1"
.
equals
(
stopFlowParam
.
getAllStartFlow
()))
{
mainRunRecording
.
setStopCount
(
stopCount
);
runRecordingMapper
.
updateRunRecordingById
(
mainRunRecording
);
}
else
{
runRecordingMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
jobTaskMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
}
}
}
stopCount
=
stopCount
-
1
;
if
(
stopCount
!=
null
&&
stopCount
>
0
&&
"1"
.
equals
(
stopFlowParam
.
getAllStartFlow
()))
{
mainRunRecording
.
setStopCount
(
stopCount
);
runRecordingMapper
.
updateRunRecordingById
(
mainRunRecording
);
}
else
{
runRecordingMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
jobTaskMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
}
}
}
}
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/ScriptExecutorJobTask.java
View file @
72f267d1
...
@@ -100,18 +100,22 @@ public class ScriptExecutorJobTask implements TimerTask {
...
@@ -100,18 +100,22 @@ public class ScriptExecutorJobTask implements TimerTask {
if
(
ScheduleTypeEnum
.
NORMAL
.
getCode
().
equals
(
mythJobTaskSchedule
.
getScheduleType
())
if
(
ScheduleTypeEnum
.
NORMAL
.
getCode
().
equals
(
mythJobTaskSchedule
.
getScheduleType
())
||
ScheduleTypeEnum
.
REAL
.
getCode
().
equals
(
mythJobTaskSchedule
.
getScheduleType
()))
{
||
ScheduleTypeEnum
.
REAL
.
getCode
().
equals
(
mythJobTaskSchedule
.
getScheduleType
()))
{
privateParam
=
PlaceholderUtils
.
formatBizDateParam
(
privateParam
,
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
(),
1
);
privateParam
=
PlaceholderUtils
.
formatBizDateParam
(
privateParam
,
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
(),
1
);
ScriptParamAndPlaceholderDto
scriptParamAndPlaceholderDto
=
JSON
.
parseObject
(
privateParam
,
ScriptParamAndPlaceholderDto
.
class
);
Map
<
String
,
String
>
placeholder
=
scriptParamAndPlaceholderDto
.
getPlaceholder
();
if
(
StringUtils
.
isNoneBlank
(
privateParam
))
{
if
(
CollectionUtil
.
isNotEmpty
(
placeholder
))
{
ScriptParamAndPlaceholderDto
scriptParamAndPlaceholderDto
=
JSON
.
parseObject
(
privateParam
,
ScriptParamAndPlaceholderDto
.
class
);
if
(
placeholder
.
containsKey
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
())){
Map
<
String
,
String
>
placeholder
=
scriptParamAndPlaceholderDto
.
getPlaceholder
();
String
nowDateFormatName
=
placeholder
.
get
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
());
if
(
CollectionUtil
.
isNotEmpty
(
placeholder
))
{
String
dateFormat
=
DateUtil
.
dateFormat
(
new
Date
(),
nowDateFormatName
);
if
(
placeholder
.
containsKey
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
())){
privateParam
=
PlaceholderUtils
.
formatBizDateParam
(
privateParam
,
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
(),
dateFormat
,
0
);
String
nowDateFormatName
=
placeholder
.
get
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
());
String
dateFormat
=
DateUtil
.
dateFormat
(
new
Date
(),
nowDateFormatName
);
privateParam
=
PlaceholderUtils
.
formatBizDateParam
(
privateParam
,
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
(),
dateFormat
,
0
);
}
}
}
runParamWrapped
.
setPrivateParam
(
privateParam
);
mythJobTaskSchedule
.
setRunParam
(
JSON
.
toJSONString
(
runParamWrapped
));
}
}
runParamWrapped
.
setPrivateParam
(
privateParam
);
mythJobTaskSchedule
.
setRunParam
(
JSON
.
toJSONString
(
runParamWrapped
));
}
}
//获取到公有参数
//获取到公有参数
Map
<
String
,
String
>
publicParam
=
runParamWrapped
.
getPublicParamMap
();
Map
<
String
,
String
>
publicParam
=
runParamWrapped
.
getPublicParamMap
();
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
72f267d1
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where run_id = #{runId,jdbcType=VARCHAR}
where run_id = #{runId,jdbcType=VARCHAR}
and
flow_status = '3' and
schedule_type != 4
and schedule_type != 4
</select>
</select>
<select
id=
"findUnFinishByRunId"
resultMap=
"BaseResultMap"
>
<select
id=
"findUnFinishByRunId"
resultMap=
"BaseResultMap"
>
...
...
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