fix: 高级搜索问题#1006737,#1006717
--bug=1006737 --user=lyh 【测试计划】-关联性能测试用例-高级搜索-用例名包含“测试”搜索sql报错 https://www.tapd.cn/55049933/s/1048238 --bug=1006717 --user=lyh 【测试跟踪】测试用例关联接口的高级搜索,根据创建人搜索没生效 https://www.tapd.cn/55049933/s/1048241
This commit is contained in:
parent
845d817a09
commit
3a6311692b
|
@ -271,6 +271,56 @@
|
|||
<property name="object" value="${condition}.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.creator != null">
|
||||
and atc.create_user_id
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.creator"/>
|
||||
</include>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="loadCaseCombine">
|
||||
<if test='${condition}.name != null and (${name} == null or ${name} == "")'>
|
||||
and atc.name
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.name"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.updateTime != null">
|
||||
and atc.update_time
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.updateTime"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.createTime != null">
|
||||
and atc.create_time
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.createTime"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.priority != null">
|
||||
and atc.priority
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.priority"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.status != null">
|
||||
and atc.status
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.status"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test='${condition}.tags != null and ${objectKey}.operator == "like"'>
|
||||
and atc.tags
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test="${condition}.creator != null">
|
||||
and atc.create_user
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.creator"/>
|
||||
</include>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="scenarioCombine">
|
||||
<if test='${condition}.name != null and (${name} == null or ${name} == "")'>
|
||||
|
@ -309,6 +359,12 @@
|
|||
<property name="object" value="${condition}.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
<if test='${condition}.creator != null'>
|
||||
and atc.create_user
|
||||
<include refid="condition">
|
||||
<property name="object" value="${condition}.creator"/>
|
||||
</include>
|
||||
</if>
|
||||
</sql>
|
||||
<select id="relevanceScenarioList" resultType="io.metersphere.api.dto.automation.ApiScenarioDTO">
|
||||
SELECT
|
||||
|
@ -353,7 +409,7 @@
|
|||
or atc.num like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.combine != null">
|
||||
<include refid="scenarioCombine">
|
||||
<include refid="loadCaseCombine">
|
||||
<property name="condition" value="request.combine"/>
|
||||
<property name="name" value="request.name"/>
|
||||
<property name="objectKey" value="request.combine.tags"/>
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
select load_test.id
|
||||
from load_test
|
||||
where load_test.project_id = #{request.projectId}
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{request.testPlanId}
|
||||
)
|
||||
<if test="request.name != null and request.name != ''">
|
||||
and load_test.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
|
@ -41,9 +44,6 @@
|
|||
<property name="objectKey" value="request.combine.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{request.testPlanId}
|
||||
)
|
||||
</select>
|
||||
<sql id="condition">
|
||||
<choose>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<test-case-relevance-base
|
||||
@setProject="setProject"
|
||||
@save="saveCaseRelevance"
|
||||
width="50%"
|
||||
width="60%"
|
||||
ref="baseRelevance">
|
||||
|
||||
<template v-slot:aside>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<test-case-relevance-base
|
||||
@setProject="setProject"
|
||||
@save="saveCaseRelevance"
|
||||
width="50%"
|
||||
width="60%"
|
||||
ref="baseRelevance">
|
||||
|
||||
<test-case-relate-load-list
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<test-case-relevance-base
|
||||
@setProject="setProject"
|
||||
@save="saveCaseRelevance"
|
||||
width="50%"
|
||||
width="60%"
|
||||
ref="baseRelevance">
|
||||
|
||||
<template v-slot:aside>
|
||||
|
|
Loading…
Reference in New Issue