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
03ae12a3
Commit
03ae12a3
authored
Dec 15, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重跑增加操作人
parent
e28c900e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
7 deletions
+14
-7
ApiFlowController.java
...h-admin/src/main/java/com/byit/api/ApiFlowController.java
+2
-2
ApiFlowService.java
...-admin/src/main/java/com/byit/service/ApiFlowService.java
+2
-1
ApiFlowOperatingServiceImpl.java
...va/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
+1
-0
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+4
-3
RunInfo.java
...h-dto-core/src/main/java/com/byit/dto/plugin/RunInfo.java
+4
-0
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+1
-1
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiFlowController.java
View file @
03ae12a3
...
@@ -2,6 +2,7 @@ package com.byit.api;
...
@@ -2,6 +2,7 @@ package com.byit.api;
import
com.byit.dto.executor.KillDto
;
import
com.byit.dto.executor.KillDto
;
import
com.byit.dto.plugin.CollectData
;
import
com.byit.dto.plugin.CollectData
;
import
com.byit.dto.plugin.RunInfo
;
import
com.byit.dto.plugin.StopFlowParam
;
import
com.byit.dto.plugin.StopFlowParam
;
import
com.byit.dto.recording.LoadScheduleCondition
;
import
com.byit.dto.recording.LoadScheduleCondition
;
import
com.byit.dto.specials.RepairFlow
;
import
com.byit.dto.specials.RepairFlow
;
...
@@ -122,9 +123,8 @@ public class ApiFlowController {
...
@@ -122,9 +123,8 @@ public class ApiFlowController {
@PostMapping
(
"reRunFlow"
)
@PostMapping
(
"reRunFlow"
)
@ApiOperation
(
"重跑工作流"
)
@ApiOperation
(
"重跑工作流"
)
public
ResponseResult
reRunFlow
(
String
param
)
{
public
void
reRunFlow
(
@RequestBody
RunInfo
param
)
{
apiFlowService
.
reRunFlow
(
param
);
apiFlowService
.
reRunFlow
(
param
);
return
ResponseResult
.
ok
(
"SUCCESS"
);
}
}
@PostMapping
(
"madeSuccess"
)
@PostMapping
(
"madeSuccess"
)
...
...
byit-myth-admin/src/main/java/com/byit/service/ApiFlowService.java
View file @
03ae12a3
...
@@ -2,6 +2,7 @@ package com.byit.service;
...
@@ -2,6 +2,7 @@ package com.byit.service;
import
com.byit.dto.plugin.CollectData
;
import
com.byit.dto.plugin.CollectData
;
import
com.byit.dto.plugin.PluginFlow
;
import
com.byit.dto.plugin.PluginFlow
;
import
com.byit.dto.plugin.RunInfo
;
import
com.byit.dto.plugin.StopFlowParam
;
import
com.byit.dto.plugin.StopFlowParam
;
import
com.byit.dto.recording.LoadScheduleCondition
;
import
com.byit.dto.recording.LoadScheduleCondition
;
import
com.byit.dto.specials.RepairFlow
;
import
com.byit.dto.specials.RepairFlow
;
...
@@ -60,7 +61,7 @@ public interface ApiFlowService {
...
@@ -60,7 +61,7 @@ public interface ApiFlowService {
* 重跑工作流
* 重跑工作流
* @param param
* @param param
*/
*/
void
reRunFlow
(
String
param
);
void
reRunFlow
(
RunInfo
param
);
/**
/**
* 加载运行记录
* 加载运行记录
...
...
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
View file @
03ae12a3
...
@@ -303,6 +303,7 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
...
@@ -303,6 +303,7 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
if
(
order
==
null
)
{
if
(
order
==
null
)
{
order
=
0
;
order
=
0
;
}
}
//传递过来的公共参数格式化
Map
<
String
,
String
>
publicMap
=
JSON
.
parseObject
(
publicParam
,
Map
.
class
);
Map
<
String
,
String
>
publicMap
=
JSON
.
parseObject
(
publicParam
,
Map
.
class
);
if
(
CollectionUtil
.
isEmpty
(
publicMap
)){
if
(
CollectionUtil
.
isEmpty
(
publicMap
)){
publicMap
=
new
HashMap
<>(
8
);
publicMap
=
new
HashMap
<>(
8
);
...
...
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
03ae12a3
...
@@ -641,9 +641,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -641,9 +641,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
@Override
@Override
public
void
reRunFlow
(
String
param
)
{
public
void
reRunFlow
(
RunInfo
runInfo
)
{
ValidationUtil
.
dataNot
Bank
(
param
,
"请求参数不允许为空!"
);
ValidationUtil
.
dataNot
Null
(
runInfo
,
"请求参数不允许为空!"
);
RunInfo
runInfo
=
JSON
.
parseObject
(
param
,
RunInfo
.
class
);
//获取工作空间名称
//获取工作空间名称
ValidationUtil
.
dataNotBank
(
runInfo
.
getWorkspaceName
(),
"工作空间名称不允许为空!"
);
ValidationUtil
.
dataNotBank
(
runInfo
.
getWorkspaceName
(),
"工作空间名称不允许为空!"
);
//获取工作流名称
//获取工作流名称
...
@@ -677,6 +677,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -677,6 +677,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
//生成新的实例
//生成新的实例
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
jobTaskRunLogList
.
size
(),
userName
);
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
jobTaskRunLogList
.
size
(),
userName
);
newRunRecording
.
setOperator
(
runInfo
.
getOperator
());
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
if
(
order
==
null
)
{
if
(
order
==
null
)
{
...
...
byit-myth-core/myth-dto-core/src/main/java/com/byit/dto/plugin/RunInfo.java
View file @
03ae12a3
...
@@ -35,4 +35,8 @@ public class RunInfo {
...
@@ -35,4 +35,8 @@ public class RunInfo {
* 节点名称 重跑节点和手动置为成功时需要
* 节点名称 重跑节点和手动置为成功时需要
*/
*/
private
String
nodeName
;
private
String
nodeName
;
/**
* 操作人
*/
private
String
operator
;
}
}
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
03ae12a3
...
@@ -550,7 +550,7 @@ public class JobUtils {
...
@@ -550,7 +550,7 @@ public class JobUtils {
*/
*/
public
static
ResponseResult
reRunFlow
(
RunInfo
runInfo
)
{
public
static
ResponseResult
reRunFlow
(
RunInfo
runInfo
)
{
//发送请求 添加任务
//发送请求 添加任务
String
response
=
createHttpRequest
(
REQUEST_FLOW_RERUNFLOW
,
"param="
+
JSON
.
toJSONString
(
runInfo
,
WriteClassName
));
String
response
=
createHttpRequest
(
REQUEST_FLOW_RERUNFLOW
,
JSON
.
toJSONString
(
runInfo
,
WriteClassName
));
log
.
debug
(
"--------------------重跑节点接口调用成功,结果为:{}------------------------"
,
response
);
log
.
debug
(
"--------------------重跑节点接口调用成功,结果为:{}------------------------"
,
response
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
}
}
...
...
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