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
093cc9ca
Commit
093cc9ca
authored
Mar 05, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取运行日志修改
parent
a606b7a5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
14 deletions
+57
-14
ApiFlowController.java
...h-admin/src/main/java/com/byit/api/ApiFlowController.java
+15
-2
ApiFlowService.java
...-admin/src/main/java/com/byit/service/ApiFlowService.java
+9
-1
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+17
-11
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+9
-0
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+7
-0
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiFlowController.java
View file @
093cc9ca
package
com
.
byit
.
api
;
import
com.byit.model.RunRecording
;
import
com.byit.model.vo.RunRecordingVo
;
import
com.byit.service.ApiFlowService
;
import
com.byit.service.FlowService
;
...
...
@@ -116,8 +117,20 @@ public class ApiFlowController {
*/
@PostMapping
(
"loadScheduleResult"
)
@ApiOperation
(
"加载运行记录"
)
public
List
<
RunRecordingVo
>
loadScheduleResult
(
String
param
){
List
<
RunRecordingVo
>
result
=
apiFlowService
.
loadScheduleResult
(
param
);
public
List
<
RunRecording
>
loadScheduleResult
(
String
param
){
List
<
RunRecording
>
result
=
apiFlowService
.
loadScheduleResult
(
param
);
return
result
;
}
/**
*
* @param param
* @return
*/
@PostMapping
(
"loadScheduleLog"
)
@ApiOperation
(
"加载运行日志"
)
public
RunRecordingVo
loadScheduleLog
(
String
param
){
RunRecordingVo
result
=
apiFlowService
.
loadScheduleLog
(
param
);
return
result
;
}
...
...
byit-myth-admin/src/main/java/com/byit/service/ApiFlowService.java
View file @
093cc9ca
package
com
.
byit
.
service
;
import
com.byit.job.dto.plugin.PluginFlow
;
import
com.byit.model.RunRecording
;
import
com.byit.model.vo.RunRecordingVo
;
import
java.text.ParseException
;
...
...
@@ -58,7 +59,7 @@ public interface ApiFlowService {
* @param param
* @return
*/
List
<
RunRecording
Vo
>
loadScheduleResult
(
String
param
);
List
<
RunRecording
>
loadScheduleResult
(
String
param
);
/**
* 补批
...
...
@@ -78,4 +79,11 @@ public interface ApiFlowService {
* @return
*/
String
getLogUrl
(
String
param
);
/**
* 加载运行日志
* @param param
* @return
*/
RunRecordingVo
loadScheduleLog
(
String
param
);
}
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
093cc9ca
...
...
@@ -593,7 +593,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
public
List
<
RunRecording
Vo
>
loadScheduleResult
(
String
param
){
public
List
<
RunRecording
>
loadScheduleResult
(
String
param
){
ValidationUtil
.
dataNotBank
(
param
,
"请求参数不允许为空!"
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
param
);
String
startTime
=
jsonObject
.
getString
(
"startTime"
);
...
...
@@ -634,20 +634,26 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findByStartAndEndTime
(
startDate
.
getTime
(),
endDate
.
getTime
(),
flowIds
);
if
(
runRecordList
!=
null
&&
runRecordList
.
size
()
>
0
){
List
<
RunRecordingVo
>
runRecordingVoList
=
new
ArrayList
<>();
runRecordList
.
forEach
(
runRecording
->
{
return
runRecordList
;
}
@Override
public
RunRecordingVo
loadScheduleLog
(
String
param
)
{
ValidationUtil
.
dataNotBank
(
param
,
"请求参数不允许为空!"
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
param
);
String
runId
=
jsonObject
.
getString
(
"runId0"
);
ValidationUtil
.
dataNotBank
(
runId
,
"运行实例不允许为空!"
);
String
flowName
=
jsonObject
.
getString
(
"flowName"
);
ValidationUtil
.
dataNotBank
(
flowName
,
"工作流名称不允许为空!"
);
RunRecording
runRecording
=
runRecordingMapper
.
findByRunIdAndFlowName
(
runId
,
flowName
);
ValidationUtil
.
dataNotNull
(
runRecording
,
"运行实例不存在!"
);
RunRecordingVo
runRecordingVo
=
new
RunRecordingVo
();
BeanUtils
.
copyProperties
(
runRecording
,
runRecordingVo
);
List
<
JobTaskRunLog
>
jobTaskRunLogList
=
jobTaskRunLogMapper
.
findByRunIdAndFlowName
(
runRecording
.
getRunId
(),
runRecording
.
getFlowName
()
);
List
<
JobTaskRunLog
>
jobTaskRunLogList
=
jobTaskRunLogMapper
.
findByRunIdAndFlowName
(
runRecording
.
getRunId
(),
flowName
);
runRecordingVo
.
setJobTaskRunLogList
(
jobTaskRunLogList
);
runRecordingVoList
.
add
(
runRecordingVo
);
});
return
runRecordingVoList
;
}
return
null
;
return
runRecordingVo
;
}
/**
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
093cc9ca
...
...
@@ -119,4 +119,12 @@ public interface RunRecordingMapper {
List
<
RunRecording
>
findUnFinishByRunId
(
String
runId
);
List
<
RunRecording
>
findByStartAndEndTime
(
@Param
(
"startDate"
)
long
startDate
,
@Param
(
"endDate"
)
long
endDate
,
@Param
(
"flowIds"
)
List
<
Integer
>
flowIds
);
/**
* 获取运行实例
* @param runId
* @param flowName
* @return
*/
RunRecording
findByRunIdAndFlowName
(
@Param
(
"runId"
)
String
runId
,
@Param
(
"flowName"
)
String
flowName
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
093cc9ca
...
...
@@ -97,6 +97,13 @@
</select>
<select
id=
"findByRunIdAndFlowName"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteById"
parameterType=
"java.lang.Integer"
>
<!-- generated @mbg.generated date: 2019-12-25 -->
delete from run_recording
...
...
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