refactor(接口测试): 复制版本数据弹窗加文案
修复由于修复接口多用例导出以及url可重复时的导入版本问题导致的复制版本数据选中case却不复制问题 修复接口url重复导入数据不选模块选择新版本生成了新接口的问题 --bug=1023474 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001023474
This commit is contained in:
parent
b78fda9208
commit
30f6a521ec
|
@ -1153,7 +1153,9 @@
|
|||
<include refid="Same_Where_Clause"/>
|
||||
and status != 'TRASH'
|
||||
and project_id = #{projectId}
|
||||
and module_id = #{moduleId}
|
||||
<if test="moduleId != null">
|
||||
and module_id = #{moduleId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectRepeatByProtocol" resultType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
SELECT * from api_definition
|
||||
|
|
|
@ -93,6 +93,8 @@ public interface ExtApiTestCaseMapper {
|
|||
|
||||
List<ApiTestCaseWithBLOBs> unTrashCaseListByIds(@Param("ids") List<String> ids);
|
||||
|
||||
List<ApiTestCaseWithBLOBs> unTrashCaseListByApiIds(@Param("ids") List<String> apiIds);
|
||||
|
||||
List<ApiCountChartResult> countByRequest(ApiCountRequest request);
|
||||
|
||||
List<ApiTestCaseDTO> relevanceApiList(@Param("request") ApiTestCaseRequest request);
|
||||
|
|
|
@ -1072,6 +1072,17 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="unTrashCaseListByApiIds" resultType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||
SELECT * FROM api_test_case
|
||||
<where>
|
||||
(api_test_case.status IS NULL OR api_test_case.status != 'Trash')
|
||||
AND api_definition_id IN
|
||||
<foreach collection="ids" item="v" separator="," open="(" close=")">
|
||||
#{v}
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="relevanceApiList" resultType="io.metersphere.api.dto.definition.ApiTestCaseDTO">
|
||||
SELECT
|
||||
atc.id,
|
||||
|
|
|
@ -285,8 +285,10 @@ public class ApiDefinitionImportUtilService {
|
|||
Boolean fullCoverageApi = getFullCoverageApi(request);
|
||||
String projectId = request.getProjectId();
|
||||
//系统内重复的数据
|
||||
if (StringUtils.isBlank(request.getModuleId())) {
|
||||
request.setModuleId(null);
|
||||
}
|
||||
List<ApiDefinitionWithBLOBs> repeatApiDefinitionWithBLOBs = extApiDefinitionMapper.selectRepeatByBLOBsSameUrl(optionData, projectId, request.getModuleId());
|
||||
|
||||
//这个是名称加请求方式加路径加模块为key的map 就是为了去重
|
||||
Map<String, ApiDefinitionWithBLOBs> optionMap = new HashMap<>();
|
||||
//这个是系统内重复的数据
|
||||
|
|
|
@ -609,7 +609,7 @@ public class ApiTestCaseService {
|
|||
}
|
||||
|
||||
public List<ApiTestCaseWithBLOBs> selectCasesBydApiIds(List<String> apiIds) {
|
||||
return extApiTestCaseMapper.unTrashCaseListByIds(apiIds);
|
||||
return extApiTestCaseMapper.unTrashCaseListByApiIds(apiIds);
|
||||
}
|
||||
|
||||
public Map<String, String> getRequest(ApiTestCaseRequest request) {
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
<el-row>
|
||||
<div v-loading="loading">
|
||||
<el-row>
|
||||
{{ $t('commons.copy') }}
|
||||
<el-select v-model="versionId" size="small" :placeholder="$t('project.version.please_input_version')">
|
||||
<el-option v-for="v in versionData" :key="v.id" :label="v.name" :value="v.id" />
|
||||
</el-select>
|
||||
{{ $t('commons.version_data') }}
|
||||
</el-row>
|
||||
<el-row style="margin: 0">
|
||||
<p style="color: #939496">{{ $t('api_definition.copy_data_from_other_version_tips') }}</p>
|
||||
|
|
|
@ -484,6 +484,7 @@ const message = {
|
|||
original_state: 'Original State',
|
||||
custom_num: 'CustomNum',
|
||||
version: 'Version',
|
||||
version_data: 'Version data',
|
||||
is_new: "Is new",
|
||||
form_config: "Form config",
|
||||
form_content: "Form content",
|
||||
|
|
|
@ -486,6 +486,7 @@ const message = {
|
|||
original_state: '原始状态',
|
||||
custom_num: '自定义编号',
|
||||
version: '版本',
|
||||
version_data: '版本的数据',
|
||||
is_new: "是否新建",
|
||||
form_config: "表单配置",
|
||||
form_content: "表单内容",
|
||||
|
|
|
@ -486,6 +486,7 @@ const message = {
|
|||
original_state: '原始狀態',
|
||||
custom_num: '自定義編號',
|
||||
version: '版本',
|
||||
version_data: '版本的數據',
|
||||
is_new: "是否新建",
|
||||
form_config: "表單配置",
|
||||
form_content: "表單內容",
|
||||
|
|
Loading…
Reference in New Issue