diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionResult.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionResult.java index f129c5b161..16c56ded8c 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionResult.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionResult.java @@ -1,13 +1,12 @@ package io.metersphere.api.dto.definition; -import io.metersphere.base.domain.ApiDefinition; -import io.metersphere.base.domain.Schedule; +import io.metersphere.base.domain.ApiDefinitionWithBLOBs; import lombok.Getter; import lombok.Setter; @Setter @Getter -public class ApiDefinitionResult extends ApiDefinition { +public class ApiDefinitionResult extends ApiDefinitionWithBLOBs { private String projectName; @@ -18,6 +17,4 @@ public class ApiDefinitionResult extends ApiDefinition { private String caseStatus; private String casePassingRate; - - private Schedule schedule; } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseResult.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseResult.java index 943126a6a3..f0ecc401e5 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseResult.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseResult.java @@ -1,12 +1,12 @@ package io.metersphere.api.dto.definition; -import io.metersphere.base.domain.ApiTestCase; +import io.metersphere.base.domain.ApiTestCaseWithBLOBs; import lombok.Getter; import lombok.Setter; @Setter @Getter -public class ApiTestCaseResult extends ApiTestCase { +public class ApiTestCaseResult extends ApiTestCaseWithBLOBs { private String projectName; private String createUser; private String updateUser; diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index e9655acdc0..9c89056ecb 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1,15 +1,10 @@ package io.metersphere.api.service; -import io.metersphere.base.mapper.ApiDefinitionHistoryMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; - @Service @Transactional(rollbackFor = Exception.class) public class ApiAutomationService { - @Resource - private ApiDefinitionHistoryMapper apiDefinitionHistoryMapper; } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index 924306669b..a3466cbe9e 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import io.metersphere.api.jmeter.TestResult; import io.metersphere.base.domain.ApiDefinitionExecResult; import io.metersphere.base.mapper.ApiDefinitionExecResultMapper; +import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper; import io.metersphere.commons.utils.SessionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -17,12 +18,14 @@ import java.util.UUID; public class ApiDefinitionExecResultService { @Resource private ApiDefinitionExecResultMapper apiDefinitionExecResultMapper; + @Resource + private ExtApiDefinitionExecResultMapper extApiDefinitionExecResultMapper; public void saveApiResult(TestResult result) { result.getScenarios().get(0).getRequestResults().forEach(item -> { // 清理原始资源,每个执行 保留一条结果 - apiDefinitionExecResultMapper.deleteByResourceId(item.getName()); + extApiDefinitionExecResultMapper.deleteByResourceId(item.getName()); ApiDefinitionExecResult saveResult = new ApiDefinitionExecResult(); saveResult.setId(UUID.randomUUID().toString()); saveResult.setUserId(Objects.requireNonNull(SessionUtils.getUser()).getId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java deleted file mode 100644 index 75d93f7bce..0000000000 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java +++ /dev/null @@ -1,20 +0,0 @@ -package io.metersphere.api.service; - -import io.metersphere.base.domain.ApiDefinitionHistory; -import io.metersphere.base.mapper.ApiDefinitionHistoryMapper; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; -import java.util.List; - -@Service -@Transactional(rollbackFor = Exception.class) -public class ApiDefinitionHistoryService { - @Resource - private ApiDefinitionHistoryMapper apiDefinitionHistoryMapper; - - public List selectByApiDefinitionId(String id){ - return apiDefinitionHistoryMapper.selectByApiDefinitionId(id); - } -} diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 14e7420015..2e581d296a 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -12,9 +12,10 @@ import io.metersphere.api.jmeter.TestResult; import io.metersphere.api.parse.ApiImportParser; import io.metersphere.api.parse.ApiImportParserFactory; import io.metersphere.base.domain.*; -import io.metersphere.base.mapper.ApiDefinitionExecResultMapper; import io.metersphere.base.mapper.ApiDefinitionMapper; import io.metersphere.base.mapper.ApiTestFileMapper; +import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper; +import io.metersphere.base.mapper.ext.ExtApiDefinitionMapper; import io.metersphere.commons.constants.APITestStatus; import io.metersphere.commons.constants.ApiRunMode; import io.metersphere.commons.exception.MSException; @@ -40,6 +41,8 @@ import java.util.stream.Collectors; @Service @Transactional(rollbackFor = Exception.class) public class ApiDefinitionService { + @Resource + private ExtApiDefinitionMapper extApiDefinitionMapper; @Resource private ApiDefinitionMapper apiDefinitionMapper; @Resource @@ -49,7 +52,7 @@ public class ApiDefinitionService { @Resource private ApiTestCaseService apiTestCaseService; @Resource - private ApiDefinitionExecResultMapper apiDefinitionExecResultMapper; + private ExtApiDefinitionExecResultMapper extApiDefinitionExecResultMapper; @Resource private JMeterService jMeterService; @@ -59,10 +62,10 @@ public class ApiDefinitionService { public List list(ApiDefinitionRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - List resList = apiDefinitionMapper.list(request); + List resList = extApiDefinitionMapper.list(request); if (!resList.isEmpty()) { List ids = resList.stream().map(ApiDefinitionResult::getId).collect(Collectors.toList()); - List results = apiDefinitionMapper.selectByIds(ids); + List results = extApiDefinitionMapper.selectByIds(ids); Map resultMap = results.stream().collect(Collectors.toMap(ApiComputeResult::getApiDefinitionId, Function.identity())); for (ApiDefinitionResult res : resList) { ApiComputeResult compRes = resultMap.get(res.getId()); @@ -121,7 +124,7 @@ public class ApiDefinitionService { public void delete(String apiId) { apiTestCaseService.deleteTestCase(apiId); deleteFileByTestId(apiId); - apiDefinitionExecResultMapper.deleteByResourceId(apiId); + extApiDefinitionExecResultMapper.deleteByResourceId(apiId); apiDefinitionMapper.deleteByPrimaryKey(apiId); deleteBodyFiles(apiId); } @@ -134,7 +137,7 @@ public class ApiDefinitionService { } public void removeToGc(List apiIds) { - apiDefinitionMapper.removeToGc(apiIds); + extApiDefinitionMapper.removeToGc(apiIds); } public void deleteBodyFiles(String apiId) { @@ -148,12 +151,16 @@ public class ApiDefinitionService { private void checkNameExist(SaveApiDefinitionRequest request) { ApiDefinitionExample example = new ApiDefinitionExample(); if (request.getProtocol().equals(RequestType.HTTP)) { - example.createCriteria().andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId()); + example.createCriteria().andMethodEqualTo(request.getMethod()) + .andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath()) + .andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId()); if (apiDefinitionMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("api_definition_url_not_repeating")); } } else { - example.createCriteria().andProtocolEqualTo(request.getProtocol()).andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId()); + example.createCriteria().andProtocolEqualTo(request.getProtocol()) + .andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()) + .andIdNotEqualTo(request.getId()); if (apiDefinitionMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("load_test_already_exists")); } @@ -163,7 +170,7 @@ public class ApiDefinitionService { private ApiDefinition updateTest(SaveApiDefinitionRequest request) { checkNameExist(request); - final ApiDefinition test = new ApiDefinition(); + final ApiDefinitionWithBLOBs test = new ApiDefinitionWithBLOBs(); test.setId(request.getId()); test.setName(request.getName()); test.setPath(request.getPath()); @@ -186,7 +193,7 @@ public class ApiDefinitionService { private ApiDefinition createTest(SaveApiDefinitionRequest request) { checkNameExist(request); - final ApiDefinition test = new ApiDefinition(); + final ApiDefinitionWithBLOBs test = new ApiDefinitionWithBLOBs(); test.setId(request.getId()); test.setName(request.getName()); test.setProtocol(request.getProtocol()); @@ -219,7 +226,7 @@ public class ApiDefinitionService { saveReq.setProjectId(request.getProjectId()); saveReq.setPath(request.getPath()); checkNameExist(saveReq); - final ApiDefinition test = new ApiDefinition(); + final ApiDefinitionWithBLOBs test = new ApiDefinitionWithBLOBs(); test.setId(request.getId()); test.setName(request.getName()); test.setProtocol(request.getProtocol()); @@ -306,7 +313,7 @@ public class ApiDefinitionService { * @return */ public APIReportResult getDbResult(String testId) { - ApiDefinitionExecResult result = apiDefinitionExecResultMapper.selectByResourceId(testId); + ApiDefinitionExecResult result = extApiDefinitionExecResultMapper.selectByResourceId(testId); if (result == null) { return null; } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index 1e93aebfd9..8ebfd85ab5 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -10,6 +10,7 @@ import io.metersphere.base.domain.ApiModule; import io.metersphere.base.domain.ApiModuleExample; import io.metersphere.base.mapper.ApiDefinitionMapper; import io.metersphere.base.mapper.ApiModuleMapper; +import io.metersphere.base.mapper.ext.ExtApiDefinitionMapper; import io.metersphere.commons.constants.TestCaseConstants; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.BeanUtils; @@ -33,6 +34,9 @@ public class ApiModuleService { ApiModuleMapper apiModuleMapper; @Resource private ApiDefinitionMapper apiDefinitionMapper; + @Resource + private ExtApiDefinitionMapper extApiDefinitionMapper; + @Resource SqlSessionFactory sqlSessionFactory; @@ -132,7 +136,7 @@ public class ApiModuleService { private List queryByModuleIds(List nodeIds) { ApiDefinitionRequest apiDefinitionRequest = new ApiDefinitionRequest(); apiDefinitionRequest.setModuleIds(nodeIds); - return apiDefinitionMapper.list(apiDefinitionRequest); + return extApiDefinitionMapper.list(apiDefinitionRequest); } public int editNode(DragModuleRequest request) { diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 672fdd9ac1..94881afbbb 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -5,9 +5,10 @@ import io.metersphere.api.dto.definition.ApiTestCaseRequest; import io.metersphere.api.dto.definition.ApiTestCaseResult; import io.metersphere.api.dto.definition.SaveApiTestCaseRequest; import io.metersphere.base.domain.*; -import io.metersphere.base.mapper.ApiDefinitionExecResultMapper; import io.metersphere.base.mapper.ApiTestCaseMapper; import io.metersphere.base.mapper.ApiTestFileMapper; +import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper; +import io.metersphere.base.mapper.ext.ExtApiTestCaseMapper; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.LogUtil; @@ -36,17 +37,19 @@ public class ApiTestCaseService { @Resource private ApiTestCaseMapper apiTestCaseMapper; @Resource + private ExtApiTestCaseMapper extApiTestCaseMapper; + @Resource private ApiTestFileMapper apiTestFileMapper; @Resource private FileService fileService; @Resource - private ApiDefinitionExecResultMapper apiDefinitionExecResultMapper; + private ExtApiDefinitionExecResultMapper extApiDefinitionExecResultMapper; private static final String BODY_FILE_DIR = "/opt/metersphere/data/body"; public List list(ApiTestCaseRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - return apiTestCaseMapper.list(request); + return extApiTestCaseMapper.list(request); } public ApiTestCase get(String id) { @@ -99,7 +102,7 @@ public class ApiTestCaseService { public void delete(String testId) { deleteFileByTestId(testId); - apiDefinitionExecResultMapper.deleteByResourceId(testId); + extApiDefinitionExecResultMapper.deleteByResourceId(testId); apiTestCaseMapper.deleteByPrimaryKey(testId); deleteBodyFiles(testId); } @@ -151,7 +154,7 @@ public class ApiTestCaseService { private ApiTestCase updateTest(SaveApiTestCaseRequest request) { checkNameExist(request); - final ApiTestCase test = new ApiTestCase(); + final ApiTestCaseWithBLOBs test = new ApiTestCaseWithBLOBs(); test.setId(request.getId()); test.setName(request.getName()); test.setApiDefinitionId(request.getApiDefinitionId()); @@ -169,7 +172,7 @@ public class ApiTestCaseService { private ApiTestCase createTest(SaveApiTestCaseRequest request) { request.setId(UUID.randomUUID().toString()); checkNameExist(request); - final ApiTestCase test = new ApiTestCase(); + final ApiTestCaseWithBLOBs test = new ApiTestCaseWithBLOBs(); test.setId(request.getId()); test.setName(request.getName()); test.setApiDefinitionId(request.getApiDefinitionId()); diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java index 718db66998..7fad6708c5 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java @@ -14,29 +14,27 @@ public class ApiDefinition implements Serializable { private String method; - private String path; - - private String protocol; - - private String environmentId; - - private String status; + private String modulePath; private String description; - private String userId; + private String environmentId; + + private String schedule; + + private String status; private String moduleId; - private String modulePath; + private String userId; private Long createTime; private Long updateTime; - private String request; + private String protocol; - private String response; + private String path; private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java index 22b966e3a4..fa6f5008ef 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java @@ -159,11 +159,6 @@ public class ApiDefinitionExample { return (Criteria) this; } - public Criteria andModuleIdIn(List values) { - addCriterion("module_id in", values, "module_id"); - return (Criteria) this; - } - public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; @@ -250,83 +245,212 @@ public class ApiDefinitionExample { } public Criteria andNameIsNull() { - addCriterion("name is null"); + addCriterion("`name` is null"); return (Criteria) this; } public Criteria andNameIsNotNull() { - addCriterion("name is not null"); + addCriterion("`name` is not null"); return (Criteria) this; } public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andPathEqualTo(String value) { - addCriterion("path =", value, "path"); - return (Criteria) this; - } - - - public Criteria andProtocolEqualTo(String value) { - addCriterion("protocol =", value, "protocol"); + addCriterion("`name` =", value, "name"); return (Criteria) this; } public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); + addCriterion("`name` <>", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); + addCriterion("`name` >", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); + addCriterion("`name` >=", value, "name"); return (Criteria) this; } public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); + addCriterion("`name` <", value, "name"); return (Criteria) this; } public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); + addCriterion("`name` <=", value, "name"); return (Criteria) this; } public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); + addCriterion("`name` like", value, "name"); return (Criteria) this; } public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); + addCriterion("`name` not like", value, "name"); return (Criteria) this; } public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); + addCriterion("`name` in", values, "name"); return (Criteria) this; } public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); + addCriterion("`name` not in", values, "name"); return (Criteria) this; } public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); + addCriterion("`name` between", value1, value2, "name"); return (Criteria) this; } public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMethodIsNull() { + addCriterion("`method` is null"); + return (Criteria) this; + } + + public Criteria andMethodIsNotNull() { + addCriterion("`method` is not null"); + return (Criteria) this; + } + + public Criteria andMethodEqualTo(String value) { + addCriterion("`method` =", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotEqualTo(String value) { + addCriterion("`method` <>", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThan(String value) { + addCriterion("`method` >", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThanOrEqualTo(String value) { + addCriterion("`method` >=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThan(String value) { + addCriterion("`method` <", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThanOrEqualTo(String value) { + addCriterion("`method` <=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLike(String value) { + addCriterion("`method` like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotLike(String value) { + addCriterion("`method` not like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodIn(List values) { + addCriterion("`method` in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotIn(List values) { + addCriterion("`method` not in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodBetween(String value1, String value2) { + addCriterion("`method` between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotBetween(String value1, String value2) { + addCriterion("`method` not between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andModulePathIsNull() { + addCriterion("module_path is null"); + return (Criteria) this; + } + + public Criteria andModulePathIsNotNull() { + addCriterion("module_path is not null"); + return (Criteria) this; + } + + public Criteria andModulePathEqualTo(String value) { + addCriterion("module_path =", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathNotEqualTo(String value) { + addCriterion("module_path <>", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathGreaterThan(String value) { + addCriterion("module_path >", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathGreaterThanOrEqualTo(String value) { + addCriterion("module_path >=", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathLessThan(String value) { + addCriterion("module_path <", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathLessThanOrEqualTo(String value) { + addCriterion("module_path <=", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathLike(String value) { + addCriterion("module_path like", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathNotLike(String value) { + addCriterion("module_path not like", value, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathIn(List values) { + addCriterion("module_path in", values, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathNotIn(List values) { + addCriterion("module_path not in", values, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathBetween(String value1, String value2) { + addCriterion("module_path between", value1, value2, "modulePath"); + return (Criteria) this; + } + + public Criteria andModulePathNotBetween(String value1, String value2) { + addCriterion("module_path not between", value1, value2, "modulePath"); return (Criteria) this; } @@ -400,73 +524,283 @@ public class ApiDefinitionExample { return (Criteria) this; } + public Criteria andEnvironmentIdIsNull() { + addCriterion("environment_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNotNull() { + addCriterion("environment_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdEqualTo(String value) { + addCriterion("environment_id =", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotEqualTo(String value) { + addCriterion("environment_id <>", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThan(String value) { + addCriterion("environment_id >", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_id >=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThan(String value) { + addCriterion("environment_id <", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThanOrEqualTo(String value) { + addCriterion("environment_id <=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLike(String value) { + addCriterion("environment_id like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotLike(String value) { + addCriterion("environment_id not like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIn(List values) { + addCriterion("environment_id in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotIn(List values) { + addCriterion("environment_id not in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdBetween(String value1, String value2) { + addCriterion("environment_id between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotBetween(String value1, String value2) { + addCriterion("environment_id not between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andScheduleIsNull() { + addCriterion("schedule is null"); + return (Criteria) this; + } + + public Criteria andScheduleIsNotNull() { + addCriterion("schedule is not null"); + return (Criteria) this; + } + + public Criteria andScheduleEqualTo(String value) { + addCriterion("schedule =", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleNotEqualTo(String value) { + addCriterion("schedule <>", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleGreaterThan(String value) { + addCriterion("schedule >", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleGreaterThanOrEqualTo(String value) { + addCriterion("schedule >=", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleLessThan(String value) { + addCriterion("schedule <", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleLessThanOrEqualTo(String value) { + addCriterion("schedule <=", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleLike(String value) { + addCriterion("schedule like", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleNotLike(String value) { + addCriterion("schedule not like", value, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleIn(List values) { + addCriterion("schedule in", values, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleNotIn(List values) { + addCriterion("schedule not in", values, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleBetween(String value1, String value2) { + addCriterion("schedule between", value1, value2, "schedule"); + return (Criteria) this; + } + + public Criteria andScheduleNotBetween(String value1, String value2) { + addCriterion("schedule not between", value1, value2, "schedule"); + return (Criteria) this; + } + public Criteria andStatusIsNull() { - addCriterion("status is null"); + addCriterion("`status` is null"); return (Criteria) this; } public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); + addCriterion("`status` is not null"); return (Criteria) this; } public Criteria andStatusEqualTo(String value) { - addCriterion("status =", value, "status"); + addCriterion("`status` =", value, "status"); return (Criteria) this; } public Criteria andStatusNotEqualTo(String value) { - addCriterion("status <>", value, "status"); + addCriterion("`status` <>", value, "status"); return (Criteria) this; } public Criteria andStatusGreaterThan(String value) { - addCriterion("status >", value, "status"); + addCriterion("`status` >", value, "status"); return (Criteria) this; } public Criteria andStatusGreaterThanOrEqualTo(String value) { - addCriterion("status >=", value, "status"); + addCriterion("`status` >=", value, "status"); return (Criteria) this; } public Criteria andStatusLessThan(String value) { - addCriterion("status <", value, "status"); + addCriterion("`status` <", value, "status"); return (Criteria) this; } public Criteria andStatusLessThanOrEqualTo(String value) { - addCriterion("status <=", value, "status"); + addCriterion("`status` <=", value, "status"); return (Criteria) this; } public Criteria andStatusLike(String value) { - addCriterion("status like", value, "status"); + addCriterion("`status` like", value, "status"); return (Criteria) this; } public Criteria andStatusNotLike(String value) { - addCriterion("status not like", value, "status"); + addCriterion("`status` not like", value, "status"); return (Criteria) this; } public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); + addCriterion("`status` in", values, "status"); return (Criteria) this; } public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); + addCriterion("`status` not in", values, "status"); return (Criteria) this; } public Criteria andStatusBetween(String value1, String value2) { - addCriterion("status between", value1, value2, "status"); + addCriterion("`status` between", value1, value2, "status"); return (Criteria) this; } public Criteria andStatusNotBetween(String value1, String value2) { - addCriterion("status not between", value1, value2, "status"); + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNull() { + addCriterion("module_id is null"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); + return (Criteria) this; + } + + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); return (Criteria) this; } @@ -659,6 +993,146 @@ public class ApiDefinitionExample { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } + + public Criteria andProtocolIsNull() { + addCriterion("protocol is null"); + return (Criteria) this; + } + + public Criteria andProtocolIsNotNull() { + addCriterion("protocol is not null"); + return (Criteria) this; + } + + public Criteria andProtocolEqualTo(String value) { + addCriterion("protocol =", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotEqualTo(String value) { + addCriterion("protocol <>", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThan(String value) { + addCriterion("protocol >", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThanOrEqualTo(String value) { + addCriterion("protocol >=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThan(String value) { + addCriterion("protocol <", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThanOrEqualTo(String value) { + addCriterion("protocol <=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLike(String value) { + addCriterion("protocol like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotLike(String value) { + addCriterion("protocol not like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolIn(List values) { + addCriterion("protocol in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotIn(List values) { + addCriterion("protocol not in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolBetween(String value1, String value2) { + addCriterion("protocol between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotBetween(String value1, String value2) { + addCriterion("protocol not between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExecResult.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExecResult.java index b70459e976..5247bd5663 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExecResult.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExecResult.java @@ -7,12 +7,20 @@ import java.io.Serializable; @Data public class ApiDefinitionExecResult implements Serializable { private String id; - private String resourceId; + private String name; - private String content; + + private String resourceId; + private String status; + private String userId; + private Long startTime; + private Long endTime; -} + private String content; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionHistory.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionHistory.java deleted file mode 100644 index bc03178c2a..0000000000 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionHistory.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.metersphere.base.domain; - -import lombok.Data; - -import java.io.Serializable; - -@Data -public class ApiDefinitionHistory implements Serializable { - private String id; - - private String apiDefinitionId; - - private String content; - - private String userId; - - private Long createTime; - - private Long updateTime; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiModule.java b/backend/src/main/java/io/metersphere/base/domain/ApiModule.java index 851c52abe2..b0d6aae0bc 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiModule.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiModule.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class ApiModule implements Serializable { @@ -12,12 +11,12 @@ public class ApiModule implements Serializable { private String name; + private String protocol; + private String parentId; private Integer level; - private String protocol; - private Long createTime; private Long updateTime; diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiModuleExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiModuleExample.java index 5a5d51e771..e5d8fd052b 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiModuleExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiModuleExample.java @@ -189,12 +189,6 @@ public class ApiModuleExample { return (Criteria) this; } - - public Criteria andProtocolEqualTo(String value) { - addCriterion("protocol =", value, "protocol"); - return (Criteria) this; - } - public Criteria andProjectIdNotEqualTo(String value) { addCriterion("project_id <>", value, "projectId"); return (Criteria) this; @@ -251,72 +245,142 @@ public class ApiModuleExample { } public Criteria andNameIsNull() { - addCriterion("name is null"); + addCriterion("`name` is null"); return (Criteria) this; } public Criteria andNameIsNotNull() { - addCriterion("name is not null"); + addCriterion("`name` is not null"); return (Criteria) this; } public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); + addCriterion("`name` =", value, "name"); return (Criteria) this; } public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); + addCriterion("`name` <>", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); + addCriterion("`name` >", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); + addCriterion("`name` >=", value, "name"); return (Criteria) this; } public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); + addCriterion("`name` <", value, "name"); return (Criteria) this; } public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); + addCriterion("`name` <=", value, "name"); return (Criteria) this; } public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); + addCriterion("`name` like", value, "name"); return (Criteria) this; } public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); + addCriterion("`name` not like", value, "name"); return (Criteria) this; } public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); + addCriterion("`name` in", values, "name"); return (Criteria) this; } public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); + addCriterion("`name` not in", values, "name"); return (Criteria) this; } public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); + addCriterion("`name` between", value1, value2, "name"); return (Criteria) this; } public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andProtocolIsNull() { + addCriterion("protocol is null"); + return (Criteria) this; + } + + public Criteria andProtocolIsNotNull() { + addCriterion("protocol is not null"); + return (Criteria) this; + } + + public Criteria andProtocolEqualTo(String value) { + addCriterion("protocol =", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotEqualTo(String value) { + addCriterion("protocol <>", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThan(String value) { + addCriterion("protocol >", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThanOrEqualTo(String value) { + addCriterion("protocol >=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThan(String value) { + addCriterion("protocol <", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThanOrEqualTo(String value) { + addCriterion("protocol <=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLike(String value) { + addCriterion("protocol like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotLike(String value) { + addCriterion("protocol not like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolIn(List values) { + addCriterion("protocol in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotIn(List values) { + addCriterion("protocol not in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolBetween(String value1, String value2) { + addCriterion("protocol between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotBetween(String value1, String value2) { + addCriterion("protocol not between", value1, value2, "protocol"); return (Criteria) this; } @@ -391,62 +455,62 @@ public class ApiModuleExample { } public Criteria andLevelIsNull() { - addCriterion("level is null"); + addCriterion("`level` is null"); return (Criteria) this; } public Criteria andLevelIsNotNull() { - addCriterion("level is not null"); + addCriterion("`level` is not null"); return (Criteria) this; } public Criteria andLevelEqualTo(Integer value) { - addCriterion("level =", value, "level"); + addCriterion("`level` =", value, "level"); return (Criteria) this; } public Criteria andLevelNotEqualTo(Integer value) { - addCriterion("level <>", value, "level"); + addCriterion("`level` <>", value, "level"); return (Criteria) this; } public Criteria andLevelGreaterThan(Integer value) { - addCriterion("level >", value, "level"); + addCriterion("`level` >", value, "level"); return (Criteria) this; } public Criteria andLevelGreaterThanOrEqualTo(Integer value) { - addCriterion("level >=", value, "level"); + addCriterion("`level` >=", value, "level"); return (Criteria) this; } public Criteria andLevelLessThan(Integer value) { - addCriterion("level <", value, "level"); + addCriterion("`level` <", value, "level"); return (Criteria) this; } public Criteria andLevelLessThanOrEqualTo(Integer value) { - addCriterion("level <=", value, "level"); + addCriterion("`level` <=", value, "level"); return (Criteria) this; } public Criteria andLevelIn(List values) { - addCriterion("level in", values, "level"); + addCriterion("`level` in", values, "level"); return (Criteria) this; } public Criteria andLevelNotIn(List values) { - addCriterion("level not in", values, "level"); + addCriterion("`level` not in", values, "level"); return (Criteria) this; } public Criteria andLevelBetween(Integer value1, Integer value2) { - addCriterion("level between", value1, value2, "level"); + addCriterion("`level` between", value1, value2, "level"); return (Criteria) this; } public Criteria andLevelNotBetween(Integer value1, Integer value2) { - addCriterion("level not between", value1, value2, "level"); + addCriterion("`level` not between", value1, value2, "level"); return (Criteria) this; } diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestCase.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestCase.java index 962634cc1a..1957508b83 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestCase.java @@ -18,10 +18,6 @@ public class ApiTestCase implements Serializable { private String description; - private String request; - - private String response; - private String createUserId; private String updateUserId; diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestCaseExample.java index a6d6fc1ef1..4523cc9680 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestCaseExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestCaseExample.java @@ -159,11 +159,6 @@ public class ApiTestCaseExample { return (Criteria) this; } - public Criteria andModuleIdIn(List values) { - addCriterion("module_id in", values, "module_id"); - return (Criteria) this; - } - public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; @@ -194,12 +189,6 @@ public class ApiTestCaseExample { return (Criteria) this; } - public Criteria andApiDefinitionIdEqualTo(String value) { - addCriterion("api_definition_id =", value, "api_definition_id"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(String value) { addCriterion("project_id <>", value, "projectId"); return (Criteria) this; @@ -256,72 +245,212 @@ public class ApiTestCaseExample { } public Criteria andNameIsNull() { - addCriterion("name is null"); + addCriterion("`name` is null"); return (Criteria) this; } public Criteria andNameIsNotNull() { - addCriterion("name is not null"); + addCriterion("`name` is not null"); return (Criteria) this; } public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); + addCriterion("`name` =", value, "name"); return (Criteria) this; } public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); + addCriterion("`name` <>", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); + addCriterion("`name` >", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); + addCriterion("`name` >=", value, "name"); return (Criteria) this; } public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); + addCriterion("`name` <", value, "name"); return (Criteria) this; } public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); + addCriterion("`name` <=", value, "name"); return (Criteria) this; } public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); + addCriterion("`name` like", value, "name"); return (Criteria) this; } public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); + addCriterion("`name` not like", value, "name"); return (Criteria) this; } public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); + addCriterion("`name` in", values, "name"); return (Criteria) this; } public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); + addCriterion("`name` not in", values, "name"); return (Criteria) this; } public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); + addCriterion("`name` between", value1, value2, "name"); return (Criteria) this; } public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPriorityIsNull() { + addCriterion("priority is null"); + return (Criteria) this; + } + + public Criteria andPriorityIsNotNull() { + addCriterion("priority is not null"); + return (Criteria) this; + } + + public Criteria andPriorityEqualTo(String value) { + addCriterion("priority =", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotEqualTo(String value) { + addCriterion("priority <>", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThan(String value) { + addCriterion("priority >", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThanOrEqualTo(String value) { + addCriterion("priority >=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThan(String value) { + addCriterion("priority <", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThanOrEqualTo(String value) { + addCriterion("priority <=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLike(String value) { + addCriterion("priority like", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotLike(String value) { + addCriterion("priority not like", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityIn(List values) { + addCriterion("priority in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotIn(List values) { + addCriterion("priority not in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityBetween(String value1, String value2) { + addCriterion("priority between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotBetween(String value1, String value2) { + addCriterion("priority not between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdIsNull() { + addCriterion("api_definition_id is null"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdIsNotNull() { + addCriterion("api_definition_id is not null"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdEqualTo(String value) { + addCriterion("api_definition_id =", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdNotEqualTo(String value) { + addCriterion("api_definition_id <>", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdGreaterThan(String value) { + addCriterion("api_definition_id >", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdGreaterThanOrEqualTo(String value) { + addCriterion("api_definition_id >=", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdLessThan(String value) { + addCriterion("api_definition_id <", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdLessThanOrEqualTo(String value) { + addCriterion("api_definition_id <=", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdLike(String value) { + addCriterion("api_definition_id like", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdNotLike(String value) { + addCriterion("api_definition_id not like", value, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdIn(List values) { + addCriterion("api_definition_id in", values, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdNotIn(List values) { + addCriterion("api_definition_id not in", values, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdBetween(String value1, String value2) { + addCriterion("api_definition_id between", value1, value2, "apiDefinitionId"); + return (Criteria) this; + } + + public Criteria andApiDefinitionIdNotBetween(String value1, String value2) { + addCriterion("api_definition_id not between", value1, value2, "apiDefinitionId"); return (Criteria) this; } @@ -395,143 +524,143 @@ public class ApiTestCaseExample { return (Criteria) this; } - public Criteria andStatusIsNull() { - addCriterion("status is null"); + public Criteria andCreateUserIdIsNull() { + addCriterion("create_user_id is null"); return (Criteria) this; } - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); + public Criteria andCreateUserIdIsNotNull() { + addCriterion("create_user_id is not null"); return (Criteria) this; } - public Criteria andStatusEqualTo(String value) { - addCriterion("status =", value, "status"); + public Criteria andCreateUserIdEqualTo(String value) { + addCriterion("create_user_id =", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusNotEqualTo(String value) { - addCriterion("status <>", value, "status"); + public Criteria andCreateUserIdNotEqualTo(String value) { + addCriterion("create_user_id <>", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusGreaterThan(String value) { - addCriterion("status >", value, "status"); + public Criteria andCreateUserIdGreaterThan(String value) { + addCriterion("create_user_id >", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusGreaterThanOrEqualTo(String value) { - addCriterion("status >=", value, "status"); + public Criteria andCreateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("create_user_id >=", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusLessThan(String value) { - addCriterion("status <", value, "status"); + public Criteria andCreateUserIdLessThan(String value) { + addCriterion("create_user_id <", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusLessThanOrEqualTo(String value) { - addCriterion("status <=", value, "status"); + public Criteria andCreateUserIdLessThanOrEqualTo(String value) { + addCriterion("create_user_id <=", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusLike(String value) { - addCriterion("status like", value, "status"); + public Criteria andCreateUserIdLike(String value) { + addCriterion("create_user_id like", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusNotLike(String value) { - addCriterion("status not like", value, "status"); + public Criteria andCreateUserIdNotLike(String value) { + addCriterion("create_user_id not like", value, "createUserId"); return (Criteria) this; } - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); + public Criteria andCreateUserIdIn(List values) { + addCriterion("create_user_id in", values, "createUserId"); return (Criteria) this; } - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("create_user_id not in", values, "createUserId"); return (Criteria) this; } - public Criteria andStatusBetween(String value1, String value2) { - addCriterion("status between", value1, value2, "status"); + public Criteria andCreateUserIdBetween(String value1, String value2) { + addCriterion("create_user_id between", value1, value2, "createUserId"); return (Criteria) this; } - public Criteria andStatusNotBetween(String value1, String value2) { - addCriterion("status not between", value1, value2, "status"); + public Criteria andCreateUserIdNotBetween(String value1, String value2) { + addCriterion("create_user_id not between", value1, value2, "createUserId"); return (Criteria) this; } - public Criteria andUserIdIsNull() { - addCriterion("user_id is null"); + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); return (Criteria) this; } - public Criteria andUserIdIsNotNull() { - addCriterion("user_id is not null"); + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); return (Criteria) this; } - public Criteria andUserIdEqualTo(String value) { - addCriterion("user_id =", value, "userId"); + public Criteria andUpdateUserIdEqualTo(String value) { + addCriterion("update_user_id =", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdNotEqualTo(String value) { - addCriterion("user_id <>", value, "userId"); + public Criteria andUpdateUserIdNotEqualTo(String value) { + addCriterion("update_user_id <>", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdGreaterThan(String value) { - addCriterion("user_id >", value, "userId"); + public Criteria andUpdateUserIdGreaterThan(String value) { + addCriterion("update_user_id >", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdGreaterThanOrEqualTo(String value) { - addCriterion("user_id >=", value, "userId"); + public Criteria andUpdateUserIdGreaterThanOrEqualTo(String value) { + addCriterion("update_user_id >=", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdLessThan(String value) { - addCriterion("user_id <", value, "userId"); + public Criteria andUpdateUserIdLessThan(String value) { + addCriterion("update_user_id <", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdLessThanOrEqualTo(String value) { - addCriterion("user_id <=", value, "userId"); + public Criteria andUpdateUserIdLessThanOrEqualTo(String value) { + addCriterion("update_user_id <=", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdLike(String value) { - addCriterion("user_id like", value, "userId"); + public Criteria andUpdateUserIdLike(String value) { + addCriterion("update_user_id like", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdNotLike(String value) { - addCriterion("user_id not like", value, "userId"); + public Criteria andUpdateUserIdNotLike(String value) { + addCriterion("update_user_id not like", value, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdIn(List values) { - addCriterion("user_id in", values, "userId"); + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdNotIn(List values) { - addCriterion("user_id not in", values, "userId"); + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdBetween(String value1, String value2) { - addCriterion("user_id between", value1, value2, "userId"); + public Criteria andUpdateUserIdBetween(String value1, String value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); return (Criteria) this; } - public Criteria andUserIdNotBetween(String value1, String value2) { - addCriterion("user_id not between", value1, value2, "userId"); + public Criteria andUpdateUserIdNotBetween(String value1, String value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); return (Criteria) this; } diff --git a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java index 286452e5ed..56a1d14d7a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java +++ b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class MessageTask implements Serializable { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java index 259c9cec55..7e4d7c5a93 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java @@ -1,15 +1,37 @@ package io.metersphere.base.mapper; import io.metersphere.base.domain.ApiDefinitionExecResult; +import io.metersphere.base.domain.ApiDefinitionExecResultExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; public interface ApiDefinitionExecResultMapper { + long countByExample(ApiDefinitionExecResultExample example); - int deleteByResourceId(String id); + int deleteByExample(ApiDefinitionExecResultExample example); + + int deleteByPrimaryKey(String id); int insert(ApiDefinitionExecResult record); - ApiDefinitionExecResult selectByResourceId(String resourceId); + int insertSelective(ApiDefinitionExecResult record); + + List selectByExampleWithBLOBs(ApiDefinitionExecResultExample example); + + List selectByExample(ApiDefinitionExecResultExample example); ApiDefinitionExecResult selectByPrimaryKey(String id); + int updateByExampleSelective(@Param("record") ApiDefinitionExecResult record, @Param("example") ApiDefinitionExecResultExample example); + + int updateByExampleWithBLOBs(@Param("record") ApiDefinitionExecResult record, @Param("example") ApiDefinitionExecResultExample example); + + int updateByExample(@Param("record") ApiDefinitionExecResult record, @Param("example") ApiDefinitionExecResultExample example); + + int updateByPrimaryKeySelective(ApiDefinitionExecResult record); + + int updateByPrimaryKeyWithBLOBs(ApiDefinitionExecResult record); + + int updateByPrimaryKey(ApiDefinitionExecResult record); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml index 92d1cc3075..c5b0ca6ec4 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml @@ -1,27 +1,304 @@ - - - delete from api_definition_exec_result where resource_id = #{id,jdbcType=VARCHAR} - - - - insert into api_definition_exec_result - (id, resource_id,name,content, status, user_id, start_time, end_time) - values - (#{id,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}, #{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, - #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}) - - - - - - + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, resource_id, `status`, user_id, start_time, end_time + + + content + + + + + + delete from api_definition_exec_result + where id = #{id,jdbcType=VARCHAR} + + + delete from api_definition_exec_result + + + + + + insert into api_definition_exec_result (id, `name`, resource_id, + `status`, user_id, start_time, + end_time, content) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, + #{endTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}) + + + insert into api_definition_exec_result + + + id, + + + `name`, + + + resource_id, + + + `status`, + + + user_id, + + + start_time, + + + end_time, + + + content, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{resourceId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update api_definition_exec_result + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update api_definition_exec_result + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update api_definition_exec_result + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT} + + + + + + update api_definition_exec_result + + + `name` = #{name,jdbcType=VARCHAR}, + + + resource_id = #{resourceId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_definition_exec_result + set `name` = #{name,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update api_definition_exec_result + set `name` = #{name,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.java deleted file mode 100644 index 017e5cb0df..0000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.metersphere.base.mapper; - -import io.metersphere.base.domain.ApiDefinitionHistory; - -import java.util.List; - -public interface ApiDefinitionHistoryMapper { - - int deleteByApiDefinitionId(String id); - - int insert(ApiDefinitionHistory record); - - List selectByApiDefinitionId(String id); - -} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.xml deleted file mode 100644 index 453b4e53ae..0000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionHistoryMapper.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - delete from api_definition_history where api_definition_id = #{id,jdbcType=VARCHAR} - - - - insert into api_definition_history - (id, api_definition_id,content, user_id, create_time, update_time) - values - (#{id,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) - - - - - \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.java index 8fbc57deb3..39ffaa1c22 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.java @@ -1,42 +1,38 @@ package io.metersphere.base.mapper; -import io.metersphere.api.dto.definition.ApiComputeResult; -import io.metersphere.api.dto.definition.ApiDefinitionRequest; -import io.metersphere.api.dto.definition.ApiDefinitionResult; import io.metersphere.base.domain.ApiDefinition; import io.metersphere.base.domain.ApiDefinitionExample; +import io.metersphere.base.domain.ApiDefinitionWithBLOBs; import org.apache.ibatis.annotations.Param; import java.util.List; public interface ApiDefinitionMapper { - - List list(@Param("request") ApiDefinitionRequest request); - - List selectByIds(@Param("ids") List ids); - long countByExample(ApiDefinitionExample example); int deleteByExample(ApiDefinitionExample example); int deleteByPrimaryKey(String id); - int insert(ApiDefinition record); + int insert(ApiDefinitionWithBLOBs record); + int insertSelective(ApiDefinitionWithBLOBs record); - List selectByExampleWithBLOBs(ApiDefinitionExample example); + List selectByExampleWithBLOBs(ApiDefinitionExample example); List selectByExample(ApiDefinitionExample example); - ApiDefinition selectByPrimaryKey(String id); + ApiDefinitionWithBLOBs selectByPrimaryKey(String id); + int updateByExampleSelective(@Param("record") ApiDefinitionWithBLOBs record, @Param("example") ApiDefinitionExample example); - int updateByPrimaryKeySelective(ApiDefinition record); + int updateByExampleWithBLOBs(@Param("record") ApiDefinitionWithBLOBs record, @Param("example") ApiDefinitionExample example); - int updateByPrimaryKeyWithBLOBs(ApiDefinition record); + int updateByExample(@Param("record") ApiDefinition record, @Param("example") ApiDefinitionExample example); + + int updateByPrimaryKeySelective(ApiDefinitionWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(ApiDefinitionWithBLOBs record); int updateByPrimaryKey(ApiDefinition record); - - int removeToGc(@Param("ids") List ids); - } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml index 4ab05ab297..dc4d946fe7 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml @@ -1,417 +1,462 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, project_id, name,module_id,module_path,protocol ,path,method ,description, status, user_id, create_time, update_time + + + + - - request - - - - - - - - - and api_definition.name - - - - - - and api_definition.update_time - - - - - - and project.name - - - - - - and api_definition.create_time - - - - - - and api_definition.status - - - - - - and api_definition.user_id - - - - - - - - - - like CONCAT('%', #{${object}.value},'%') - - - not like CONCAT('%', #{${object}.value},'%') - - - in - - #{v} - - - - not in - - #{v} - - - - between #{${object}.value[0]} and #{${object}.value[1]} - - - > #{${object}.value} - - - < #{${object}.value} - - - >= #{${object}.value} - - - <= #{${object}.value} - - - = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' - - - = #{${object}.value} - - - - - - - - - - + + + + + id, project_id, `name`, `method`, module_path, description, environment_id, schedule, + `status`, module_id, user_id, create_time, update_time, protocol, `path` + + + request, response + + + + + delete from api_definition where id = #{id,jdbcType=VARCHAR} - - - delete from api_definition - - - - - - - insert into api_definition (id, project_id, name, protocol,path,module_id,module_path,method, - description, status, user_id,create_time, update_time, request,response,environment_id ) - values - (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},#{path,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},#{modulePath,jdbcType=VARCHAR},#{method,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{request,jdbcType=LONGVARCHAR},#{response,jdbcType=LONGVARCHAR},#{environmentId,jdbcType=VARCHAR} - ) - - - - - - update api_definition - - - project_id = #{projectId,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - - module_id = #{moduleId,jdbcType=VARCHAR}, - - - protocol = #{protocol,jdbcType=VARCHAR}, - - - path = #{path,jdbcType=VARCHAR}, - - - method = #{method,jdbcType=VARCHAR}, - - - module_path = #{modulePath,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=VARCHAR}, - - - user_id = #{userId,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - update_time = #{updateTime,jdbcType=BIGINT}, - - - request = #{request,jdbcType=LONGVARCHAR}, - - - response = #{response,jdbcType=LONGVARCHAR}, - - - environment_id = #{environmentId,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=VARCHAR} - - - update api_definition - set project_id = #{projectId,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - status = #{status,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=VARCHAR}, - module_id = #{moduleId,jdbcType=VARCHAR}, - module_path = #{modulePath,jdbcType=VARCHAR}, - protocol = #{protocol,jdbcType=VARCHAR}, - path = #{path,jdbcType=VARCHAR}, - method = #{method,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - request = #{request,jdbcType=LONGVARCHAR}, - response = #{response,jdbcType=LONGVARCHAR}, - environment_id = #{environmentId,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} + + delete from api_definition + + + + + + insert into api_definition (id, project_id, `name`, + `method`, module_path, description, + environment_id, schedule, `status`, + module_id, user_id, create_time, + update_time, protocol, `path`, + request, response) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{environmentId,jdbcType=VARCHAR}, #{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{moduleId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, + #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}) + + + insert into api_definition + + + id, + + + project_id, + + + `name`, + + + `method`, + + + module_path, + + + description, + + + environment_id, + + + schedule, + + + `status`, + + + module_id, + + + user_id, + + + create_time, + + + update_time, + + + protocol, + + + `path`, + + + request, + + + response, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{method,jdbcType=VARCHAR}, + + + #{modulePath,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{environmentId,jdbcType=VARCHAR}, + + + #{schedule,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{moduleId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{protocol,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{request,jdbcType=LONGVARCHAR}, + + + #{response,jdbcType=LONGVARCHAR}, + + + + + + update api_definition + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `method` = #{record.method,jdbcType=VARCHAR}, + + + module_path = #{record.modulePath,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + + + schedule = #{record.schedule,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + module_id = #{record.moduleId,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + protocol = #{record.protocol,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + request = #{record.request,jdbcType=LONGVARCHAR}, + + + response = #{record.response,jdbcType=LONGVARCHAR}, + + + + + - - update api_definition - set project_id = #{projectId,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - module_id = #{moduleId,jdbcType=VARCHAR}, - protocol = #{protocol,jdbcType=VARCHAR}, - path = #{path,jdbcType=VARCHAR}, - module_path = #{modulePath,jdbcType=VARCHAR}, - method = #{method,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - status = #{status,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT} - where id = #{id,jdbcType=VARCHAR} + + update api_definition + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `method` = #{record.method,jdbcType=VARCHAR}, + module_path = #{record.modulePath,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + schedule = #{record.schedule,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, + request = #{record.request,jdbcType=LONGVARCHAR}, + response = #{record.response,jdbcType=LONGVARCHAR} + + + + + + update api_definition + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `method` = #{record.method,jdbcType=VARCHAR}, + module_path = #{record.modulePath,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + schedule = #{record.schedule,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR} + + + + + + update api_definition + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + `method` = #{method,jdbcType=VARCHAR}, + + + module_path = #{modulePath,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + environment_id = #{environmentId,jdbcType=VARCHAR}, + + + schedule = #{schedule,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + module_id = #{moduleId,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + protocol = #{protocol,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + request = #{request,jdbcType=LONGVARCHAR}, + + + response = #{response,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_definition + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + module_path = #{modulePath,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + schedule = #{schedule,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + protocol = #{protocol,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, + request = #{request,jdbcType=LONGVARCHAR}, + response = #{response,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update api_definition + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + module_path = #{modulePath,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + schedule = #{schedule,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + protocol = #{protocol,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} - - - update api_definition - set - status = 'Trash' - where id in - - #{v} - - \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.java index 65000c3129..34007517af 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.java @@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Param; import java.util.List; public interface ApiModuleMapper { - long countByExample(ApiModuleExample example); int deleteByExample(ApiModuleExample example); @@ -16,8 +15,6 @@ public interface ApiModuleMapper { int insert(ApiModule record); - int insertBatch(@Param("records") List records); - int insertSelective(ApiModule record); List selectByExample(ApiModuleExample example); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.xml index 8db13efb87..8c41d2bbab 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiModuleMapper.xml @@ -1,273 +1,258 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, project_id, name, parent_id, level, create_time, update_time + + + + - - - - delete from api_module - where id = #{id,jdbcType=VARCHAR} + + + + + id, project_id, `name`, protocol, parent_id, `level`, create_time, update_time + + + + + delete from api_module + where id = #{id,jdbcType=VARCHAR} - - delete from api_module - - - - - - - insert into api_module (id, project_id, name,protocol - parent_id, level, create_time, - update_time) - values - - (#{emp.id,jdbcType=VARCHAR}, #{emp.projectId,jdbcType=VARCHAR}, - #{emp.name,jdbcType=VARCHAR},#{emp.protocol,jdbcType=VARCHAR}, - #{emp.parentId,jdbcType=VARCHAR}, #{emp.level,jdbcType=INTEGER}, #{emp.createTime,jdbcType=BIGINT}, - #{emp.updateTime,jdbcType=BIGINT}) - - - - - insert into api_module (id, project_id, name,protocol - parent_id, level, create_time, - update_time) - values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR}, - #{parentId,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, - #{updateTime,jdbcType=BIGINT}) + + delete from api_module + + + + + + insert into api_module (id, project_id, `name`, + protocol, parent_id, `level`, + create_time, update_time) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{protocol,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) - - - insert into api_module - - - id, - - - project_id, - - - name, - - - protocol, - - - parent_id, - - - level, - - - create_time, - - - update_time, - - - - - #{id,jdbcType=VARCHAR}, - - - #{projectId,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{protocol,jdbcType=VARCHAR}, - - - #{parentId,jdbcType=VARCHAR}, - - - #{level,jdbcType=INTEGER}, - - - #{createTime,jdbcType=BIGINT}, - - - #{updateTime,jdbcType=BIGINT}, - - - - - - update api_module - - - id = #{record.id,jdbcType=VARCHAR}, - - - project_id = #{record.projectId,jdbcType=VARCHAR}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - protocol = #{record.protocol,jdbcType=VARCHAR}, - - - - parent_id = #{record.parentId,jdbcType=VARCHAR}, - - - level = #{record.level,jdbcType=INTEGER}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - update_time = #{record.updateTime,jdbcType=BIGINT}, - - - - - - - - update api_module - set id = #{record.id,jdbcType=VARCHAR}, + + insert into api_module + + + id, + + + project_id, + + + `name`, + + + protocol, + + + parent_id, + + + `level`, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{protocol,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{level,jdbcType=INTEGER}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update api_module + + + id = #{record.id,jdbcType=VARCHAR}, + + project_id = #{record.projectId,jdbcType=VARCHAR}, - name = #{record.name,jdbcType=VARCHAR}, - protocol = #{protocol,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + protocol = #{record.protocol,jdbcType=VARCHAR}, + + parent_id = #{record.parentId,jdbcType=VARCHAR}, - level = #{record.level,jdbcType=INTEGER}, + + + `level` = #{record.level,jdbcType=INTEGER}, + + create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT} - - - - - - update api_module - - - project_id = #{projectId,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - protocol = #{protocol,jdbcType=VARCHAR}, - - - - parent_id = #{parentId,jdbcType=VARCHAR}, - - - level = #{level,jdbcType=INTEGER}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - update_time = #{updateTime,jdbcType=BIGINT}, - - - where id = #{id,jdbcType=VARCHAR} - - - update api_module - set project_id = #{projectId,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - protocol = #{protocol,jdbcType=VARCHAR}, - parent_id = #{parentId,jdbcType=VARCHAR}, - level = #{level,jdbcType=INTEGER}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT} - where id = #{id,jdbcType=VARCHAR} + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update api_module + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, + `level` = #{record.level,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update api_module + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + protocol = #{protocol,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + `level` = #{level,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_module + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + `level` = #{level,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.java index 1287fa06c8..a4935f22a7 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.java @@ -1,32 +1,38 @@ package io.metersphere.base.mapper; -import io.metersphere.api.dto.definition.ApiTestCaseRequest; -import io.metersphere.api.dto.definition.ApiTestCaseResult; import io.metersphere.base.domain.ApiTestCase; import io.metersphere.base.domain.ApiTestCaseExample; +import io.metersphere.base.domain.ApiTestCaseWithBLOBs; import org.apache.ibatis.annotations.Param; import java.util.List; public interface ApiTestCaseMapper { - - List list(@Param("request") ApiTestCaseRequest request); - long countByExample(ApiTestCaseExample example); int deleteByExample(ApiTestCaseExample example); int deleteByPrimaryKey(String id); - int insert(ApiTestCase record); + int insert(ApiTestCaseWithBLOBs record); - List selectByExampleWithBLOBs(ApiTestCaseExample example); + int insertSelective(ApiTestCaseWithBLOBs record); + + List selectByExampleWithBLOBs(ApiTestCaseExample example); List selectByExample(ApiTestCaseExample example); - ApiTestCase selectByPrimaryKey(String id); + ApiTestCaseWithBLOBs selectByPrimaryKey(String id); - int updateByPrimaryKeySelective(ApiTestCase record); + int updateByExampleSelective(@Param("record") ApiTestCaseWithBLOBs record, @Param("example") ApiTestCaseExample example); + + int updateByExampleWithBLOBs(@Param("record") ApiTestCaseWithBLOBs record, @Param("example") ApiTestCaseExample example); + + int updateByExample(@Param("record") ApiTestCase record, @Param("example") ApiTestCaseExample example); + + int updateByPrimaryKeySelective(ApiTestCaseWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(ApiTestCaseWithBLOBs record); int updateByPrimaryKey(ApiTestCase record); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.xml index 8e9002107e..557b62a76e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiTestCaseMapper.xml @@ -1,281 +1,375 @@ - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, project_id, name,api_definition_id,priority,description, create_user_id, update_user_id, create_time, update_time + + + + - - request - - - - - - - like CONCAT('%', #{${object}.value},'%') - - - not like CONCAT('%', #{${object}.value},'%') - - - in - - #{v} - - - - not in - - #{v} - - - - between #{${object}.value[0]} and #{${object}.value[1]} - - - > #{${object}.value} - - - < #{${object}.value} - - - >= #{${object}.value} - - - <= #{${object}.value} - - - = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' - - - = #{${object}.value} - - - - - - - - - - - - delete from api_test_case where id = #{id,jdbcType=VARCHAR} - - - - delete from api_test_case - - - - - - - insert into api_test_case (id, project_id, name, priority,api_definition_id,description, create_user_id, update_user_id, - create_time, update_time, request,response + + + + + id, project_id, `name`, priority, api_definition_id, description, create_user_id, + update_user_id, create_time, update_time + + + request, response + + + + + + delete from api_test_case + where id = #{id,jdbcType=VARCHAR} + + + delete from api_test_case + + + + + + insert into api_test_case (id, project_id, `name`, + priority, api_definition_id, description, + create_user_id, update_user_id, create_time, + update_time, request, response + ) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR} ) - values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR},#{description,jdbcType=VARCHAR}, - #{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}) - - - - - update api_test_case - - - project_id = #{projectId,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - - api_definition_id = #{apiDefinitionId,jdbcType=BIGINT}, - - - priority = #{priority,jdbcType=LONGVARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - update_user_id = #{updateUserId,jdbcType=VARCHAR}, - - - update_time = #{updateTime,jdbcType=BIGINT}, - - - request = #{request,jdbcType=LONGVARCHAR}, - - - response = #{response,jdbcType=LONGVARCHAR}, - - - - where id = #{id,jdbcType=VARCHAR} - - - - update api_test_case - set project_id = #{projectId,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR}, - priority = #{priority,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - update_user_id = #{updateUserId,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=BIGINT} - where id = #{id,jdbcType=VARCHAR} + + insert into api_test_case + + + id, + + + project_id, + + + `name`, + + + priority, + + + api_definition_id, + + + description, + + + create_user_id, + + + update_user_id, + + + create_time, + + + update_time, + + + request, + + + response, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{priority,jdbcType=VARCHAR}, + + + #{apiDefinitionId,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createUserId,jdbcType=VARCHAR}, + + + #{updateUserId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{request,jdbcType=LONGVARCHAR}, + + + #{response,jdbcType=LONGVARCHAR}, + + + + + + update api_test_case + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + priority = #{record.priority,jdbcType=VARCHAR}, + + + api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_user_id = #{record.createUserId,jdbcType=VARCHAR}, + + + update_user_id = #{record.updateUserId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + request = #{record.request,jdbcType=LONGVARCHAR}, + + + response = #{record.response,jdbcType=LONGVARCHAR}, + + + + + + + + update api_test_case + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + priority = #{record.priority,jdbcType=VARCHAR}, + api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_user_id = #{record.createUserId,jdbcType=VARCHAR}, + update_user_id = #{record.updateUserId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + request = #{record.request,jdbcType=LONGVARCHAR}, + response = #{record.response,jdbcType=LONGVARCHAR} + + + + + + update api_test_case + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + priority = #{record.priority,jdbcType=VARCHAR}, + api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_user_id = #{record.createUserId,jdbcType=VARCHAR}, + update_user_id = #{record.updateUserId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update api_test_case + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + priority = #{priority,jdbcType=VARCHAR}, + + + api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_user_id = #{createUserId,jdbcType=VARCHAR}, + + + update_user_id = #{updateUserId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + request = #{request,jdbcType=LONGVARCHAR}, + + + response = #{response,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_test_case + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + priority = #{priority,jdbcType=VARCHAR}, + api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_user_id = #{createUserId,jdbcType=VARCHAR}, + update_user_id = #{updateUserId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + request = #{request,jdbcType=LONGVARCHAR}, + response = #{response,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update api_test_case + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + priority = #{priority,jdbcType=VARCHAR}, + api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_user_id = #{createUserId,jdbcType=VARCHAR}, + update_user_id = #{updateUserId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java new file mode 100644 index 0000000000..e9a480815b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java @@ -0,0 +1,12 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.base.domain.ApiDefinitionExecResult; + +public interface ExtApiDefinitionExecResultMapper { + + void deleteByResourceId(String id); + + ApiDefinitionExecResult selectByResourceId(String resourceId); + + +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml new file mode 100644 index 0000000000..8031d82c59 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -0,0 +1,12 @@ + + + + + delete from api_definition_exec_result where resource_id = #{id,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java new file mode 100644 index 0000000000..320d5b4664 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java @@ -0,0 +1,18 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.api.dto.definition.ApiComputeResult; +import io.metersphere.api.dto.definition.ApiDefinitionRequest; +import io.metersphere.api.dto.definition.ApiDefinitionResult; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtApiDefinitionMapper { + + List list(@Param("request") ApiDefinitionRequest request); + + List selectByIds(@Param("ids") List ids); + + int removeToGc(@Param("ids") List ids); + +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml new file mode 100644 index 0000000000..ab5b4dac15 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name,module_id,module_path,protocol ,path,method ,description, status, user_id, create_time, update_time + + + request + + + + + + + and api_definition.name + + + + + + and api_definition.update_time + + + + + + and project.name + + + + + + and api_definition.create_time + + + + + + and api_definition.status + + + + + + and api_definition.user_id + + + + + + + + + + like CONCAT('%', #{${object}.value},'%') + + + not like CONCAT('%', #{${object}.value},'%') + + + in + + #{v} + + + + not in + + #{v} + + + + between #{${object}.value[0]} and #{${object}.value[1]} + + + > #{${object}.value} + + + < #{${object}.value} + + + >= #{${object}.value} + + + <= #{${object}.value} + + + = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' + + + = #{${object}.value} + + + + + + + + update api_definition + set + status = 'Trash' + where id in + + #{v} + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.java new file mode 100644 index 0000000000..4da2a52de5 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.java @@ -0,0 +1,10 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.base.domain.ApiModule; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtApiModuleMapper { + int insertBatch(@Param("records") List records); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.xml new file mode 100644 index 0000000000..d689eb7421 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiModuleMapper.xml @@ -0,0 +1,16 @@ + + + + + insert into api_module (id, project_id, name,protocol + parent_id, level, create_time, + update_time) + values + + (#{emp.id,jdbcType=VARCHAR}, #{emp.projectId,jdbcType=VARCHAR}, + #{emp.name,jdbcType=VARCHAR},#{emp.protocol,jdbcType=VARCHAR}, + #{emp.parentId,jdbcType=VARCHAR}, #{emp.level,jdbcType=INTEGER}, #{emp.createTime,jdbcType=BIGINT}, + #{emp.updateTime,jdbcType=BIGINT}) + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java new file mode 100644 index 0000000000..83e229ac0b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java @@ -0,0 +1,12 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.api.dto.definition.ApiTestCaseRequest; +import io.metersphere.api.dto.definition.ApiTestCaseResult; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtApiTestCaseMapper { + + List list(@Param("request") ApiTestCaseRequest request); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml new file mode 100644 index 0000000000..88c90a3119 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name,api_definition_id,priority,description, create_user_id, update_user_id, create_time, update_time + + + request + + + + + + + like CONCAT('%', #{${object}.value},'%') + + + not like CONCAT('%', #{${object}.value},'%') + + + in + + #{v} + + + + not in + + #{v} + + + + between #{${object}.value[0]} and #{${object}.value[1]} + + + > #{${object}.value} + + + < #{${object}.value} + + + >= #{${object}.value} + + + <= #{${object}.value} + + + = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' + + + = #{${object}.value} + + + + + + + \ No newline at end of file diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 13240103dc..23e18d195d 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -31,6 +31,8 @@ :current-module="currentModule" @editApi="editApi" @handleCase="handleCase" + :visible="visible" + :currentRow="currentRow" ref="apiList"/> @@ -86,7 +88,7 @@ import {downloadFile, getCurrentUser, getUUID} from "@/common/js/utils"; export default { - name: "TestCase", + name: "ApiDefinition", components: { MsNodeTree, MsApiList, @@ -103,7 +105,15 @@ MsRunTestSqlPage, MsRunTestDubboPage }, - comments: {}, + props: { + visible: { + type: Boolean, + default: false, + }, + currentRow: { + type: Object, + } + }, data() { return { isHide: true, diff --git a/frontend/src/business/components/api/definition/components/ApiCaseList.vue b/frontend/src/business/components/api/definition/components/ApiCaseList.vue index aba85bd27e..543d5fe579 100644 --- a/frontend/src/business/components/api/definition/components/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/ApiCaseList.vue @@ -82,6 +82,10 @@
+ + + +
{{index+1}}
@@ -119,7 +123,7 @@ circle/> - +
{{getResult(item.execResult)}}
{{item.updateTime | timestampFormatDate }} @@ -186,9 +190,14 @@ api: { type: Object }, + visible: { + type: Boolean, + default: false, + }, loaded: Boolean, currentProject: {}, refreshSign: String, + currentRow: Object, }, data() { return { @@ -204,18 +213,29 @@ loading: false, runData: [], reportId: "", + checkedCases: new Set(), + } }, watch: { // 初始化 api() { + if (this.currentRow) { + this.currentRow.cases = []; + } this.getApiTest(); }, currentProject() { + if (this.currentRow) { + this.currentRow.cases = []; + } this.getEnvironments(); }, refreshSign() { + if (this.currentRow) { + this.currentRow.cases = []; + } this.getApiTest(); } }, @@ -439,6 +459,16 @@ this.$emit('selectTestCase', item); } + }, + caseChecked(row) { + row.type = "CASE"; + if (this.checkedCases.has(row)) { + this.checkedCases.delete(row); + } else { + this.checkedCases.add(row) + } + let arr = Array.from(this.checkedCases); + this.currentRow.cases = arr; } } } diff --git a/frontend/src/business/components/api/definition/components/ApiList.vue b/frontend/src/business/components/api/definition/components/ApiList.vue index 2db3496969..737163f85d 100644 --- a/frontend/src/business/components/api/definition/components/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/ApiList.vue @@ -86,7 +86,7 @@
- +
@@ -142,7 +142,14 @@ props: { currentProject: Object, currentProtocol: String, - currentModule: Object + currentModule: Object, + visible: { + type: Boolean, + default: false, + }, + currentRow: { + type: Object, + } }, created: function () { this.initApiTable(); @@ -190,6 +197,7 @@ }); }, handleSelect(selection, row) { + row.type = "API"; if (this.selectRows.has(row)) { this.$set(row, "showMore", false); this.selectRows.delete(row); @@ -199,7 +207,7 @@ } let arr = Array.from(this.selectRows); - + this.currentRow.apis = arr; // 选中1个以上的用例时显示更多操作 if (this.selectRows.size === 1) { this.$set(arr[0], "showMore", false); @@ -212,9 +220,11 @@ handleSelectAll(selection) { if (selection.length > 0) { if (selection.length === 1) { + selection.type = "API"; this.selectRows.add(selection[0]); } else { this.tableData.forEach(item => { + item.type = "API"; this.$set(item, "showMore", true); this.selectRows.add(item); }); @@ -225,6 +235,8 @@ this.$set(row, "showMore", false); }) } + let arr = Array.from(this.selectRows); + this.currentRow.apis = arr; }, search() { this.initApiTable(); diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue index edc6c07058..6d78a8ec24 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue @@ -1,64 +1,66 @@ @@ -88,6 +90,10 @@ props: { assertions: {}, request: {}, + customizeStyle: { + type:String, + default: "margin-top: 10px" + }, scenario: Scenario, isReadOnly: { type: Boolean, diff --git a/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue b/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue index 6c8dffcdeb..12fbd0720a 100644 --- a/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue +++ b/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue @@ -1,32 +1,33 @@ @@ -46,6 +47,10 @@ props: { extract: {}, + customizeStyle: { + type: String, + default: "margin-top: 10px" + }, isReadOnly: { type: Boolean, default: false diff --git a/frontend/src/business/components/api/definition/model/ApiTestModel.js b/frontend/src/business/components/api/definition/model/ApiTestModel.js index 3e88ae1064..c9651e27b3 100644 --- a/frontend/src/business/components/api/definition/model/ApiTestModel.js +++ b/frontend/src/business/components/api/definition/model/ApiTestModel.js @@ -830,6 +830,7 @@ export class BeanShellProcessor extends BaseConfig { export class JSR223Processor extends BaseConfig { constructor(options) { super(); + this.type = "JSR223Processor"; this.script = undefined; this.language = "beanshell"; this.set(options); @@ -975,6 +976,7 @@ export class Controller extends BaseConfig { export class IfController extends Controller { constructor(options = {}) { super(Controller.TYPES.IF_CONTROLLER, options); + this.type = "IfController"; this.variable; this.operator; this.value; @@ -1017,7 +1019,7 @@ export class ConstantTimer extends Timer { constructor(options = {}) { super(Timer.TYPES.CONSTANT_TIMER, options); this.delay; - + this.type = "ConstantTimer"; this.set(options); } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 4c7db949c9..4106b055b7 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -526,9 +526,23 @@ export default { post_script: "Postscript", extract_param: "Extract parameters", add_module: "Add module", - } }, + automation: { + follow_people: "Follow people", + create_tag: "Create tag", + scenario_step: "Scenario step", + step_total: "Step total", + scenario_total: "Scene public parameters", + api_list_import: "Interface list import", + external_import: "External import", + wait_controller: "Waiting for controller", + if_controller: "Condition controller", + scenario_import: "Scene import", + customize_script: "Custom script", + customize_req: "Custom request", + reference_info: "Please select interface or use case", + }, environment: { name: "Environment Name", socket: "Socket", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index fcd9ca2fb5..4aeddc81c5 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -527,9 +527,23 @@ export default { post_script: "后置脚本", extract_param: "提取参数", add_module: "创建模块", - } }, + automation: { + follow_people: "关注人", + create_tag: "创建Tag", + scenario_step: "场景步骤", + step_total: "步骤总数", + scenario_total: "场景公共参数", + api_list_import: "接口列表导入", + external_import: "外部导入", + wait_controller: "等待控制器", + if_controller: "条件控制器", + scenario_import: "场景导入", + customize_script: "自定义脚本", + customize_req: "自定义请求", + reference_info: "请选择接口或用例" + }, environment: { name: "环境名称", socket: "环境域名", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index f346937596..b2881be604 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -529,6 +529,22 @@ export default { add_module: "創建模塊", } }, + automation: { + follow_people: "關註人", + create_tag: "創建Tag", + scenario_step: "場景步驟", + step_total: "步驟總數", + scenario_total: "場景公共參數", + api_list_import: "接口列表導入", + external_import: "外部導入", + wait_controller: "等待控制器", + if_controller: "條件控制器", + scenario_import: "場景導入", + customize_script: "自定義腳本", + customize_req: "自定義請求", + reference_info: "請選擇接口或用例" + + }, environment: { name: "環境名稱", socket: "環境域名",