fix(接口定义): 修复case搜索执行结果失败的缺陷

--bug=1021812 --user=王孝刚 【接口测试】接口case列表,按执行结果搜索,搜索结果错误
https://www.tapd.cn/55049933/s/1325964
This commit is contained in:
wxg0103 2023-01-11 13:49:22 +08:00 committed by wxg0103
parent 128ef19b77
commit 9f5f813533
2 changed files with 6 additions and 5 deletions

View File

@ -230,7 +230,7 @@
</include>
</if>
<if test="${condition}.exec_result != null">
and (t1.status
and (t3.status
<choose>
<when test='${condition}.exec_result.operator == "in"'>
in
@ -238,7 +238,7 @@
#{v}
</foreach>
<if test="${condition}.exec_result.value.contains('') or ${condition}.exec_result.value.contains('PENDING')">
or t1.status is null or t1.status = ''
or t3.status is null or t3.status = ''
</if>
<if test="${condition}.exec_result != null">
)
@ -250,10 +250,10 @@
#{v}
</foreach>
<if test="${condition}.exec_result != null and (${condition}.exec_result.value.contains('') or ${condition}.exec_result.value.contains('PENDING'))">
and t1.status is not null and t1.status != ''
and t3.status is not null and t3.status != ''
</if>
<if test="${condition}.exec_result != null and !${condition}.exec_result.value.contains('PENDING')">
or t1.status is null or t1.status = ''
or t3.status is null or t3.status = ''
</if>
<if test="${condition}.exec_result != null">
)
@ -406,7 +406,7 @@
a.path,
a.protocol,
t1.tags,
t1.status AS execResult,
t3.status AS execResult,
t1.last_result_id AS lastResultId,
project.NAME AS project_name,
t1.delete_time,

View File

@ -253,6 +253,7 @@ public class TestResultService {
ApiTestCaseWithBLOBs apiTestCase = new ApiTestCaseWithBLOBs();
apiTestCase.setLastResultId(dto.getReportId());
apiTestCase.setId(dto.getTestId());
apiTestCase.setStatus(record.getStatus());
apiTestCaseService.updateByPrimaryKeySelective(apiTestCase);
}