fix(测试计划): 修复执行历史列表问题

This commit is contained in:
song-cc-rock 2024-06-15 14:56:48 +08:00 committed by Craftsman
parent 2e206e0755
commit 36504c28cc
2 changed files with 10 additions and 4 deletions

View File

@ -12,6 +12,8 @@ public class TestPlanExecuteHisDTO {
private String num; private String num;
@Schema(description = "执行方式") @Schema(description = "执行方式")
private String triggerMode; private String triggerMode;
@Schema(description = "执行状态")
private String execStatus;
@Schema(description = "执行结果") @Schema(description = "执行结果")
private String execResult; private String execResult;
@Schema(description = "操作人") @Schema(description = "操作人")

View File

@ -465,7 +465,7 @@
</select> </select>
<select id="listHis" resultType="io.metersphere.plan.dto.TestPlanExecuteHisDTO"> <select id="listHis" resultType="io.metersphere.plan.dto.TestPlanExecuteHisDTO">
select tpr.id, from_unixtime(tpr.create_time / 1000, '%Y%m%d%H%i%s') as num, tpr.trigger_mode triggerMode, tpr.exec_status execStatus, select tpr.id, from_unixtime(tpr.create_time / 1000, '%Y%m%d%H%i%s') as num, tpr.trigger_mode triggerMode, tpr.exec_status execStatus, tpr.result_status execResult,
tpr.create_user operationUser, tpr.start_time startTime, tpr.end_time endTime, tpr.deleted deleted from test_plan_report tpr tpr.create_user operationUser, tpr.start_time startTime, tpr.end_time endTime, tpr.deleted deleted from test_plan_report tpr
where tpr.test_plan_id = #{request.testPlanId} where tpr.test_plan_id = #{request.testPlanId}
<include refid="filter"/> <include refid="filter"/>
@ -513,9 +513,13 @@
<foreach collection="request.filter.entrySet()" index="key" item="values"> <foreach collection="request.filter.entrySet()" index="key" item="values">
<if test="values != null and values.size() > 0"> <if test="values != null and values.size() > 0">
<choose> <choose>
<!-- 执行状态 --> <when test="key == 'triggerMode'">
<when test="key == 'execStatus'"> and tpr.trigger_mode in
and tpr.exec_status in <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
</when>
<!-- 执行结果 -->
<when test="key == 'execResult'">
and tpr.result_status in
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/> <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
</when> </when>
</choose> </choose>