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
6c07e60b
Commit
6c07e60b
authored
May 20, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加运行实例过滤条件 过滤立即运行状态的实例
parent
a2df52fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+27
-23
No files found.
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
6c07e60b
...
@@ -38,15 +38,13 @@
...
@@ -38,15 +38,13 @@
<select
id=
"findAll"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
<select
id=
"findAll"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording where schedule_type != 4
<trim
prefix=
"WHERE"
prefixOverrides=
"AND |OR"
>
<if
test=
"workspaceId != null"
>
<if
test=
"workspaceId != null"
>
and workspace_id = #{workspaceId,jdbcType=INTEGER}
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"flowName != null and flowName != ''"
>
<if
test=
"flowName != null and flowName != ''"
>
and flow_name = #{flowName,jdbcType=VARCHAR}
and flow_name = #{flowName,jdbcType=VARCHAR}
</if>
</if>
</trim>
</select>
</select>
<select
id=
"findAllError"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
<select
id=
"findAllError"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
...
@@ -54,7 +52,7 @@
...
@@ -54,7 +52,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where (flow_run_result = '2' or flow_run_result = '4'
where (flow_run_result = '2' or flow_run_result = '4'
or flow_run_result = '5')
or flow_run_result = '5')
and schedule_type != 4
<if
test=
"workspaceId != null"
>
<if
test=
"workspaceId != null"
>
and workspace_id = #{workspaceId,jdbcType=INTEGER}
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
</if>
...
@@ -69,6 +67,7 @@
...
@@ -69,6 +67,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where (flow_status = '2' or flow_status = '3')
where (flow_status = '2' or flow_status = '3')
and schedule_type != 4
<if
test=
"workspaceId != null"
>
<if
test=
"workspaceId != null"
>
AND workspace_id = #{workspaceId,jdbcType=INTEGER}
AND workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
</if>
...
@@ -82,41 +81,41 @@
...
@@ -82,41 +81,41 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_status ='4' and is_alarm = '1'
where flow_status ='4' and is_alarm = '1'
and schedule_type != 4
</select>
</select>
<select
id=
"findAllByRunID"
resultMap=
"BaseResultMap"
>
<select
id=
"findAllByRunID"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where run_id=#{runId,jdbcType=VARCHAR} and is_inner = '1'
where run_id=#{runId,jdbcType=VARCHAR} and is_inner = '1'
and schedule_type != 4
</select>
</select>
<!--查询运行中的-->
<!--查询运行中的-->
<select
id=
"findRunningRunRecording"
resultMap=
"BaseResultMap"
>
<select
id=
"findRunningRunRecording"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_status = '2'
where flow_status = '2'
and schedule_type != 4
</select>
</select>
<select
id=
"findRunRecordingByFlowId"
resultMap=
"BaseResultMap"
>
<select
id=
"findRunRecordingByFlowId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording where flow_id = #{flowId,jdbcType=INTEGER}
from run_recording where flow_id = #{flowId,jdbcType=INTEGER}
and schedule_type != 4
</select>
</select>
<select
id=
"findRunRecordingByFlowIdAndRunId"
resultMap=
"BaseResultMap"
>
<select
id=
"findRunRecordingByFlowIdAndRunId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_id = #{flowId,jdbcType=INTEGER}
where run_id = #{runId,jdbcType=VARCHAR} and flow_id = #{flowId,jdbcType=INTEGER}
and schedule_type != 4
</select>
</select>
<select
id=
"findRunRecordingById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"findRunRecordingById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where recording_id = #{recordingId,jdbcType=INTEGER}
where recording_id = #{recordingId,jdbcType=INTEGER}
and schedule_type != 4
</select>
</select>
<select
id=
"findOnScheduleByFlowId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"findOnScheduleByFlowId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
...
@@ -124,7 +123,7 @@
...
@@ -124,7 +123,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId,jdbcType=INTEGER}
where flow_id = #{flowId,jdbcType=INTEGER}
and flow_status not in ('1','4')
and flow_status not in ('1','4')
and schedule_type != 4
</select>
</select>
<select
id=
"findUnStartByFlowId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"findUnStartByFlowId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
...
@@ -132,7 +131,7 @@
...
@@ -132,7 +131,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId,jdbcType=INTEGER}
where flow_id = #{flowId,jdbcType=INTEGER}
and flow_status = '1'
and flow_status = '1'
and schedule_type != 4
</select>
</select>
<select
id=
"findStopRunCordByRunId"
parameterType=
"string"
resultMap=
"BaseResultMap"
>
<select
id=
"findStopRunCordByRunId"
parameterType=
"string"
resultMap=
"BaseResultMap"
>
...
@@ -140,7 +139,7 @@
...
@@ -140,7 +139,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 flow_status = '3'
and schedule_type != 4
</select>
</select>
<select
id=
"findUnFinishByRunId"
resultMap=
"BaseResultMap"
>
<select
id=
"findUnFinishByRunId"
resultMap=
"BaseResultMap"
>
...
@@ -148,7 +147,7 @@
...
@@ -148,7 +147,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 != '4'
and flow_status != '4'
and schedule_type != 4
<if
test=
"flowIdList != null"
>
<if
test=
"flowIdList != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
...
@@ -163,6 +162,7 @@
...
@@ -163,6 +162,7 @@
from run_recording
from run_recording
where trigger_time
>
= #{startDate}
where trigger_time
>
= #{startDate}
and trigger_time
<
= #{endDate}
and trigger_time
<
= #{endDate}
and schedule_type != 4
<if
test=
"flowIds != null"
>
<if
test=
"flowIds != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIds"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIds"
item=
"flowId"
separator=
","
>
...
@@ -192,14 +192,14 @@
...
@@ -192,14 +192,14 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
and schedule_type != 4
</select>
</select>
<select
id=
"findUnFinishByFlowId"
resultMap=
"BaseResultMap"
>
<select
id=
"findUnFinishByFlowId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId}
where flow_id = #{flowId}
and flow_status != '4'
and flow_status != '4'
and schedule_type != 4
</select>
</select>
<select
id=
"findStatusByStartAndEndTime"
resultType=
"com.byit.dto.plugin.StatisticData"
useCache=
"false"
flushCache=
"true"
>
<select
id=
"findStatusByStartAndEndTime"
resultType=
"com.byit.dto.plugin.StatisticData"
useCache=
"false"
flushCache=
"true"
>
select sum(case when flow_status = '1' then 1 else 0 end ) unstart,
select sum(case when flow_status = '1' then 1 else 0 end ) unstart,
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
from run_recording
from run_recording
where (end_time
<
= #{endTime} or start_time
<
= #{endTime})
where (end_time
<
= #{endTime} or start_time
<
= #{endTime})
and start_time
>
= #{startTime}
and start_time
>
= #{startTime}
and schedule_type != 4
<if
test=
"flowIdList != null"
>
<if
test=
"flowIdList != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
...
@@ -223,6 +223,7 @@
...
@@ -223,6 +223,7 @@
select
<include
refid=
"Base_Column_List"
/>
select
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId}
where flow_id = #{flowId}
and schedule_type != 4
and start_time = (select max(start_time)
and start_time = (select max(start_time)
from run_recording
from run_recording
where flow_id = #{flowId}
where flow_id = #{flowId}
...
@@ -233,6 +234,7 @@
...
@@ -233,6 +234,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId}
where flow_id = #{flowId}
and schedule_type != 4
and (
and (
start_time
>
= #{preHourDate}
start_time
>
= #{preHourDate}
or end_time
>
= #{preHourDate}
or end_time
>
= #{preHourDate}
...
@@ -245,6 +247,7 @@
...
@@ -245,6 +247,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where flow_id = #{flowId}
where flow_id = #{flowId}
and schedule_type != 4
and trigger_time = (
and trigger_time = (
select max(trigger_time)
select max(trigger_time)
from run_recording
from run_recording
...
@@ -258,6 +261,7 @@
...
@@ -258,6 +261,7 @@
from run_recording
from run_recording
where start_time
>
= #{startTime}
where start_time
>
= #{startTime}
and start_time
<
= #{endTime}
and start_time
<
= #{endTime}
and schedule_type != 4
<if
test=
"flowIdList != null"
>
<if
test=
"flowIdList != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
...
...
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