diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java index 0fde847e07..e5f05b7805 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java @@ -2,6 +2,7 @@ package io.metersphere.api.parse; import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.definition.ApiDefinitionResult; +import io.metersphere.api.dto.definition.ApiModuleDTO; import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy; import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.KeyValue; @@ -11,6 +12,8 @@ import io.metersphere.api.dto.scenario.request.RequestType; import io.metersphere.api.service.ApiModuleService; import io.metersphere.base.domain.ApiModule; import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.utils.BeanUtils; +import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.LogUtil; import io.metersphere.commons.utils.SessionUtils; import org.apache.commons.collections.CollectionUtils; @@ -60,6 +63,32 @@ public abstract class ApiImportAbstractParser implements ApiImportParser { } } + protected ApiModule getSelectModule(String moduleId) { + apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); + if (StringUtils.isNotBlank(moduleId)) { + ApiModule module = new ApiModule(); + ApiModuleDTO moduleDTO = apiModuleService.getNode(moduleId); + BeanUtils.copyBean(module, moduleDTO); + return module; + } + return null; + } + + protected ApiModule buildModule(ApiModule parentModule, String name, boolean isSaved) { + apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); + ApiModule module; + if (parentModule != null) { + module = apiModuleService.getNewModule(name, this.projectId, parentModule.getLevel() + 1); + module.setParentId(parentModule.getId()); + } else { + module = apiModuleService.getNewModule(name, this.projectId, 1); + } + if (isSaved) { + createModule(module); + } + return module; + } + protected void createModule(ApiModule module) { module.setProtocol(RequestType.HTTP); List apiModules = apiModuleService.selectSameModule(module); diff --git a/backend/src/main/java/io/metersphere/api/parse/MsParser.java b/backend/src/main/java/io/metersphere/api/parse/MsParser.java index 512965d760..0838445d12 100644 --- a/backend/src/main/java/io/metersphere/api/parse/MsParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/MsParser.java @@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.parser.Feature; import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.definition.ApiDefinitionResult; +import io.metersphere.api.dto.definition.ApiModuleDTO; import io.metersphere.api.dto.definition.parse.ApiDefinitionImport; import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy; import io.metersphere.api.dto.scenario.Body; @@ -31,7 +32,7 @@ public class MsParser extends ApiImportAbstractParser { if (testObject.get("projectName") != null) { return parseMsFormat(testStr, request); } else { - return parsePluginFormat(testObject, request.isSaved()); + return parsePluginFormat(testObject, request); } } @@ -44,7 +45,7 @@ public class MsParser extends ApiImportAbstractParser { if (StringUtils.isBlank(apiDefinition.getModulePath())) { apiDefinition.setModuleId(null); } - parseModule(apiDefinition, importRequest.isSaved()); + parseModule(apiDefinition, importRequest); apiDefinition.setId(id); apiDefinition.setProjectId(this.projectId); String request = apiDefinition.getRequest(); @@ -55,16 +56,16 @@ public class MsParser extends ApiImportAbstractParser { return apiDefinitionImport; } - private ApiDefinitionImport parsePluginFormat(JSONObject testObject, boolean isSaved) { + private ApiDefinitionImport parsePluginFormat(JSONObject testObject, ApiTestImportRequest importRequest) { List results = new ArrayList<>(); ApiDefinitionImport apiImport = new ApiDefinitionImport(); apiImport.setProtocol(RequestType.HTTP); apiImport.setData(results); testObject.keySet().forEach(tag -> { - ApiModule module = apiModuleService.getNewModule(tag, this.projectId, 1); - if (isSaved) { - createModule(module); - } + + ApiModule parentModule = getSelectModule(importRequest.getModuleId()); + ApiModule module = buildModule(parentModule, tag, importRequest.isSaved()); + JSONObject requests = testObject.getJSONObject(tag); requests.keySet().forEach(requestName -> { @@ -125,7 +126,7 @@ public class MsParser extends ApiImportAbstractParser { } - private void parseModule(ApiDefinitionResult apiDefinition, Boolean isSaved) { + private void parseModule(ApiDefinitionResult apiDefinition, ApiTestImportRequest importRequest) { String modulePath = apiDefinition.getModulePath(); if (StringUtils.isBlank(modulePath)) { return; @@ -137,29 +138,14 @@ public class MsParser extends ApiImportAbstractParser { modulePath = modulePath.substring(0, modulePath.length() - 1); } List modules = Arrays.asList(modulePath.split("/")); - ApiModule parent = null; + ApiModule parent = getSelectModule(importRequest.getModuleId()); Iterator iterator = modules.iterator(); while (iterator.hasNext()) { String item = iterator.next(); - parent = buildModule(item, parent, isSaved); + parent = buildModule(parent, item, importRequest.isSaved()); if (!iterator.hasNext()) { apiDefinition.setModuleId(parent.getId()); } } } - - private ApiModule buildModule(String name, ApiModule parentModule, boolean isSaved) { - apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); - ApiModule module; - if (parentModule != null) { - module = apiModuleService.getNewModule(name, this.projectId, parentModule.getLevel() + 1); - module.setParentId(parentModule.getId()); - } else { - module = apiModuleService.getNewModule(name, this.projectId, 1); - } - if (isSaved) { - createModule(module); - } - return module; - } } diff --git a/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java b/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java index 9809326b35..71d2379d3e 100644 --- a/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java @@ -9,11 +9,9 @@ import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy; import io.metersphere.api.dto.parse.postman.*; import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.KeyValue; -import io.metersphere.api.service.ApiModuleService; import io.metersphere.base.domain.ApiModule; import io.metersphere.commons.constants.MsRequestBodyType; import io.metersphere.commons.constants.PostmanRequestBodyMode; -import io.metersphere.commons.utils.CommonBeanFactory; import org.apache.commons.lang3.StringUtils; import java.io.InputStream; @@ -30,7 +28,7 @@ public class PostmanParser extends ApiImportAbstractParser { List variables = postmanCollection.getVariable(); ApiDefinitionImport apiImport = new ApiDefinitionImport(); List results = new ArrayList<>(); - parseItem(postmanCollection.getItem(), variables, results, buildModule(postmanCollection.getInfo().getName(), null, request.isSaved()), request.isSaved()); + parseItem(postmanCollection.getItem(), variables, results, buildModule(getSelectModule(request.getModuleId()), postmanCollection.getInfo().getName(), request.isSaved()), request.isSaved()); apiImport.setData(results); return apiImport; } @@ -39,7 +37,7 @@ public class PostmanParser extends ApiImportAbstractParser { for (PostmanItem item : items) { List childItems = item.getItem(); if (childItems != null) { - ApiModule module = buildModule(item.getName(), parentModule, isSaved); + ApiModule module = buildModule(parentModule, item.getName() , isSaved); parseItem(childItems, variables, results, module, isSaved); } else { ApiDefinitionResult request = parsePostman(item); @@ -53,21 +51,6 @@ public class PostmanParser extends ApiImportAbstractParser { } } - private ApiModule buildModule(String name, ApiModule parentModule, boolean isSaved) { - apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); - ApiModule module; - if (parentModule != null) { - module = apiModuleService.getNewModule(name, this.projectId, parentModule.getLevel() + 1); - module.setParentId(parentModule.getId()); - } else { - module = apiModuleService.getNewModule(name, this.projectId, 1); - } - if (isSaved) { - createModule(module); - } - return module; - } - private ApiDefinitionResult parsePostman(PostmanItem requestItem) { PostmanRequest requestDesc = requestItem.getRequest(); if (requestDesc == null) { diff --git a/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java b/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java index d61d9af101..b080aa2e23 100644 --- a/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java +++ b/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java @@ -11,10 +11,8 @@ import io.metersphere.api.dto.definition.response.HttpResponse; import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.KeyValue; import io.metersphere.api.dto.scenario.request.RequestType; -import io.metersphere.api.service.ApiModuleService; import io.metersphere.base.domain.ApiModule; import io.metersphere.commons.constants.SwaggerParameterType; -import io.metersphere.commons.utils.CommonBeanFactory; import io.swagger.models.*; import io.swagger.models.parameters.*; import io.swagger.models.properties.*; @@ -25,7 +23,7 @@ import org.apache.commons.lang3.StringUtils; import java.io.InputStream; import java.util.*; -public class Swagger2Parser extends ApiImportAbstractParser { +public class Swagger2Parser extends SwaggerAbstractParser { private Map definitions = null; @@ -47,11 +45,11 @@ public class Swagger2Parser extends ApiImportAbstractParser { ApiDefinitionImport definitionImport = new ApiDefinitionImport(); this.projectId = request.getProjectId(); - definitionImport.setData(parseRequests(swagger, request.isSaved())); + definitionImport.setData(parseRequests(swagger, request)); return definitionImport; } - private List parseRequests(Swagger swagger, boolean isSaved) { + private List parseRequests(Swagger swagger, ApiTestImportRequest importRequest) { Map paths = swagger.getPaths(); Set pathNames = paths.keySet(); @@ -59,6 +57,8 @@ public class Swagger2Parser extends ApiImportAbstractParser { List results = new ArrayList<>(); + ApiModule parentNode = getSelectModule(importRequest.getModuleId()); + for (String pathName : pathNames) { Path path = paths.get(pathName); Map operationMap = path.getOperationMap(); @@ -70,7 +70,7 @@ public class Swagger2Parser extends ApiImportAbstractParser { parseParameters(operation, request); apiDefinition.setRequest(JSON.toJSONString(request)); apiDefinition.setResponse(JSON.toJSONString(parseResponse(operation.getResponses()))); - buildModule(apiDefinition, operation, isSaved); + buildModule(parentNode, apiDefinition, operation.getTags(), importRequest.isSaved()); results.add(apiDefinition); } } @@ -79,20 +79,6 @@ public class Swagger2Parser extends ApiImportAbstractParser { return results; } - private void buildModule(ApiDefinitionResult apiDefinition, Operation operation, boolean isSaved) { - List tags = operation.getTags(); - if (tags != null) { - tags.forEach(tag -> { - apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); - ApiModule module = apiModuleService.getNewModule(tag, this.projectId, 1); - if (isSaved) { - createModule(module); - } - apiDefinition.setModuleId(module.getId()); - }); - } - } - private ApiDefinitionResult buildApiDefinition(String id, Operation operation, String path, String method) { String name = ""; if (StringUtils.isNotBlank(operation.getSummary())) { diff --git a/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java b/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java index 92edcfddf1..ac6ae883fa 100644 --- a/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java +++ b/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java @@ -11,10 +11,8 @@ import io.metersphere.api.dto.definition.response.HttpResponse; import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.KeyValue; import io.metersphere.api.dto.scenario.request.RequestType; -import io.metersphere.api.service.ApiModuleService; import io.metersphere.base.domain.ApiModule; import io.metersphere.commons.exception.MSException; -import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.LogUtil; import io.metersphere.commons.utils.XMLUtils; import io.swagger.parser.OpenAPIParser; @@ -34,7 +32,7 @@ import java.io.InputStream; import java.util.*; -public class Swagger3Parser extends ApiImportAbstractParser { +public class Swagger3Parser extends SwaggerAbstractParser { private Components components; @@ -67,11 +65,11 @@ public class Swagger3Parser extends ApiImportAbstractParser { ApiDefinitionImport definitionImport = new ApiDefinitionImport(); this.projectId = request.getProjectId(); - definitionImport.setData(parseRequests(openAPI, request.isSaved())); + definitionImport.setData(parseRequests(openAPI, request)); return definitionImport; } - private List parseRequests(OpenAPI openAPI, boolean isSaved) { + private List parseRequests(OpenAPI openAPI, ApiTestImportRequest importRequest) { Paths paths = openAPI.getPaths(); Set pathNames = paths.keySet(); @@ -80,6 +78,8 @@ public class Swagger3Parser extends ApiImportAbstractParser { List results = new ArrayList<>(); + ApiModule parentNode = getSelectModule(importRequest.getModuleId()); + for (String pathName : pathNames) { PathItem pathItem = paths.get(pathName); @@ -102,7 +102,7 @@ public class Swagger3Parser extends ApiImportAbstractParser { parseRequestBody(operation.getRequestBody(), request.getBody()); apiDefinition.setRequest(JSON.toJSONString(request)); apiDefinition.setResponse(JSON.toJSONString(parseResponse(operation.getResponses()))); - buildModule(apiDefinition, operation, isSaved); + buildModule(parentNode, apiDefinition, operation.getTags(), importRequest.isSaved()); results.add(apiDefinition); } } @@ -111,20 +111,6 @@ public class Swagger3Parser extends ApiImportAbstractParser { return results; } - private void buildModule(ApiDefinitionResult apiDefinition, Operation operation, boolean isSaved) { - List tags = operation.getTags(); - if (tags != null) { - tags.forEach(tag -> { - apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class); - ApiModule module = apiModuleService.getNewModule(tag, this.projectId, 1); - if (isSaved) { - createModule(module); - } - apiDefinition.setModuleId(module.getId()); - }); - } - } - private ApiDefinitionResult buildApiDefinition(String id, Operation operation, String path, String method) { String name = ""; if (StringUtils.isNotBlank(operation.getSummary())) { diff --git a/backend/src/main/java/io/metersphere/api/parse/SwaggerAbstractParser.java b/backend/src/main/java/io/metersphere/api/parse/SwaggerAbstractParser.java new file mode 100644 index 0000000000..1973109c54 --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/parse/SwaggerAbstractParser.java @@ -0,0 +1,19 @@ +package io.metersphere.api.parse; + +import io.metersphere.api.dto.definition.ApiDefinitionResult; +import io.metersphere.base.domain.ApiModule; + +import java.util.List; + +public abstract class SwaggerAbstractParser extends ApiImportAbstractParser { + + protected void buildModule(ApiModule parentModule, ApiDefinitionResult apiDefinition, List tags, boolean isSaved) { + if (tags != null) { + tags.forEach(tag -> { + ApiModule module = buildModule(parentModule, tag, isSaved); + apiDefinition.setModuleId(module.getId()); + }); + } + } + +} 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 944b908847..bdbc29b31c 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.metersphere.api.dto.APIReportResult; import io.metersphere.api.dto.ApiTestImportRequest; -import io.metersphere.api.dto.automation.ApiScenarioDTO; import io.metersphere.api.dto.automation.ApiScenarioRequest; import io.metersphere.api.dto.automation.ReferenceDTO; import io.metersphere.api.dto.datacount.ApiDataCountResult; @@ -18,6 +17,7 @@ import io.metersphere.api.parse.ApiImportParserFactory; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.ApiDefinitionMapper; import io.metersphere.base.mapper.ApiTestFileMapper; +import io.metersphere.base.mapper.ProjectMapper; import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper; import io.metersphere.base.mapper.ext.ExtApiDefinitionMapper; import io.metersphere.base.mapper.ext.ExtApiScenarioMapper; @@ -71,6 +71,8 @@ public class ApiDefinitionService { private ExtApiScenarioMapper extApiScenarioMapper; @Resource private ExtTestPlanMapper extTestPlanMapper; + @Resource + private ProjectMapper projectMapper; private static Cache cache = Cache.newHardMemoryCache(0, 3600 * 24); @@ -178,7 +180,8 @@ public class ApiDefinitionService { example.createCriteria().andMethodEqualTo(request.getMethod()).andStatusNotEqualTo("Trash") .andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath()) .andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId()); - if (apiDefinitionMapper.countByExample(example) > 0) { + Project project = projectMapper.selectByPrimaryKey(request.getProjectId()); + if (apiDefinitionMapper.countByExample(example) > 0 && !project.getRepeatable()) { MSException.throwException(Translator.get("api_definition_url_not_repeating")); } } else { @@ -439,8 +442,8 @@ public class ApiDefinitionService { public void editApiByParam(ApiBatchRequest request) { List ids = request.getIds(); - if(request.isSelectAllDate()){ - ids = this.getAllApiIdsByFontedSelect(request.getFilters(),request.getName(),request.getModuleIds(),request.getProjectId(),request.getUnSelectIds()); + if (request.isSelectAllDate()) { + ids = this.getAllApiIdsByFontedSelect(request.getFilters(), request.getName(), request.getModuleIds(), request.getProjectId(), request.getUnSelectIds()); } //name在这里只是查询参数 request.setName(null); @@ -503,15 +506,15 @@ public class ApiDefinitionService { public void deleteByParams(ApiDefinitionBatchProcessingRequest request) { List apiIds = request.getDataIds(); - if(request.isSelectAllDate()){ - apiIds = this.getAllApiIdsByFontedSelect(request.getFilters(),request.getName(),request.getModuleIds(),request.getProjectId(),request.getUnSelectIds()); + if (request.isSelectAllDate()) { + apiIds = this.getAllApiIdsByFontedSelect(request.getFilters(), request.getName(), request.getModuleIds(), request.getProjectId(), request.getUnSelectIds()); } ApiDefinitionExample example = new ApiDefinitionExample(); example.createCriteria().andIdIn(apiIds); apiDefinitionMapper.deleteByExample(example); } - private List getAllApiIdsByFontedSelect(List filter,String name,List moduleIds,String projectId,ListunSelectIds) { + private List getAllApiIdsByFontedSelect(List filter, String name, List moduleIds, String projectId, List unSelectIds) { ApiDefinitionRequest request = new ApiDefinitionRequest(); request.setFilters(filter); request.setName(name); @@ -529,8 +532,8 @@ public class ApiDefinitionService { public void removeToGcByParams(ApiDefinitionBatchProcessingRequest request) { List apiIds = request.getDataIds(); - if(request.isSelectAllDate()){ - apiIds = this.getAllApiIdsByFontedSelect(request.getFilters(),request.getName(),request.getModuleIds(),request.getProjectId(),request.getUnSelectIds()); + if (request.isSelectAllDate()) { + apiIds = this.getAllApiIdsByFontedSelect(request.getFilters(), request.getName(), request.getModuleIds(), request.getProjectId(), request.getUnSelectIds()); } extApiDefinitionMapper.removeToGc(apiIds); } diff --git a/backend/src/main/java/io/metersphere/base/domain/Project.java b/backend/src/main/java/io/metersphere/base/domain/Project.java index 25403e763e..a1ca062eee 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Project.java +++ b/backend/src/main/java/io/metersphere/base/domain/Project.java @@ -1,8 +1,9 @@ package io.metersphere.base.domain; -import java.io.Serializable; import lombok.Data; +import java.io.Serializable; + @Data public class Project implements Serializable { private String id; @@ -23,5 +24,7 @@ public class Project implements Serializable { private String zentaoId; + private Boolean repeatable; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java b/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java index 8f83d6ad88..dd20602779 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java @@ -713,6 +713,66 @@ public class ProjectExample { addCriterion("zentao_id not between", value1, value2, "zentaoId"); return (Criteria) this; } + + public Criteria andRepeatableIsNull() { + addCriterion("`repeatable` is null"); + return (Criteria) this; + } + + public Criteria andRepeatableIsNotNull() { + addCriterion("`repeatable` is not null"); + return (Criteria) this; + } + + public Criteria andRepeatableEqualTo(Boolean value) { + addCriterion("`repeatable` =", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableNotEqualTo(Boolean value) { + addCriterion("`repeatable` <>", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableGreaterThan(Boolean value) { + addCriterion("`repeatable` >", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableGreaterThanOrEqualTo(Boolean value) { + addCriterion("`repeatable` >=", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableLessThan(Boolean value) { + addCriterion("`repeatable` <", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableLessThanOrEqualTo(Boolean value) { + addCriterion("`repeatable` <=", value, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableIn(List values) { + addCriterion("`repeatable` in", values, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableNotIn(List values) { + addCriterion("`repeatable` not in", values, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableBetween(Boolean value1, Boolean value2) { + addCriterion("`repeatable` between", value1, value2, "repeatable"); + return (Criteria) this; + } + + public Criteria andRepeatableNotBetween(Boolean value1, Boolean value2) { + addCriterion("`repeatable` not between", value1, value2, "repeatable"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml index 4ed30cebfe..7765a51e20 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml @@ -11,6 +11,7 @@ + @@ -72,7 +73,7 @@ id, workspace_id, `name`, description, create_time, update_time, tapd_id, jira_key, - zentao_id + zentao_id, `repeatable` @@ -211,6 +218,9 @@ zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, + + `repeatable` = #{record.repeatable,jdbcType=BIT}, + @@ -226,7 +236,8 @@ update_time = #{record.updateTime,jdbcType=BIGINT}, tapd_id = #{record.tapdId,jdbcType=VARCHAR}, jira_key = #{record.jiraKey,jdbcType=VARCHAR}, - zentao_id = #{record.zentaoId,jdbcType=VARCHAR} + zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, + `repeatable` = #{record.repeatable,jdbcType=BIT} @@ -258,6 +269,9 @@ zentao_id = #{zentaoId,jdbcType=VARCHAR}, + + `repeatable` = #{repeatable,jdbcType=BIT}, + where id = #{id,jdbcType=VARCHAR} @@ -270,7 +284,8 @@ update_time = #{updateTime,jdbcType=BIGINT}, tapd_id = #{tapdId,jdbcType=VARCHAR}, jira_key = #{jiraKey,jdbcType=VARCHAR}, - zentao_id = #{zentaoId,jdbcType=VARCHAR} + zentao_id = #{zentaoId,jdbcType=VARCHAR}, + `repeatable` = #{repeatable,jdbcType=BIT} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml index 66bb7c3588..af9787bece 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml @@ -4,7 +4,7 @@