mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix: 修复复制接口用例的时候版本不对的问题
--bug=1009772 --user=刘瑞斌 [接口定义]-复制一个版本v1的接口CASE,复制后的CASE版本是最新版本不是原CASE版本 https://www.tapd.cn/55049933/s/1094581
This commit is contained in:
parent
9ace668e32
commit
d0fc490581
@ -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
Block a user