fix(UI 自动化): 测试报告搜索所属测试包含与不包含问题

--bug=1014116 --user=张大海 【UI测试】测试报告-高级搜索-所属测试不包含搜索结果等于包含结果 https://www.tapd.cn/55049933/s/1182906
This commit is contained in:
zhangdahai112 2022-06-15 16:29:41 +08:00 committed by f2c-ci-robot[bot]
parent f9e0fcb708
commit 9873037953
1 changed files with 12 additions and 2 deletions

View File

@ -107,11 +107,21 @@
</if> </if>
<if test="${isUi} and ${condition}.testName != null"> <if test="${isUi} and ${condition}.testName != null">
and `scenario_id` IN and `scenario_id` IN
(SELECT id FROM ui_scenario WHERE name like CONCAT('%', #{${condition}.testName.value},'%') ) <if test="${condition}.testName.operator == 'like'">
(SELECT id FROM ui_scenario WHERE name like CONCAT('%', #{${condition}.testName.value},'%') )
</if>
<if test="${condition}.testName.operator != 'like'">
(SELECT id FROM ui_scenario WHERE name not like CONCAT('%', #{${condition}.testName.value},'%') )
</if>
</if> </if>
<if test="!${isUi} and ${condition}.testName != null"> <if test="!${isUi} and ${condition}.testName != null">
and `scenario_id` IN and `scenario_id` IN
(SELECT id FROM api_scenario WHERE name like CONCAT('%', #{${condition}.testName.value},'%') ) <if test="${condition}.testName.operator == 'like'">
(SELECT id FROM api_scenario WHERE name like CONCAT('%', #{${condition}.testName.value},'%') )
</if>
<if test="${condition}.testName.operator != 'like'">
(SELECT id FROM api_scenario WHERE name not like CONCAT('%', #{${condition}.testName.value},'%') )
</if>
</if> </if>
<if test="${condition}.createTime != null"> <if test="${condition}.createTime != null">
and create_time and create_time