fix: 修复复制接口用例的时候版本不对的问题
--bug=1009772 --user=刘瑞斌 [接口定义]-复制一个版本v1的接口CASE,复制后的CASE版本是最新版本不是原CASE版本 https://www.tapd.cn/55049933/s/1094581
This commit is contained in:
parent
c1b3e80dca
commit
f8bcc3b59e
|
@ -328,6 +328,9 @@ public class ApiTestCaseService {
|
|||
if (StringUtils.isNotBlank(request.getId())) {
|
||||
criteria.andIdNotEqualTo(request.getId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(request.getVersionId())) {
|
||||
criteria.andVersionIdEqualTo(request.getVersionId());
|
||||
}
|
||||
List<ApiTestCase> apiTestCases = apiTestCaseMapper.selectByExample(example);
|
||||
if (CollectionUtils.isNotEmpty(apiTestCases)) {
|
||||
return apiTestCases.get(0);
|
||||
|
|
|
@ -150,6 +150,7 @@ export default {
|
|||
},
|
||||
copy(apiCase) {
|
||||
this.api.id = apiCase.apiDefinitionId;
|
||||
this.api.versionId = apiCase.versionId;
|
||||
if (apiCase && apiCase.request) {
|
||||
if (apiCase.request.type === "HTTPSamplerProxy") {
|
||||
this.api.protocol = "HTTP";
|
||||
|
|
|
@ -836,6 +836,7 @@ export default {
|
|||
let obj = {
|
||||
name: "copy_" + data.name,
|
||||
apiDefinitionId: row.apiDefinitionId,
|
||||
versionId: data.versionId,
|
||||
priority: data.priority,
|
||||
active: true,
|
||||
tags: data.tags,
|
||||
|
|
Loading…
Reference in New Issue