refactor: 关注人查询修改

This commit is contained in:
CaptainB 2021-10-24 15:03:42 +08:00 committed by 刘瑞斌
parent e76070fbbd
commit 949d8fd61e
7 changed files with 27 additions and 9 deletions

View File

@ -121,10 +121,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and api_definition.follow_people and api_definition.id in (
select definition_id from api_definition_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
and api_definition.update_time and api_definition.update_time

View File

@ -87,10 +87,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and api_scenario.follow_people and api_scenario.id in (
select scenario_id from api_scenario_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
and api_scenario.update_time and api_scenario.update_time

View File

@ -151,10 +151,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and t1.follow_people and t1.id in (
select case_id from api_test_case_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
and t1.update_time and t1.update_time
@ -218,10 +220,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and api_test_case.follow_people and api_test_case.id in (
select case_id from api_test_case_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
and api_test_case.update_time and api_test_case.update_time

View File

@ -19,10 +19,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and load_test.follow_people and load_test.id in (
select test_id from load_test_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
AND load_test.update_time AND load_test.update_time
@ -64,10 +66,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and load_test.follow_people and load_test.id in (
select test_id from load_test_follow where follow_id
<include refid="condition"> <include refid="condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.updateTime != null"> <if test="${condition}.updateTime != null">
AND load_test.update_time AND load_test.update_time

View File

@ -10,10 +10,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and test_case.follow_people and test_case.id in (
select case_id from test_case_follow where follow_id
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition"> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.module != null"> <if test="${condition}.module != null">
and test_case.node_path and test_case.node_path

View File

@ -23,10 +23,12 @@
<sql id="combine"> <sql id="combine">
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and test_case_review.follow_people and test_case_review.id in (
select review_id from test_case_review_follow where follow_id
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition"> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.creator != null"> <if test="${condition}.creator != null">
and test_case_review.create_user and test_case_review.create_user

View File

@ -59,10 +59,12 @@
</include> </include>
</if> </if>
<if test="${condition}.followPeople != null"> <if test="${condition}.followPeople != null">
and test_plan.follow_people and test_plan.id in (
select test_plan_id from test_plan_follow where follow_id
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition"> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
<property name="object" value="${condition}.followPeople"/> <property name="object" value="${condition}.followPeople"/>
</include> </include>
)
</if> </if>
<if test="${condition}.projectName != null"> <if test="${condition}.projectName != null">
and project.name and project.name