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
6fd09734
Commit
6fd09734
authored
Mar 31, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询运行实例接口改造
parent
c3f7d54b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
5 deletions
+97
-5
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+11
-1
application-local.yml
byit-myth-admin/src/main/resources/application-local.yml
+1
-1
ExecuteStatusEnum.java
...-core/src/main/java/com/byit/enums/ExecuteStatusEnum.java
+32
-0
ScheduleStatusEnum.java
...core/src/main/java/com/byit/enums/ScheduleStatusEnum.java
+30
-0
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+5
-1
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+15
-1
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+3
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
6fd09734
...
...
@@ -661,7 +661,17 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findByStartAndEndTime
(
startDate
.
getTime
(),
endDate
.
getTime
(),
flowIds
);
String
scheduleStatus
=
jsonObject
.
getString
(
"scheduleStatus"
);
List
<
String
>
scheduleStatusList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
scheduleStatus
)){
scheduleStatusList
=
Arrays
.
asList
(
scheduleStatus
.
split
(
","
));
}
String
executeStatus
=
jsonObject
.
getString
(
"executeStatus"
);
List
<
String
>
executeStatusList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
executeStatus
)){
executeStatusList
=
Arrays
.
asList
(
executeStatus
.
split
(
","
));
}
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findByStartAndEndTime
(
startDate
.
getTime
(),
endDate
.
getTime
(),
flowIds
,
scheduleStatusList
,
executeStatusList
);
return
runRecordList
;
}
...
...
byit-myth-admin/src/main/resources/application-local.yml
View file @
6fd09734
...
...
@@ -16,7 +16,7 @@ spring:
redis
:
database
:
0
host
:
10.0.120.2
1
8
host
:
10.0.120.2
0
8
port
:
6379
password
:
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/enums/ExecuteStatusEnum.java
0 → 100644
View file @
6fd09734
package
com
.
byit
.
enums
;
/**
* @Description
* @Author guo_m
* @Date 2020-03-31
*/
public
enum
ExecuteStatusEnum
{
UN_START
(
1
,
"未运行"
),
STARTING
(
2
,
"运行中"
),
FINISH
(
3
,
"暂停"
),
STOP
(
4
,
"完成"
),
;
private
Integer
code
;
private
String
msg
;
private
ExecuteStatusEnum
(
Integer
code
,
String
msg
){
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
(){
return
this
.
code
;
}
public
String
getMsg
(){
return
this
.
msg
;
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/enums/ScheduleStatusEnum.java
0 → 100644
View file @
6fd09734
package
com
.
byit
.
enums
;
/**
* @Description 调度状态
* @Author guo_m
* @Date 2020-03-31
*/
public
enum
ScheduleStatusEnum
{
SUCCESS
(
1
,
"成功"
),
FAIL
(
2
,
"失败"
),
REPAIR_SUCCESS
(
3
,
"补批成功"
),
REPAIR_FAIL
(
4
,
"补批失败"
),
KILL
(
5
,
"杀死"
)
;
private
Integer
code
;
private
String
msg
;
private
ScheduleStatusEnum
(
Integer
code
,
String
msg
){
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
(){
return
this
.
code
;
}
public
String
getMsg
(){
return
this
.
msg
;
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
6fd09734
...
...
@@ -137,7 +137,11 @@ public interface RunRecordingMapper {
*/
List
<
RunRecording
>
findUnFinishByRunId
(
String
runId
);
List
<
RunRecording
>
findByStartAndEndTime
(
@Param
(
"startDate"
)
long
startDate
,
@Param
(
"endDate"
)
long
endDate
,
@Param
(
"flowIds"
)
List
<
Integer
>
flowIds
);
List
<
RunRecording
>
findByStartAndEndTime
(
@Param
(
"startDate"
)
long
startDate
,
@Param
(
"endDate"
)
long
endDate
,
@Param
(
"flowIds"
)
List
<
Integer
>
flowIds
,
@Param
(
"scheduleStatusList"
)
List
<
String
>
scheduleStatusList
,
@Param
(
"executeStatusList"
)
List
<
String
>
executeStatusList
);
/**
* 获取运行实例
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
6fd09734
...
...
@@ -113,10 +113,24 @@
<if
test=
"flowIds != null"
>
and flow_id in (
<foreach
collection=
"flowIds"
item=
"flowId"
separator=
","
>
flowId
#{flowId}
</foreach>
)
</if>
<if
test=
"scheduleStatusList != null"
>
and flow_status in (
<foreach
collection=
"scheduleStatusList"
item=
"scheduleStatus"
separator=
","
>
${scheduleStatus}
</foreach>
)
</if>
<if
test=
"executeStatusList != null"
>
and flow_run_result in (
<foreach
collection=
"executeStatusList"
item=
"executeStatus"
separator=
","
>
${executeStatus}
</foreach>
)
</if>
order by start_time desc
</select>
...
...
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
6fd09734
...
...
@@ -312,12 +312,14 @@ public class JobUtils {
* @param flowName 工作流名称
* @return
*/
public
static
ResponseResult
loadScheduleResult
(
String
startTime
,
String
endTime
,
String
workspaceName
,
String
flowName
){
public
static
ResponseResult
loadScheduleResult
(
String
startTime
,
String
endTime
,
String
workspaceName
,
String
flowName
,
String
scheduleStatus
,
String
executeStatus
){
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"startTime"
,
startTime
);
param
.
put
(
"endTime"
,
endTime
);
param
.
put
(
"workspaceName"
,
workspaceName
);
param
.
put
(
"flowName"
,
flowName
);
param
.
put
(
"scheduleStatus"
,
scheduleStatus
);
param
.
put
(
"executeStatus"
,
executeStatus
);
String
response
=
createHttpRequest
(
REQUEST_LOADSCHEDULE
,
"param="
+
JSON
.
toJSONString
(
param
));
log
.
info
(
"--------------------获取运行实例接口调用成功,结果为:{}------------------------"
,
response
);
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