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
64a0bba8
Commit
64a0bba8
authored
Jan 08, 2021
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不是暂停的实例也能开始暂停
parent
6b7066b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+4
-7
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+1
-1
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 @
64a0bba8
...
@@ -1685,15 +1685,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1685,15 +1685,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
String
flowName
=
stopFlowParam
.
getFlowName
();
String
flowName
=
stopFlowParam
.
getFlowName
();
ValidationUtil
.
dataNotBank
(
flowName
,
"工作流名称不允许为空!"
);
ValidationUtil
.
dataNotBank
(
flowName
,
"工作流名称不允许为空!"
);
List
<
String
>
runIdList
=
Arrays
.
asList
(
runIds
.
split
(
","
)
);
String
[]
runIdList
=
runIds
.
split
(
","
);
for
(
String
runId
:
runIdList
)
{
for
(
String
runId
:
runIdList
)
{
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findStopRunCordByRunId
(
runId
);
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findStopRunCordByRunId
(
runId
,
flowName
);
ValidationUtil
.
isTrueValidation
(
CollectionUtil
.
isEmpty
(
runRecordList
),
"该工作流不是暂停状态!"
);
//ValidationUtil.isTrueValidation(CollectionUtil.isEmpty(runRecordList), "该工作流不是暂停状态!");
if
(
CollectionUtil
.
isEmpty
(
runRecordList
))
{
log
.
warn
(
"---------运行记录{},不存在暂停记录中!---"
,
runId
);
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
;
Integer
stopCount
;
if
(
mainRunRecording
!=
null
)
{
if
(
mainRunRecording
!=
null
)
{
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
64a0bba8
...
@@ -198,7 +198,7 @@ public interface RunRecordingMapper {
...
@@ -198,7 +198,7 @@ public interface RunRecordingMapper {
* @param runId
* @param runId
* @return
* @return
*/
*/
List
<
RunRecording
>
findStopRunCordByRunId
(
String
runId
);
List
<
RunRecording
>
findStopRunCordByRunId
(
@Param
(
"runId"
)
String
runId
,
@Param
(
"flowName"
)
String
flowName
);
/**
/**
* 根据runid和flowid杀死运行实例
* 根据runid和flowid杀死运行实例
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
64a0bba8
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
select
select
<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_name = #{flowName}
and schedule_type != 4
and schedule_type != 4
</select>
</select>
...
...
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