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