refactor(测试跟踪): 案例加载优化子查询
This commit is contained in:
parent
07c108f85a
commit
7c2254830f
|
@ -98,8 +98,8 @@
|
|||
</sql>
|
||||
|
||||
<select id="getTestCaseByNotInReview" resultType="io.metersphere.base.domain.TestCase">
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status
|
||||
from test_case
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status from test_case as test_case
|
||||
left join test_case_review_test_case as T2 on test_case.id=T2.case_id
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
<include refid="combine">
|
||||
|
@ -107,7 +107,7 @@
|
|||
<property name="name" value="request.name"/>
|
||||
</include>
|
||||
</if>
|
||||
and test_case.id not in (select case_id from test_case_review_test_case where review_id =#{request.reviewId})
|
||||
and T2.case_id is null
|
||||
<if test="request.name != null">
|
||||
and test_case.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
|
@ -152,8 +152,8 @@
|
|||
</select>
|
||||
|
||||
<select id="getTestCaseByNotInPlan" resultType="io.metersphere.base.domain.TestCase">
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status
|
||||
from test_case
|
||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status from test_case as test_case
|
||||
left join test_plan_test_case as T2 on test_case.id=T2.case_id
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
<include refid="combine">
|
||||
|
@ -161,7 +161,7 @@
|
|||
<property name="name" value="request.name"/>
|
||||
</include>
|
||||
</if>
|
||||
and test_case.id not in (select case_id from test_plan_test_case where plan_id =#{request.planId})
|
||||
and T2.case_id is null
|
||||
<if test="request.name != null">
|
||||
and test_case.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue