feat(任务中心): 场景消息查询修改

This commit is contained in:
fit2-zhao 2021-06-16 19:12:52 +08:00 committed by fit2-zhao
parent ea1ae44dd3
commit 555a70d745
3 changed files with 43 additions and 40 deletions

View File

@ -980,6 +980,7 @@ public class ApiAutomationService {
private void run(Map<APIScenarioReportResult, RunModeDataDTO> map, RunScenarioRequest request, String serialReportId) {
// 开始选择执行模式
if (map != null && map.size() > 0) {
ExecutorService executorService = Executors.newFixedThreadPool(map.size());
if (request.getConfig() != null && request.getConfig().getMode().equals(RunModeConstants.SERIAL.toString())) {
// 开始串行执行
@ -1024,6 +1025,7 @@ public class ApiAutomationService {
sqlSession.flushStatements();
}
}
}
/**
* 生成HashTree

View File

@ -4,14 +4,14 @@
<select id="getTasks" resultType="io.metersphere.task.dto.TaskCenterDTO"
parameterType="java.lang.String">
SELECT tt.* FROM (
(select t.id,t.name,'SCENARIO' as executionModule, ifnull(t2.name,'LOCAL') as actuator, t1.`name` as executor,t.create_time as executionTime, t.trigger_mode as triggerMode ,t.execute_type as executionStatus
(select t.id,t.name,'SCENARIO' as executionModule, ifnull(t2.name,'LOCAL') as actuator, t1.`name` as executor,t.create_time as executionTime, t.trigger_mode as triggerMode ,t.status as executionStatus
from api_scenario_report t left join `user` t1 ON t.user_id = t1.id left join test_resource_pool t2 on t.actuator = t2.id
where to_days(FROM_UNIXTIME(t.create_time/1000))= to_days(now()) and t.execute_type !='Debug' and t.project_id= #{request.projectId}
<if test="request.triggerMode != null and request.triggerMode != ''">
and t.trigger_mode = #{request.triggerMode}
</if>
<if test="request.executionStatus != null and request.executionStatus != ''">
and t.execute_type = #{request.executionStatus}
and t.status = #{request.executionStatus}
</if>
)
UNION ALL

View File

@ -6,8 +6,9 @@
text-color="#fff"
active-text-color="#fff">
<el-menu-item onselectstart="return false">
<font-awesome-icon class="icon global" :icon="['fas', 'flag']"/>
<span @click="showTaskCenter">{{ $t('commons.task_center') }}</span>
<el-tooltip :content="$t('commons.task_center')">
<font-awesome-icon class="icon global" :icon="['fas', 'flag']" @click="showTaskCenter"/>
</el-tooltip>
</el-menu-item>
</el-menu>