parent
2d79a4dcae
commit
7489215346
|
@ -239,6 +239,10 @@ public class ApiDefinitionService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//update userId
|
||||||
|
if(request.getUserId().equals("currentUserId")){
|
||||||
|
request.setUserId(SessionUtils.getUserId());
|
||||||
|
}
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.creator != null">
|
<if test="${condition}.creator != null">
|
||||||
and api_definition.user_id
|
and api_definition.create_user
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.creator"/>
|
<property name="object" value="${condition}.creator"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
|
@ -275,6 +275,9 @@
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.filters == null || request.filters.size() == 0 ">
|
||||||
|
and (api_scenario.status is null or api_scenario.status != 'Trash')
|
||||||
|
</if>
|
||||||
<if test="request.executeStatus == 'unExecute'">
|
<if test="request.executeStatus == 'unExecute'">
|
||||||
and api_scenario.last_result IS NULL
|
and api_scenario.last_result IS NULL
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -397,7 +397,7 @@
|
||||||
and (t1.status is null or t1.status != 'Trash')
|
and (t1.status is null or t1.status != 'Trash')
|
||||||
</if>
|
</if>
|
||||||
<if test="request.toUpdate !=null and request.toUpdate == true">
|
<if test="request.toUpdate !=null and request.toUpdate == true">
|
||||||
and (t1.update_time >= 'request.updateTime' or t2.status = 'error')
|
and (t1.update_time >= #{request.updateTime} or t2.status = 'error')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY t1.id,
|
GROUP BY t1.id,
|
||||||
t1.project_id,
|
t1.project_id,
|
||||||
|
|
|
@ -50,6 +50,9 @@
|
||||||
<if test="request.name != null">
|
<if test="request.name != null">
|
||||||
and test_case_review.name like CONCAT('%', #{request.name},'%')
|
and test_case_review.name like CONCAT('%', #{request.name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.reviewerId != null">
|
||||||
|
and test_case_review.id in (select test_case_review_users.review_id from test_case_review_users where test_case_review_users.user_id = #{request.reviewerId})
|
||||||
|
</if>
|
||||||
<if test="request.projectId != null">
|
<if test="request.projectId != null">
|
||||||
and test_case_review.project_id = #{request.projectId}
|
and test_case_review.project_id = #{request.projectId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -119,6 +119,10 @@
|
||||||
from test_plan
|
from test_plan
|
||||||
LEFT JOIN schedule ON schedule.resource_id = test_plan.id
|
LEFT JOIN schedule ON schedule.resource_id = test_plan.id
|
||||||
JOIN project on project.id = test_plan.project_id
|
JOIN project on project.id = test_plan.project_id
|
||||||
|
<if test="request.executorOrPrincipal != null">
|
||||||
|
JOIN test_plan_principal ON test_plan_principal.test_plan_id = test_plan.id
|
||||||
|
JOIN test_plan_test_case on test_plan_test_case.plan_id = test_plan.id
|
||||||
|
</if>
|
||||||
<where>
|
<where>
|
||||||
<if test="request.combine != null">
|
<if test="request.combine != null">
|
||||||
<include refid="combine">
|
<include refid="combine">
|
||||||
|
@ -159,13 +163,19 @@
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.executorOrPrincipal != null">
|
||||||
|
AND ( test_plan.creator = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' or test_plan_principal.principal_id = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' or test_plan_test_case.executor = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
<foreach collection="request.orders" separator="," item="order">
|
<foreach collection="request.orders" separator="," item="order">
|
||||||
test_plan.${order.name} ${order.type}
|
test_plan.${order.name} ${order.type}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="planList" resultMap="BaseResultMap"
|
<select id="planList" resultMap="BaseResultMap"
|
||||||
parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
|
parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
|
||||||
|
|
|
@ -31,4 +31,7 @@ public class QueryTestPlanRequest extends TestPlan {
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
//执行人或者负责人
|
||||||
|
private String executorOrPrincipal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,6 @@ public class QueryCaseReviewRequest extends TestCaseReviewTestCase {
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
private String reviewerId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,6 +157,10 @@ public class TestCaseReviewService {
|
||||||
if (StringUtils.isBlank(projectId)) {
|
if (StringUtils.isBlank(projectId)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
//update reviewerId
|
||||||
|
if(request.getReviewerId().equals("currentUserId")){
|
||||||
|
request.setReviewerId(SessionUtils.getUserId());
|
||||||
|
}
|
||||||
return extTestCaseReviewMapper.list(request);
|
return extTestCaseReviewMapper.list(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue