fix (#1646)
* fix(接口测试):修复只读用户权限过高能对数据进行操作 * fix(测试计划):修复关联用例时样式不统一的问题 Co-authored-by: 黎龙鑫 <lilongxinya@163.com>
This commit is contained in:
parent
e7d78334f1
commit
f5ec3169ea
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
public interface ExtTestPlanLoadCaseMapper {
|
||||
|
||||
List<String> selectIdsNotInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
||||
List<String> selectIdsNotInPlan(@Param("request") LoadCaseRequest request);
|
||||
List<TestPlanLoadCaseDTO> selectTestPlanLoadCaseList(@Param("request") LoadCaseRequest request);
|
||||
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
||||
List<String> getStatusByTestPlanId(@Param("planId") String planId);
|
||||
|
|
|
@ -10,9 +10,12 @@
|
|||
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
||||
select load_test.id
|
||||
from load_test
|
||||
where load_test.project_id = #{projectId}
|
||||
where load_test.project_id = #{request.projectId}
|
||||
<if test="request.name != null and request.name != ''">
|
||||
and load_test.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{planId}
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{request.testPlanId}
|
||||
)
|
||||
</select>
|
||||
<select id="selectTestPlanLoadCaseList" resultType="io.metersphere.track.dto.TestPlanLoadCaseDTO">
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TestPlanLoadCaseService {
|
|||
private LoadTestMapper loadTestMapper;
|
||||
|
||||
public List<LoadTest> relevanceList(LoadCaseRequest request) {
|
||||
List<String> ids = extTestPlanLoadCaseMapper.selectIdsNotInPlan(request.getProjectId(), request.getTestPlanId());
|
||||
List<String> ids = extTestPlanLoadCaseMapper.selectIdsNotInPlan(request);
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -2,8 +2,17 @@
|
|||
<div>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
|
||||
<template v-slot:header>
|
||||
<el-row>
|
||||
<el-col :span="8" :offset="11">
|
||||
<el-input :placeholder="$t('api_test.definition.request.select_case')" @blur="search"
|
||||
@keyup.enter.native="search" class="search-input" size="small" v-model="condition.name"/>
|
||||
</el-col>
|
||||
|
||||
<env-popover :env-map="projectEnvMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
|
||||
:project-list="projectList" ref="envPopover" class="env-popover"/>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table" @select-all="handleSelectAll" @select="handleSelect">
|
||||
<el-table-column type="selection"/>
|
||||
|
|
|
@ -13,6 +13,15 @@
|
|||
ref="nodeTree"/>
|
||||
</template>
|
||||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<el-row>
|
||||
<el-col :span="8" :offset="16">
|
||||
<el-input :placeholder="$t('api_test.definition.request.select_case')" @blur="getTestCases"
|
||||
@keyup.enter.native="getTestCases" class="search-input" size="small" v-model="condition.name"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table
|
||||
v-loading="result.loading"
|
||||
|
@ -55,6 +64,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
<ms-table-pagination :change="getTestCases" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
</test-case-relevance-base>
|
||||
|
|
Loading…
Reference in New Issue