fix(接口测试): 修复用例批量筛选不生效的缺陷
--bug=1037724 --user=王孝刚 【接口测试】接口定义-CASE列表-搜索后批量编辑CASE用例等级/状态/追加标签失败 https://www.tapd.cn/55049933/s/1502719
This commit is contained in:
parent
6eb05354b3
commit
5cdcd4029a
|
@ -373,6 +373,7 @@
|
|||
and (
|
||||
atc.name like concat('%', #{request.condition.keyword},'%')
|
||||
or atc.num like concat('%', #{request.condition.keyword},'%')
|
||||
or a.path like concat('%', #{request.condition.keyword},'%')
|
||||
or atc.tags like concat('%', #{request.condition.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
|
|
|
@ -156,6 +156,7 @@ public class ApiDefinitionImportUtilService {
|
|||
//如果导入的时候选择了模块,需要把所有的导入数据的模块路径前面拼接上选择的模块路径
|
||||
if (StringUtils.isNotBlank(request.getModuleId())) {
|
||||
BaseTreeNode baseTreeNode = idModuleMap.get(request.getModuleId());
|
||||
if (baseTreeNode != null) {
|
||||
String modulePath = baseTreeNode.getPath();
|
||||
//如果选择了未规划模块, 导入的数据的模块清空, 只导入数据,不处理模块信息
|
||||
if ("root".equals(request.getModuleId())) {
|
||||
|
@ -168,6 +169,7 @@ public class ApiDefinitionImportUtilService {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
//去掉apiLists中不存在的模块数据
|
||||
apiLists.forEach(t -> {
|
||||
t.setModulePath(idModuleMap.get(t.getModuleId()) != null ? idModuleMap.get(t.getModuleId()).getPath() : StringUtils.EMPTY);
|
||||
|
|
|
@ -413,6 +413,7 @@ public class ApiTestCaseService extends MoveNodeService {
|
|||
public List<String> doSelectIds(ApiTestCaseBatchRequest request, boolean deleted) {
|
||||
if (request.isSelectAll()) {
|
||||
List<String> ids = extApiTestCaseMapper.getIds(request, deleted);
|
||||
ids.addAll(request.getSelectIds());
|
||||
if (CollectionUtils.isNotEmpty(request.getExcludeIds())) {
|
||||
ids.removeAll(request.getExcludeIds());
|
||||
}
|
||||
|
|
|
@ -2566,19 +2566,38 @@ public class ApiScenarioService extends MoveNodeService {
|
|||
}
|
||||
response.addSuccessData(copyScenario.getId(), copyScenario.getNum(), copyScenario.getName());
|
||||
}
|
||||
|
||||
response.setSuccess(apiScenarioMapper.batchInsert(insertApiScenarioList));
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
ApiScenarioMapper mapper = sqlSession.getMapper(ApiScenarioMapper.class);
|
||||
SubListUtils.dealForSubList(insertApiScenarioList, 100, subList -> {
|
||||
subList.forEach(mapper::insertSelective);
|
||||
});
|
||||
response.setSuccess(insertApiScenarioList.size());
|
||||
if (CollectionUtils.isNotEmpty(insertApiScenarioBlobList)) {
|
||||
apiScenarioBlobMapper.batchInsert(insertApiScenarioBlobList);
|
||||
ApiScenarioBlobMapper blobMapper = sqlSession.getMapper(ApiScenarioBlobMapper.class);
|
||||
SubListUtils.dealForSubList(insertApiScenarioBlobList, 100, subList -> {
|
||||
subList.forEach(blobMapper::insertSelective);
|
||||
});
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(insertApiScenarioStepList)) {
|
||||
apiScenarioStepMapper.batchInsert(insertApiScenarioStepList);
|
||||
ApiScenarioStepMapper stepMapper = sqlSession.getMapper(ApiScenarioStepMapper.class);
|
||||
SubListUtils.dealForSubList(insertApiScenarioStepList, 100, subList -> {
|
||||
subList.forEach(stepMapper::insertSelective);
|
||||
});
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(insertApiScenarioStepBlobList)) {
|
||||
apiScenarioStepBlobMapper.batchInsert(insertApiScenarioStepBlobList);
|
||||
ApiScenarioStepBlobMapper stepBlobMapper = sqlSession.getMapper(ApiScenarioStepBlobMapper.class);
|
||||
SubListUtils.dealForSubList(insertApiScenarioStepBlobList, 100, subList -> {
|
||||
subList.forEach(stepBlobMapper::insertSelective);
|
||||
});
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(insertApiFileResourceList)) {
|
||||
apiFileResourceService.batchInsert(insertApiFileResourceList);
|
||||
SubListUtils.dealForSubList(insertApiFileResourceList, 100, subList -> {
|
||||
apiFileResourceService.batchInsert(subList);
|
||||
});
|
||||
}
|
||||
sqlSession.flushStatements();
|
||||
if (sqlSessionFactory != null) {
|
||||
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -415,7 +415,7 @@
|
|||
() => visible.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
importForm.value.moduleId = props.activeModule !== 'all' ? props.activeModule : 'root';
|
||||
importForm.value.moduleId = props.activeModule !== 'all' ? props.activeModule : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue