From ac387b6fd0aab1f5f4cf137e32599dad8d1d2963 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Tue, 29 Aug 2023 09:47:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A8=A1=E6=9D=BF=E6=8E=A5=E5=8F=A3=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --task=1012795 --user=陈建星 项目管理-模版管理-后台 https://www.tapd.cn/55049933/s/1413162 --- .../project/domain/BugTemplateExample.java | 670 ------------------ .../domain/BugTemplateExtendExample.java | 340 --------- .../domain/FunctionalCaseTemplate.java | 118 --- .../project/mapper/ApiTemplateMapper.java | 34 - .../mapper/BugTemplateExtendMapper.java | 40 -- .../project/mapper/BugTemplateMapper.java | 34 - .../mapper/CustomFieldTemplateMapper.java | 40 -- .../FunctionalCaseTemplateExtendMapper.java | 40 -- .../FunctionalCaseTemplateExtendMapper.xml | 348 --------- .../mapper/FunctionalCaseTemplateMapper.java | 34 - .../mapper/FunctionalCaseTemplateMapper.xml | 288 -------- .../domain/CustomField.java | 49 +- .../domain/CustomFieldExample.java | 224 +++--- .../domain/CustomFieldOption.java} | 53 +- .../domain/CustomFieldOptionExample.java | 470 ++++++++++++ .../domain/StatusDefinition.java} | 24 +- .../domain/StatusDefinitionExample.java} | 118 +-- .../domain/StatusItem.java} | 53 +- .../domain/StatusItemExample.java} | 304 ++++---- .../domain/Template.java} | 60 +- .../domain/TemplateCustomField.java} | 50 +- .../domain/TemplateCustomFieldExample.java} | 188 ++--- .../domain/TemplateExample.java} | 378 ++++++++-- .../mapper/CustomFieldMapper.java | 12 +- .../mapper/CustomFieldMapper.xml | 219 ++---- .../mapper/CustomFieldOptionMapper.java | 34 + .../system/mapper/CustomFieldOptionMapper.xml | 231 ++++++ .../system/mapper/StatusDefinitionMapper.java | 34 + .../mapper/StatusDefinitionMapper.xml} | 142 ++-- .../system/mapper/StatusItemMapper.java | 34 + .../mapper/StatusItemMapper.xml} | 178 ++--- .../mapper/TemplateCustomFieldMapper.java | 34 + .../mapper/TemplateCustomFieldMapper.xml} | 188 ++--- .../system/mapper/TemplateMapper.java | 34 + .../mapper/TemplateMapper.xml} | 193 +++-- .../3.0.0/ddl/V3.0.0_11__system_setting.sql | 104 +++ .../ddl/V3.0.0_4__project_management.sql | 138 ---- .../migration/3.0.0/dml/V3.0.0_11_1__data.sql | 16 + ...ldDTO.java => PlatformCustomFieldDTO.java} | 2 +- .../dto/PlatformCustomFieldItemDTO.java | 2 +- .../interceptor/ProjectInterceptor.java | 2 - .../config/interceptor/SystemInterceptor.java | 1 - .../sdk/constants/CustomFieldType.java | 40 ++ .../sdk/constants/PermissionConstants.java | 14 + .../sdk/constants/TemplateScene.java | 8 + .../sdk/constants/TemplateScopeType.java | 6 + .../handler/result/CommonResultCode.java | 7 +- .../metersphere/sdk/dto/CustomFieldDTO.java | 12 + .../sdk/dto/TemplateCustomFieldDTO.java | 24 + .../io/metersphere/sdk/dto/TemplateDTO.java | 11 + .../dto/request/CustomFieldOptionRequest.java | 21 + .../dto/request/CustomFieldUpdateRequest.java | 49 ++ .../request/TemplateCustomFieldRequest.java | 26 + .../dto/request/TemplateUpdateRequest.java | 44 ++ .../sdk/log/constants/OperationLogModule.java | 3 + .../service/BaseCustomFieldOptionService.java | 76 ++ .../sdk/service/BaseCustomFieldService.java | 168 +++++ .../BaseTemplateCustomFieldService.java | 67 ++ .../sdk/service/BaseTemplateService.java | 183 +++++ .../sdk/service/BaseUserRoleService.java | 1 + .../resources/i18n/commons_en_US.properties | 13 +- .../resources/i18n/commons_zh_CN.properties | 9 +- .../resources/i18n/commons_zh_TW.properties | 10 +- .../resources/i18n/system_en_US.properties | 9 +- .../resources/i18n/system_zh_CN.properties | 10 +- .../resources/i18n/system_zh_TW.properties | 19 +- .../io/metersphere/sdk/base/BaseTest.java | 47 +- .../main/resources/projectGeneratorConfig.xml | 7 - .../OrganizationCustomFieldController.java | 82 +++ .../OrganizationTemplateController.java | 82 +++ .../OrganizationCustomFieldLogService.java | 65 ++ .../OrganizationCustomFieldService.java | 64 ++ .../system/service/OrganizationService.java | 5 + .../OrganizationTemplateLogService.java | 67 ++ .../service/OrganizationTemplateService.java | 65 ++ .../src/main/resources/permission.json | 36 + .../main/resources/systemGeneratorConfig.xml | 53 +- ...rganizationCustomFieldControllerTests.java | 257 +++++++ .../OrganizationTemplateControllerTests.java | 292 ++++++++ .../CustomFieldUpdateRequestDefinition.java | 33 + .../TemplateUpdateRequestDefinition.java | 52 ++ .../system/utils/user/UserRequestUtils.java | 2 - 82 files changed, 4181 insertions(+), 3413 deletions(-) delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml rename backend/framework/domain/src/main/java/io/metersphere/{project => system}/domain/CustomField.java (69%) rename backend/framework/domain/src/main/java/io/metersphere/{project => system}/domain/CustomFieldExample.java (78%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/FunctionalCaseTemplateExtend.java => system/domain/CustomFieldOption.java} (59%) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOptionExample.java rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/BugTemplateExtend.java => system/domain/StatusDefinition.java} (72%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/FunctionalCaseTemplateExtendExample.java => system/domain/StatusDefinitionExample.java} (69%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/ApiTemplate.java => system/domain/StatusItem.java} (54%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/ApiTemplateExample.java => system/domain/StatusItemExample.java} (66%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/BugTemplate.java => system/domain/Template.java} (51%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/CustomFieldTemplate.java => system/domain/TemplateCustomField.java} (64%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/CustomFieldTemplateExample.java => system/domain/TemplateCustomFieldExample.java} (75%) rename backend/framework/domain/src/main/java/io/metersphere/{project/domain/FunctionalCaseTemplateExample.java => system/domain/TemplateExample.java} (58%) rename backend/framework/domain/src/main/java/io/metersphere/{project => system}/mapper/CustomFieldMapper.java (70%) rename backend/framework/domain/src/main/java/io/metersphere/{project => system}/mapper/CustomFieldMapper.xml (59%) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.java rename backend/framework/domain/src/main/java/io/metersphere/{project/mapper/BugTemplateExtendMapper.xml => system/mapper/StatusDefinitionMapper.xml} (56%) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.java rename backend/framework/domain/src/main/java/io/metersphere/{project/mapper/BugTemplateMapper.xml => system/mapper/StatusItemMapper.xml} (61%) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.java rename backend/framework/domain/src/main/java/io/metersphere/{project/mapper/CustomFieldTemplateMapper.xml => system/mapper/TemplateCustomFieldMapper.xml} (56%) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.java rename backend/framework/domain/src/main/java/io/metersphere/{project/mapper/ApiTemplateMapper.xml => system/mapper/TemplateMapper.xml} (57%) rename backend/framework/plugin/metersphere-platform-plugin-sdk/src/main/java/io/metersphere/plugin/platform/dto/{CustomFieldDTO.java => PlatformCustomFieldDTO.java} (89%) create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/CustomFieldType.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/TemplateScene.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/TemplateScopeType.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/CustomFieldDTO.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TemplateCustomFieldDTO.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TemplateDTO.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/request/CustomFieldOptionRequest.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/request/CustomFieldUpdateRequest.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/request/TemplateCustomFieldRequest.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/request/TemplateUpdateRequest.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldOptionService.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldService.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateCustomFieldService.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateService.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationCustomFieldController.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationTemplateController.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldLogService.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldService.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateLogService.java create mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateService.java create mode 100644 backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java create mode 100644 backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java create mode 100644 backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/CustomFieldUpdateRequestDefinition.java create mode 100644 backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/TemplateUpdateRequestDefinition.java diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java deleted file mode 100644 index 01165d7b42..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java +++ /dev/null @@ -1,670 +0,0 @@ -package io.metersphere.project.domain; - -import java.util.ArrayList; -import java.util.List; - -public class BugTemplateExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public BugTemplateExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(String value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(String value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(String value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(String value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(String value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(String value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(String value1, String value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(String value1, String value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("`name` is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("`name` is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("`name` =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("`name` <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("`name` >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("`name` >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("`name` <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("`name` <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("`name` like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("`name` not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("`name` in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("`name` not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("`name` between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("`name` not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andInternalIsNull() { - addCriterion("internal is null"); - return (Criteria) this; - } - - public Criteria andInternalIsNotNull() { - addCriterion("internal is not null"); - return (Criteria) this; - } - - public Criteria andInternalEqualTo(Boolean value) { - addCriterion("internal =", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalNotEqualTo(Boolean value) { - addCriterion("internal <>", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalGreaterThan(Boolean value) { - addCriterion("internal >", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalGreaterThanOrEqualTo(Boolean value) { - addCriterion("internal >=", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalLessThan(Boolean value) { - addCriterion("internal <", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalLessThanOrEqualTo(Boolean value) { - addCriterion("internal <=", value, "internal"); - return (Criteria) this; - } - - public Criteria andInternalIn(List values) { - addCriterion("internal in", values, "internal"); - return (Criteria) this; - } - - public Criteria andInternalNotIn(List values) { - addCriterion("internal not in", values, "internal"); - return (Criteria) this; - } - - public Criteria andInternalBetween(Boolean value1, Boolean value2) { - addCriterion("internal between", value1, value2, "internal"); - return (Criteria) this; - } - - public Criteria andInternalNotBetween(Boolean value1, Boolean value2) { - addCriterion("internal not between", value1, value2, "internal"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Long value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Long value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Long value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Long value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Long value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Long value1, Long value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Long value1, Long value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateUserIsNull() { - addCriterion("create_user is null"); - return (Criteria) this; - } - - public Criteria andCreateUserIsNotNull() { - addCriterion("create_user is not null"); - return (Criteria) this; - } - - public Criteria andCreateUserEqualTo(String value) { - addCriterion("create_user =", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotEqualTo(String value) { - addCriterion("create_user <>", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserGreaterThan(String value) { - addCriterion("create_user >", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserGreaterThanOrEqualTo(String value) { - addCriterion("create_user >=", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLessThan(String value) { - addCriterion("create_user <", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLessThanOrEqualTo(String value) { - addCriterion("create_user <=", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLike(String value) { - addCriterion("create_user like", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotLike(String value) { - addCriterion("create_user not like", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserIn(List values) { - addCriterion("create_user in", values, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotIn(List values) { - addCriterion("create_user not in", values, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserBetween(String value1, String value2) { - addCriterion("create_user between", value1, value2, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotBetween(String value1, String value2) { - addCriterion("create_user not between", value1, value2, "createUser"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdEqualTo(String value) { - addCriterion("project_id =", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(String value) { - addCriterion("project_id <>", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThan(String value) { - addCriterion("project_id >", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThanOrEqualTo(String value) { - addCriterion("project_id >=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThan(String value) { - addCriterion("project_id <", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThanOrEqualTo(String value) { - addCriterion("project_id <=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLike(String value) { - addCriterion("project_id like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotLike(String value) { - addCriterion("project_id not like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdBetween(String value1, String value2) { - addCriterion("project_id between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotBetween(String value1, String value2) { - addCriterion("project_id not between", value1, value2, "projectId"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java deleted file mode 100644 index 3f83318684..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java +++ /dev/null @@ -1,340 +0,0 @@ -package io.metersphere.project.domain; - -import java.util.ArrayList; -import java.util.List; - -public class BugTemplateExtendExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public BugTemplateExtendExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(String value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(String value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(String value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(String value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(String value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(String value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(String value1, String value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(String value1, String value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andTitleIsNull() { - addCriterion("title is null"); - return (Criteria) this; - } - - public Criteria andTitleIsNotNull() { - addCriterion("title is not null"); - return (Criteria) this; - } - - public Criteria andTitleEqualTo(String value) { - addCriterion("title =", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleNotEqualTo(String value) { - addCriterion("title <>", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleGreaterThan(String value) { - addCriterion("title >", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleGreaterThanOrEqualTo(String value) { - addCriterion("title >=", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleLessThan(String value) { - addCriterion("title <", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleLessThanOrEqualTo(String value) { - addCriterion("title <=", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleLike(String value) { - addCriterion("title like", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleNotLike(String value) { - addCriterion("title not like", value, "title"); - return (Criteria) this; - } - - public Criteria andTitleIn(List values) { - addCriterion("title in", values, "title"); - return (Criteria) this; - } - - public Criteria andTitleNotIn(List values) { - addCriterion("title not in", values, "title"); - return (Criteria) this; - } - - public Criteria andTitleBetween(String value1, String value2) { - addCriterion("title between", value1, value2, "title"); - return (Criteria) this; - } - - public Criteria andTitleNotBetween(String value1, String value2) { - addCriterion("title not between", value1, value2, "title"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java deleted file mode 100644 index a5a81a2228..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java +++ /dev/null @@ -1,118 +0,0 @@ -package io.metersphere.project.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import lombok.Data; - -@Data -public class FunctionalCaseTemplate implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_template.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{functional_case_template.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_template.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 255, message = "{functional_case_template.name.length_range}", groups = {Created.class, Updated.class}) - private String name; - - @Schema(description = "描述") - private String description; - - @Schema(description = "是否是内置模板") - private Boolean internal; - - @Schema(description = "创建时间") - private Long createTime; - - @Schema(description = "创建人") - private String createUser; - - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_template.project_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{functional_case_template.project_id.length_range}", groups = {Created.class, Updated.class}) - private String projectId; - - private static final long serialVersionUID = 1L; - - public enum Column { - id("id", "id", "VARCHAR", false), - name("name", "name", "VARCHAR", true), - description("description", "description", "VARCHAR", false), - internal("internal", "internal", "BIT", false), - createTime("create_time", "createTime", "BIGINT", false), - createUser("create_user", "createUser", "VARCHAR", false), - projectId("project_id", "projectId", "VARCHAR", false); - - private static final String BEGINNING_DELIMITER = "`"; - - private static final String ENDING_DELIMITER = "`"; - - private final String column; - - private final boolean isColumnNameDelimited; - - private final String javaProperty; - - private final String jdbcType; - - public String value() { - return this.column; - } - - public String getValue() { - return this.column; - } - - public String getJavaProperty() { - return this.javaProperty; - } - - public String getJdbcType() { - return this.jdbcType; - } - - Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { - this.column = column; - this.javaProperty = javaProperty; - this.jdbcType = jdbcType; - this.isColumnNameDelimited = isColumnNameDelimited; - } - - public String desc() { - return this.getEscapedColumnName() + " DESC"; - } - - public String asc() { - return this.getEscapedColumnName() + " ASC"; - } - - public static Column[] excludes(Column ... excludes) { - ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); - if (excludes != null && excludes.length > 0) { - columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); - } - return columns.toArray(new Column[]{}); - } - - public static Column[] all() { - return Column.values(); - } - - public String getEscapedColumnName() { - if (this.isColumnNameDelimited) { - return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); - } else { - return this.column; - } - } - - public String getAliasedEscapedColumnName() { - return this.getEscapedColumnName(); - } - } -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java deleted file mode 100644 index 9ce9561464..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.ApiTemplate; -import io.metersphere.project.domain.ApiTemplateExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ApiTemplateMapper { - long countByExample(ApiTemplateExample example); - - int deleteByExample(ApiTemplateExample example); - - int deleteByPrimaryKey(String id); - - int insert(ApiTemplate record); - - int insertSelective(ApiTemplate record); - - List selectByExample(ApiTemplateExample example); - - ApiTemplate selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ApiTemplate record, @Param("example") ApiTemplateExample example); - - int updateByExample(@Param("record") ApiTemplate record, @Param("example") ApiTemplateExample example); - - int updateByPrimaryKeySelective(ApiTemplate record); - - int updateByPrimaryKey(ApiTemplate record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") ApiTemplate.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java deleted file mode 100644 index b9a757687d..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.BugTemplateExtend; -import io.metersphere.project.domain.BugTemplateExtendExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface BugTemplateExtendMapper { - long countByExample(BugTemplateExtendExample example); - - int deleteByExample(BugTemplateExtendExample example); - - int deleteByPrimaryKey(String id); - - int insert(BugTemplateExtend record); - - int insertSelective(BugTemplateExtend record); - - List selectByExampleWithBLOBs(BugTemplateExtendExample example); - - List selectByExample(BugTemplateExtendExample example); - - BugTemplateExtend selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); - - int updateByExampleWithBLOBs(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); - - int updateByExample(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); - - int updateByPrimaryKeySelective(BugTemplateExtend record); - - int updateByPrimaryKeyWithBLOBs(BugTemplateExtend record); - - int updateByPrimaryKey(BugTemplateExtend record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") BugTemplateExtend.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java deleted file mode 100644 index 3143c29cbc..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.BugTemplate; -import io.metersphere.project.domain.BugTemplateExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface BugTemplateMapper { - long countByExample(BugTemplateExample example); - - int deleteByExample(BugTemplateExample example); - - int deleteByPrimaryKey(String id); - - int insert(BugTemplate record); - - int insertSelective(BugTemplate record); - - List selectByExample(BugTemplateExample example); - - BugTemplate selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") BugTemplate record, @Param("example") BugTemplateExample example); - - int updateByExample(@Param("record") BugTemplate record, @Param("example") BugTemplateExample example); - - int updateByPrimaryKeySelective(BugTemplate record); - - int updateByPrimaryKey(BugTemplate record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") BugTemplate.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java deleted file mode 100644 index 39fbbf06ae..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.CustomFieldTemplate; -import io.metersphere.project.domain.CustomFieldTemplateExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface CustomFieldTemplateMapper { - long countByExample(CustomFieldTemplateExample example); - - int deleteByExample(CustomFieldTemplateExample example); - - int deleteByPrimaryKey(String id); - - int insert(CustomFieldTemplate record); - - int insertSelective(CustomFieldTemplate record); - - List selectByExampleWithBLOBs(CustomFieldTemplateExample example); - - List selectByExample(CustomFieldTemplateExample example); - - CustomFieldTemplate selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); - - int updateByExampleWithBLOBs(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); - - int updateByExample(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); - - int updateByPrimaryKeySelective(CustomFieldTemplate record); - - int updateByPrimaryKeyWithBLOBs(CustomFieldTemplate record); - - int updateByPrimaryKey(CustomFieldTemplate record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") CustomFieldTemplate.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java deleted file mode 100644 index 79c186259a..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.FunctionalCaseTemplateExtend; -import io.metersphere.project.domain.FunctionalCaseTemplateExtendExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface FunctionalCaseTemplateExtendMapper { - long countByExample(FunctionalCaseTemplateExtendExample example); - - int deleteByExample(FunctionalCaseTemplateExtendExample example); - - int deleteByPrimaryKey(String id); - - int insert(FunctionalCaseTemplateExtend record); - - int insertSelective(FunctionalCaseTemplateExtend record); - - List selectByExampleWithBLOBs(FunctionalCaseTemplateExtendExample example); - - List selectByExample(FunctionalCaseTemplateExtendExample example); - - FunctionalCaseTemplateExtend selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); - - int updateByExampleWithBLOBs(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); - - int updateByExample(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); - - int updateByPrimaryKeySelective(FunctionalCaseTemplateExtend record); - - int updateByPrimaryKeyWithBLOBs(FunctionalCaseTemplateExtend record); - - int updateByPrimaryKey(FunctionalCaseTemplateExtend record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") FunctionalCaseTemplateExtend.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml deleted file mode 100644 index a84a9065fd..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - 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, case_name, step_model - - - prerequisite, step_description, expected_result, actual_result, steps - - - - - - delete from functional_case_template_extend - where id = #{id,jdbcType=VARCHAR} - - - delete from functional_case_template_extend - - - - - - insert into functional_case_template_extend (id, case_name, step_model, - prerequisite, step_description, - expected_result, actual_result, steps - ) - values (#{id,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{stepModel,jdbcType=VARCHAR}, - #{prerequisite,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, - #{expectedResult,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR} - ) - - - insert into functional_case_template_extend - - - id, - - - case_name, - - - step_model, - - - prerequisite, - - - step_description, - - - expected_result, - - - actual_result, - - - steps, - - - - - #{id,jdbcType=VARCHAR}, - - - #{caseName,jdbcType=VARCHAR}, - - - #{stepModel,jdbcType=VARCHAR}, - - - #{prerequisite,jdbcType=LONGVARCHAR}, - - - #{stepDescription,jdbcType=LONGVARCHAR}, - - - #{expectedResult,jdbcType=LONGVARCHAR}, - - - #{actualResult,jdbcType=LONGVARCHAR}, - - - #{steps,jdbcType=LONGVARCHAR}, - - - - - - update functional_case_template_extend - - - id = #{record.id,jdbcType=VARCHAR}, - - - case_name = #{record.caseName,jdbcType=VARCHAR}, - - - step_model = #{record.stepModel,jdbcType=VARCHAR}, - - - prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, - - - step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, - - - expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, - - - actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, - - - steps = #{record.steps,jdbcType=LONGVARCHAR}, - - - - - - - - update functional_case_template_extend - set id = #{record.id,jdbcType=VARCHAR}, - case_name = #{record.caseName,jdbcType=VARCHAR}, - step_model = #{record.stepModel,jdbcType=VARCHAR}, - prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, - step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, - expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, - actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, - steps = #{record.steps,jdbcType=LONGVARCHAR} - - - - - - update functional_case_template_extend - set id = #{record.id,jdbcType=VARCHAR}, - case_name = #{record.caseName,jdbcType=VARCHAR}, - step_model = #{record.stepModel,jdbcType=VARCHAR} - - - - - - update functional_case_template_extend - - - case_name = #{caseName,jdbcType=VARCHAR}, - - - step_model = #{stepModel,jdbcType=VARCHAR}, - - - prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, - - - step_description = #{stepDescription,jdbcType=LONGVARCHAR}, - - - expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, - - - actual_result = #{actualResult,jdbcType=LONGVARCHAR}, - - - steps = #{steps,jdbcType=LONGVARCHAR}, - - - where id = #{id,jdbcType=VARCHAR} - - - update functional_case_template_extend - set case_name = #{caseName,jdbcType=VARCHAR}, - step_model = #{stepModel,jdbcType=VARCHAR}, - prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, - step_description = #{stepDescription,jdbcType=LONGVARCHAR}, - expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, - actual_result = #{actualResult,jdbcType=LONGVARCHAR}, - steps = #{steps,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - update functional_case_template_extend - set case_name = #{caseName,jdbcType=VARCHAR}, - step_model = #{stepModel,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - insert into functional_case_template_extend - (id, case_name, step_model, prerequisite, step_description, expected_result, actual_result, - steps) - values - - (#{item.id,jdbcType=VARCHAR}, #{item.caseName,jdbcType=VARCHAR}, #{item.stepModel,jdbcType=VARCHAR}, - #{item.prerequisite,jdbcType=LONGVARCHAR}, #{item.stepDescription,jdbcType=LONGVARCHAR}, - #{item.expectedResult,jdbcType=LONGVARCHAR}, #{item.actualResult,jdbcType=LONGVARCHAR}, - #{item.steps,jdbcType=LONGVARCHAR}) - - - - insert into functional_case_template_extend ( - - ${column.escapedColumnName} - - ) - values - - ( - - - #{item.id,jdbcType=VARCHAR} - - - #{item.caseName,jdbcType=VARCHAR} - - - #{item.stepModel,jdbcType=VARCHAR} - - - #{item.prerequisite,jdbcType=LONGVARCHAR} - - - #{item.stepDescription,jdbcType=LONGVARCHAR} - - - #{item.expectedResult,jdbcType=LONGVARCHAR} - - - #{item.actualResult,jdbcType=LONGVARCHAR} - - - #{item.steps,jdbcType=LONGVARCHAR} - - - ) - - - \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java deleted file mode 100644 index 7d57ec1b38..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere.project.mapper; - -import io.metersphere.project.domain.FunctionalCaseTemplate; -import io.metersphere.project.domain.FunctionalCaseTemplateExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface FunctionalCaseTemplateMapper { - long countByExample(FunctionalCaseTemplateExample example); - - int deleteByExample(FunctionalCaseTemplateExample example); - - int deleteByPrimaryKey(String id); - - int insert(FunctionalCaseTemplate record); - - int insertSelective(FunctionalCaseTemplate record); - - List selectByExample(FunctionalCaseTemplateExample example); - - FunctionalCaseTemplate selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") FunctionalCaseTemplate record, @Param("example") FunctionalCaseTemplateExample example); - - int updateByExample(@Param("record") FunctionalCaseTemplate record, @Param("example") FunctionalCaseTemplateExample example); - - int updateByPrimaryKeySelective(FunctionalCaseTemplate record); - - int updateByPrimaryKey(FunctionalCaseTemplate record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") FunctionalCaseTemplate.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml deleted file mode 100644 index 28091c4b8a..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 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`, description, internal, create_time, create_user, project_id - - - - - delete from functional_case_template - where id = #{id,jdbcType=VARCHAR} - - - delete from functional_case_template - - - - - - insert into functional_case_template (id, `name`, description, - internal, create_time, create_user, - project_id) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, - #{internal,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, - #{projectId,jdbcType=VARCHAR}) - - - insert into functional_case_template - - - id, - - - `name`, - - - description, - - - internal, - - - create_time, - - - create_user, - - - project_id, - - - - - #{id,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{internal,jdbcType=BIT}, - - - #{createTime,jdbcType=BIGINT}, - - - #{createUser,jdbcType=VARCHAR}, - - - #{projectId,jdbcType=VARCHAR}, - - - - - - update functional_case_template - - - id = #{record.id,jdbcType=VARCHAR}, - - - `name` = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - internal = #{record.internal,jdbcType=BIT}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - create_user = #{record.createUser,jdbcType=VARCHAR}, - - - project_id = #{record.projectId,jdbcType=VARCHAR}, - - - - - - - - update functional_case_template - set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - internal = #{record.internal,jdbcType=BIT}, - create_time = #{record.createTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR} - - - - - - update functional_case_template - - - `name` = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - internal = #{internal,jdbcType=BIT}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - create_user = #{createUser,jdbcType=VARCHAR}, - - - project_id = #{projectId,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=VARCHAR} - - - update functional_case_template - set `name` = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - internal = #{internal,jdbcType=BIT}, - create_time = #{createTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - insert into functional_case_template - (id, `name`, description, internal, create_time, create_user, project_id) - values - - (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR}, - #{item.internal,jdbcType=BIT}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, - #{item.projectId,jdbcType=VARCHAR}) - - - - insert into functional_case_template ( - - ${column.escapedColumnName} - - ) - values - - ( - - - #{item.id,jdbcType=VARCHAR} - - - #{item.name,jdbcType=VARCHAR} - - - #{item.description,jdbcType=VARCHAR} - - - #{item.internal,jdbcType=BIT} - - - #{item.createTime,jdbcType=BIGINT} - - - #{item.createUser,jdbcType=VARCHAR} - - - #{item.projectId,jdbcType=VARCHAR} - - - ) - - - \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java similarity index 69% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java index 74cd5e28c1..5dcd8b67aa 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -10,52 +10,51 @@ import lombok.Data; @Data public class CustomField implements Serializable { - @Schema(description = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{custom_field.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{custom_field.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "自定义字段名称", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "自定义字段名称", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{custom_field.name.not_blank}", groups = {Created.class}) @Size(min = 1, max = 255, message = "{custom_field.name.length_range}", groups = {Created.class, Updated.class}) private String name; - @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{custom_field.scene.not_blank}", groups = {Created.class}) @Size(min = 1, max = 30, message = "{custom_field.scene.length_range}", groups = {Created.class, Updated.class}) private String scene; - @Schema(description = "自定义字段类型", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "自定义字段类型", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{custom_field.type.not_blank}", groups = {Created.class}) @Size(min = 1, max = 30, message = "{custom_field.type.length_range}", groups = {Created.class, Updated.class}) private String type; - @Schema(description = "自定义字段备注") + @Schema(description = "自定义字段备注") private String remark; - @Schema(description = "是否是系统字段") - private Boolean system; + @Schema(description = "是否是内置字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{custom_field.internal.not_blank}", groups = {Created.class}) + private Boolean internal; - @Schema(description = "是否是全局字段") - private Boolean global; + @Schema(description = "组织或项目级别字段(PROJECT, ORGANIZATION)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{custom_field.scope_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{custom_field.scope_type.length_range}", groups = {Created.class, Updated.class}) + private String scopeType; - @Schema(description = "创建时间") + @Schema(description = "创建时间") private Long createTime; - @Schema(description = "更新时间") + @Schema(description = "更新时间") private Long updateTime; - @Schema(description = "创建人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "项目ID") - private String projectId; - - @Schema(description = "是否关联第三方") - private Boolean thirdPart; - - @Schema(description = "自定义字段选项") - private String options; + @Schema(description = "组织或项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{custom_field.scope_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{custom_field.scope_id.length_range}", groups = {Created.class, Updated.class}) + private String scopeId; private static final long serialVersionUID = 1L; @@ -65,14 +64,12 @@ public class CustomField implements Serializable { scene("scene", "scene", "VARCHAR", false), type("type", "type", "VARCHAR", true), remark("remark", "remark", "VARCHAR", false), - system("system", "system", "BIT", true), - global("global", "global", "BIT", true), + internal("internal", "internal", "BIT", false), + scopeType("scope_type", "scopeType", "VARCHAR", false), createTime("create_time", "createTime", "BIGINT", false), updateTime("update_time", "updateTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), - projectId("project_id", "projectId", "VARCHAR", false), - thirdPart("third_part", "thirdPart", "BIT", false), - options("options", "options", "LONGVARCHAR", true); + scopeId("scope_id", "scopeId", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java similarity index 78% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java index b63f2f3074..6cda76b3c6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import java.util.ArrayList; import java.util.List; @@ -454,123 +454,133 @@ public class CustomFieldExample { return (Criteria) this; } - public Criteria andSystemIsNull() { - addCriterion("`system` is null"); + public Criteria andInternalIsNull() { + addCriterion("internal is null"); return (Criteria) this; } - public Criteria andSystemIsNotNull() { - addCriterion("`system` is not null"); + public Criteria andInternalIsNotNull() { + addCriterion("internal is not null"); return (Criteria) this; } - public Criteria andSystemEqualTo(Boolean value) { - addCriterion("`system` =", value, "system"); + public Criteria andInternalEqualTo(Boolean value) { + addCriterion("internal =", value, "internal"); return (Criteria) this; } - public Criteria andSystemNotEqualTo(Boolean value) { - addCriterion("`system` <>", value, "system"); + public Criteria andInternalNotEqualTo(Boolean value) { + addCriterion("internal <>", value, "internal"); return (Criteria) this; } - public Criteria andSystemGreaterThan(Boolean value) { - addCriterion("`system` >", value, "system"); + public Criteria andInternalGreaterThan(Boolean value) { + addCriterion("internal >", value, "internal"); return (Criteria) this; } - public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { - addCriterion("`system` >=", value, "system"); + public Criteria andInternalGreaterThanOrEqualTo(Boolean value) { + addCriterion("internal >=", value, "internal"); return (Criteria) this; } - public Criteria andSystemLessThan(Boolean value) { - addCriterion("`system` <", value, "system"); + public Criteria andInternalLessThan(Boolean value) { + addCriterion("internal <", value, "internal"); return (Criteria) this; } - public Criteria andSystemLessThanOrEqualTo(Boolean value) { - addCriterion("`system` <=", value, "system"); + public Criteria andInternalLessThanOrEqualTo(Boolean value) { + addCriterion("internal <=", value, "internal"); return (Criteria) this; } - public Criteria andSystemIn(List values) { - addCriterion("`system` in", values, "system"); + public Criteria andInternalIn(List values) { + addCriterion("internal in", values, "internal"); return (Criteria) this; } - public Criteria andSystemNotIn(List values) { - addCriterion("`system` not in", values, "system"); + public Criteria andInternalNotIn(List values) { + addCriterion("internal not in", values, "internal"); return (Criteria) this; } - public Criteria andSystemBetween(Boolean value1, Boolean value2) { - addCriterion("`system` between", value1, value2, "system"); + public Criteria andInternalBetween(Boolean value1, Boolean value2) { + addCriterion("internal between", value1, value2, "internal"); return (Criteria) this; } - public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { - addCriterion("`system` not between", value1, value2, "system"); + public Criteria andInternalNotBetween(Boolean value1, Boolean value2) { + addCriterion("internal not between", value1, value2, "internal"); return (Criteria) this; } - public Criteria andGlobalIsNull() { - addCriterion("`global` is null"); + public Criteria andScopeTypeIsNull() { + addCriterion("scope_type is null"); return (Criteria) this; } - public Criteria andGlobalIsNotNull() { - addCriterion("`global` is not null"); + public Criteria andScopeTypeIsNotNull() { + addCriterion("scope_type is not null"); return (Criteria) this; } - public Criteria andGlobalEqualTo(Boolean value) { - addCriterion("`global` =", value, "global"); + public Criteria andScopeTypeEqualTo(String value) { + addCriterion("scope_type =", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalNotEqualTo(Boolean value) { - addCriterion("`global` <>", value, "global"); + public Criteria andScopeTypeNotEqualTo(String value) { + addCriterion("scope_type <>", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalGreaterThan(Boolean value) { - addCriterion("`global` >", value, "global"); + public Criteria andScopeTypeGreaterThan(String value) { + addCriterion("scope_type >", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalGreaterThanOrEqualTo(Boolean value) { - addCriterion("`global` >=", value, "global"); + public Criteria andScopeTypeGreaterThanOrEqualTo(String value) { + addCriterion("scope_type >=", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalLessThan(Boolean value) { - addCriterion("`global` <", value, "global"); + public Criteria andScopeTypeLessThan(String value) { + addCriterion("scope_type <", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalLessThanOrEqualTo(Boolean value) { - addCriterion("`global` <=", value, "global"); + public Criteria andScopeTypeLessThanOrEqualTo(String value) { + addCriterion("scope_type <=", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalIn(List values) { - addCriterion("`global` in", values, "global"); + public Criteria andScopeTypeLike(String value) { + addCriterion("scope_type like", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalNotIn(List values) { - addCriterion("`global` not in", values, "global"); + public Criteria andScopeTypeNotLike(String value) { + addCriterion("scope_type not like", value, "scopeType"); return (Criteria) this; } - public Criteria andGlobalBetween(Boolean value1, Boolean value2) { - addCriterion("`global` between", value1, value2, "global"); + public Criteria andScopeTypeIn(List values) { + addCriterion("scope_type in", values, "scopeType"); return (Criteria) this; } - public Criteria andGlobalNotBetween(Boolean value1, Boolean value2) { - addCriterion("`global` not between", value1, value2, "global"); + public Criteria andScopeTypeNotIn(List values) { + addCriterion("scope_type not in", values, "scopeType"); + return (Criteria) this; + } + + public Criteria andScopeTypeBetween(String value1, String value2) { + addCriterion("scope_type between", value1, value2, "scopeType"); + return (Criteria) this; + } + + public Criteria andScopeTypeNotBetween(String value1, String value2) { + addCriterion("scope_type not between", value1, value2, "scopeType"); return (Criteria) this; } @@ -764,133 +774,73 @@ public class CustomFieldExample { return (Criteria) this; } - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); + public Criteria andScopeIdIsNull() { + addCriterion("scope_id is null"); return (Criteria) this; } - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); + public Criteria andScopeIdIsNotNull() { + addCriterion("scope_id is not null"); return (Criteria) this; } - public Criteria andProjectIdEqualTo(String value) { - addCriterion("project_id =", value, "projectId"); + public Criteria andScopeIdEqualTo(String value) { + addCriterion("scope_id =", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdNotEqualTo(String value) { - addCriterion("project_id <>", value, "projectId"); + public Criteria andScopeIdNotEqualTo(String value) { + addCriterion("scope_id <>", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdGreaterThan(String value) { - addCriterion("project_id >", value, "projectId"); + public Criteria andScopeIdGreaterThan(String value) { + addCriterion("scope_id >", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdGreaterThanOrEqualTo(String value) { - addCriterion("project_id >=", value, "projectId"); + public Criteria andScopeIdGreaterThanOrEqualTo(String value) { + addCriterion("scope_id >=", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdLessThan(String value) { - addCriterion("project_id <", value, "projectId"); + public Criteria andScopeIdLessThan(String value) { + addCriterion("scope_id <", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdLessThanOrEqualTo(String value) { - addCriterion("project_id <=", value, "projectId"); + public Criteria andScopeIdLessThanOrEqualTo(String value) { + addCriterion("scope_id <=", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdLike(String value) { - addCriterion("project_id like", value, "projectId"); + public Criteria andScopeIdLike(String value) { + addCriterion("scope_id like", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdNotLike(String value) { - addCriterion("project_id not like", value, "projectId"); + public Criteria andScopeIdNotLike(String value) { + addCriterion("scope_id not like", value, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); + public Criteria andScopeIdIn(List values) { + addCriterion("scope_id in", values, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); + public Criteria andScopeIdNotIn(List values) { + addCriterion("scope_id not in", values, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdBetween(String value1, String value2) { - addCriterion("project_id between", value1, value2, "projectId"); + public Criteria andScopeIdBetween(String value1, String value2) { + addCriterion("scope_id between", value1, value2, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdNotBetween(String value1, String value2) { - addCriterion("project_id not between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andThirdPartIsNull() { - addCriterion("third_part is null"); - return (Criteria) this; - } - - public Criteria andThirdPartIsNotNull() { - addCriterion("third_part is not null"); - return (Criteria) this; - } - - public Criteria andThirdPartEqualTo(Boolean value) { - addCriterion("third_part =", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartNotEqualTo(Boolean value) { - addCriterion("third_part <>", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartGreaterThan(Boolean value) { - addCriterion("third_part >", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartGreaterThanOrEqualTo(Boolean value) { - addCriterion("third_part >=", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartLessThan(Boolean value) { - addCriterion("third_part <", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartLessThanOrEqualTo(Boolean value) { - addCriterion("third_part <=", value, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartIn(List values) { - addCriterion("third_part in", values, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartNotIn(List values) { - addCriterion("third_part not in", values, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartBetween(Boolean value1, Boolean value2) { - addCriterion("third_part between", value1, value2, "thirdPart"); - return (Criteria) this; - } - - public Criteria andThirdPartNotBetween(Boolean value1, Boolean value2) { - addCriterion("third_part not between", value1, value2, "thirdPart"); + public Criteria andScopeIdNotBetween(String value1, String value2) { + addCriterion("scope_id not between", value1, value2, "scopeId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOption.java similarity index 59% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOption.java index 521d5a5f63..4ffa2cd48c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOption.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -9,44 +9,33 @@ import java.util.Arrays; import lombok.Data; @Data -public class FunctionalCaseTemplateExtend implements Serializable { - @Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_template_extend.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{functional_case_template_extend.id.length_range}", groups = {Created.class, Updated.class}) - private String id; +public class CustomFieldOption implements Serializable { + @Schema(description = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{custom_field_option.field_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{custom_field_option.field_id.length_range}", groups = {Created.class, Updated.class}) + private String fieldId; - @Schema(description = "用例名称模板") - private String caseName; + @Schema(description = "选项值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{custom_field_option.value.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{custom_field_option.value.length_range}", groups = {Created.class, Updated.class}) + private String value; - @Schema(description = "编辑模式模板:步骤模式/文本模式") - private String stepModel; + @Schema(description = "选项值名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{custom_field_option.text.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{custom_field_option.text.length_range}", groups = {Created.class, Updated.class}) + private String text; - @Schema(description = "前置条件模板") - private String prerequisite; - - @Schema(description = "步骤描述模板") - private String stepDescription; - - @Schema(description = "预期结果模板") - private String expectedResult; - - @Schema(description = "实际结果模板") - private String actualResult; - - @Schema(description = "用例步骤") - private String steps; + @Schema(description = "是否内置", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{custom_field_option.internal.not_blank}", groups = {Created.class}) + private Boolean internal; private static final long serialVersionUID = 1L; public enum Column { - id("id", "id", "VARCHAR", false), - caseName("case_name", "caseName", "VARCHAR", false), - stepModel("step_model", "stepModel", "VARCHAR", false), - prerequisite("prerequisite", "prerequisite", "LONGVARCHAR", false), - stepDescription("step_description", "stepDescription", "LONGVARCHAR", false), - expectedResult("expected_result", "expectedResult", "LONGVARCHAR", false), - actualResult("actual_result", "actualResult", "LONGVARCHAR", false), - steps("steps", "steps", "LONGVARCHAR", false); + fieldId("field_id", "fieldId", "VARCHAR", false), + value("value", "value", "VARCHAR", true), + text("text", "text", "VARCHAR", true), + internal("internal", "internal", "BIT", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOptionExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOptionExample.java new file mode 100644 index 0000000000..edec159e3a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldOptionExample.java @@ -0,0 +1,470 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFieldOptionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CustomFieldOptionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFieldIdIsNull() { + addCriterion("field_id is null"); + return (Criteria) this; + } + + public Criteria andFieldIdIsNotNull() { + addCriterion("field_id is not null"); + return (Criteria) this; + } + + public Criteria andFieldIdEqualTo(String value) { + addCriterion("field_id =", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotEqualTo(String value) { + addCriterion("field_id <>", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdGreaterThan(String value) { + addCriterion("field_id >", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdGreaterThanOrEqualTo(String value) { + addCriterion("field_id >=", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLessThan(String value) { + addCriterion("field_id <", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLessThanOrEqualTo(String value) { + addCriterion("field_id <=", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLike(String value) { + addCriterion("field_id like", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotLike(String value) { + addCriterion("field_id not like", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdIn(List values) { + addCriterion("field_id in", values, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotIn(List values) { + addCriterion("field_id not in", values, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdBetween(String value1, String value2) { + addCriterion("field_id between", value1, value2, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotBetween(String value1, String value2) { + addCriterion("field_id not between", value1, value2, "fieldId"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("`value` is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("`value` is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("`value` =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("`value` <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("`value` >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("`value` >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("`value` <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("`value` <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("`value` like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("`value` not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("`value` in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("`value` not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("`value` between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("`value` not between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andTextIsNull() { + addCriterion("`text` is null"); + return (Criteria) this; + } + + public Criteria andTextIsNotNull() { + addCriterion("`text` is not null"); + return (Criteria) this; + } + + public Criteria andTextEqualTo(String value) { + addCriterion("`text` =", value, "text"); + return (Criteria) this; + } + + public Criteria andTextNotEqualTo(String value) { + addCriterion("`text` <>", value, "text"); + return (Criteria) this; + } + + public Criteria andTextGreaterThan(String value) { + addCriterion("`text` >", value, "text"); + return (Criteria) this; + } + + public Criteria andTextGreaterThanOrEqualTo(String value) { + addCriterion("`text` >=", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLessThan(String value) { + addCriterion("`text` <", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLessThanOrEqualTo(String value) { + addCriterion("`text` <=", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLike(String value) { + addCriterion("`text` like", value, "text"); + return (Criteria) this; + } + + public Criteria andTextNotLike(String value) { + addCriterion("`text` not like", value, "text"); + return (Criteria) this; + } + + public Criteria andTextIn(List values) { + addCriterion("`text` in", values, "text"); + return (Criteria) this; + } + + public Criteria andTextNotIn(List values) { + addCriterion("`text` not in", values, "text"); + return (Criteria) this; + } + + public Criteria andTextBetween(String value1, String value2) { + addCriterion("`text` between", value1, value2, "text"); + return (Criteria) this; + } + + public Criteria andTextNotBetween(String value1, String value2) { + addCriterion("`text` not between", value1, value2, "text"); + return (Criteria) this; + } + + public Criteria andInternalIsNull() { + addCriterion("internal is null"); + return (Criteria) this; + } + + public Criteria andInternalIsNotNull() { + addCriterion("internal is not null"); + return (Criteria) this; + } + + public Criteria andInternalEqualTo(Boolean value) { + addCriterion("internal =", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalNotEqualTo(Boolean value) { + addCriterion("internal <>", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalGreaterThan(Boolean value) { + addCriterion("internal >", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalGreaterThanOrEqualTo(Boolean value) { + addCriterion("internal >=", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalLessThan(Boolean value) { + addCriterion("internal <", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalLessThanOrEqualTo(Boolean value) { + addCriterion("internal <=", value, "internal"); + return (Criteria) this; + } + + public Criteria andInternalIn(List values) { + addCriterion("internal in", values, "internal"); + return (Criteria) this; + } + + public Criteria andInternalNotIn(List values) { + addCriterion("internal not in", values, "internal"); + return (Criteria) this; + } + + public Criteria andInternalBetween(Boolean value1, Boolean value2) { + addCriterion("internal between", value1, value2, "internal"); + return (Criteria) this; + } + + public Criteria andInternalNotBetween(Boolean value1, Boolean value2) { + addCriterion("internal not between", value1, value2, "internal"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtend.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinition.java similarity index 72% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtend.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinition.java index db434d967c..0ff76abf8f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinition.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -9,24 +9,26 @@ import java.util.Arrays; import lombok.Data; @Data -public class BugTemplateExtend implements Serializable { - @Schema(description = "缺陷模板ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{bug_template_extend.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{bug_template_extend.id.length_range}", groups = {Created.class, Updated.class}) +public class StatusDefinition implements Serializable { + @Schema(description = "状态ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_definition.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{status_definition.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "缺陷标题模板") - private String title; + @Schema(description = "状态ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_definition.status_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{status_definition.status_id.length_range}", groups = {Created.class, Updated.class}) + private String statusId; - @Schema(description = "缺陷内容模板") - private String content; + @Schema(description = "状态定义ID") + private String definitionId; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), - title("title", "title", "VARCHAR", false), - content("content", "content", "LONGVARCHAR", false); + statusId("status_id", "statusId", "VARCHAR", false), + definitionId("definition_id", "definitionId", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinitionExample.java similarity index 69% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinitionExample.java index 27fcfdcc61..ffde60e916 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusDefinitionExample.java @@ -1,16 +1,16 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import java.util.ArrayList; import java.util.List; -public class FunctionalCaseTemplateExtendExample { +public class StatusDefinitionExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public FunctionalCaseTemplateExtendExample() { + public StatusDefinitionExample() { oredCriteria = new ArrayList(); } @@ -174,143 +174,143 @@ public class FunctionalCaseTemplateExtendExample { return (Criteria) this; } - public Criteria andCaseNameIsNull() { - addCriterion("case_name is null"); + public Criteria andStatusIdIsNull() { + addCriterion("status_id is null"); return (Criteria) this; } - public Criteria andCaseNameIsNotNull() { - addCriterion("case_name is not null"); + public Criteria andStatusIdIsNotNull() { + addCriterion("status_id is not null"); return (Criteria) this; } - public Criteria andCaseNameEqualTo(String value) { - addCriterion("case_name =", value, "caseName"); + public Criteria andStatusIdEqualTo(String value) { + addCriterion("status_id =", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameNotEqualTo(String value) { - addCriterion("case_name <>", value, "caseName"); + public Criteria andStatusIdNotEqualTo(String value) { + addCriterion("status_id <>", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameGreaterThan(String value) { - addCriterion("case_name >", value, "caseName"); + public Criteria andStatusIdGreaterThan(String value) { + addCriterion("status_id >", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameGreaterThanOrEqualTo(String value) { - addCriterion("case_name >=", value, "caseName"); + public Criteria andStatusIdGreaterThanOrEqualTo(String value) { + addCriterion("status_id >=", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameLessThan(String value) { - addCriterion("case_name <", value, "caseName"); + public Criteria andStatusIdLessThan(String value) { + addCriterion("status_id <", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameLessThanOrEqualTo(String value) { - addCriterion("case_name <=", value, "caseName"); + public Criteria andStatusIdLessThanOrEqualTo(String value) { + addCriterion("status_id <=", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameLike(String value) { - addCriterion("case_name like", value, "caseName"); + public Criteria andStatusIdLike(String value) { + addCriterion("status_id like", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameNotLike(String value) { - addCriterion("case_name not like", value, "caseName"); + public Criteria andStatusIdNotLike(String value) { + addCriterion("status_id not like", value, "statusId"); return (Criteria) this; } - public Criteria andCaseNameIn(List values) { - addCriterion("case_name in", values, "caseName"); + public Criteria andStatusIdIn(List values) { + addCriterion("status_id in", values, "statusId"); return (Criteria) this; } - public Criteria andCaseNameNotIn(List values) { - addCriterion("case_name not in", values, "caseName"); + public Criteria andStatusIdNotIn(List values) { + addCriterion("status_id not in", values, "statusId"); return (Criteria) this; } - public Criteria andCaseNameBetween(String value1, String value2) { - addCriterion("case_name between", value1, value2, "caseName"); + public Criteria andStatusIdBetween(String value1, String value2) { + addCriterion("status_id between", value1, value2, "statusId"); return (Criteria) this; } - public Criteria andCaseNameNotBetween(String value1, String value2) { - addCriterion("case_name not between", value1, value2, "caseName"); + public Criteria andStatusIdNotBetween(String value1, String value2) { + addCriterion("status_id not between", value1, value2, "statusId"); return (Criteria) this; } - public Criteria andStepModelIsNull() { - addCriterion("step_model is null"); + public Criteria andDefinitionIdIsNull() { + addCriterion("definition_id is null"); return (Criteria) this; } - public Criteria andStepModelIsNotNull() { - addCriterion("step_model is not null"); + public Criteria andDefinitionIdIsNotNull() { + addCriterion("definition_id is not null"); return (Criteria) this; } - public Criteria andStepModelEqualTo(String value) { - addCriterion("step_model =", value, "stepModel"); + public Criteria andDefinitionIdEqualTo(String value) { + addCriterion("definition_id =", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelNotEqualTo(String value) { - addCriterion("step_model <>", value, "stepModel"); + public Criteria andDefinitionIdNotEqualTo(String value) { + addCriterion("definition_id <>", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelGreaterThan(String value) { - addCriterion("step_model >", value, "stepModel"); + public Criteria andDefinitionIdGreaterThan(String value) { + addCriterion("definition_id >", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelGreaterThanOrEqualTo(String value) { - addCriterion("step_model >=", value, "stepModel"); + public Criteria andDefinitionIdGreaterThanOrEqualTo(String value) { + addCriterion("definition_id >=", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelLessThan(String value) { - addCriterion("step_model <", value, "stepModel"); + public Criteria andDefinitionIdLessThan(String value) { + addCriterion("definition_id <", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelLessThanOrEqualTo(String value) { - addCriterion("step_model <=", value, "stepModel"); + public Criteria andDefinitionIdLessThanOrEqualTo(String value) { + addCriterion("definition_id <=", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelLike(String value) { - addCriterion("step_model like", value, "stepModel"); + public Criteria andDefinitionIdLike(String value) { + addCriterion("definition_id like", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelNotLike(String value) { - addCriterion("step_model not like", value, "stepModel"); + public Criteria andDefinitionIdNotLike(String value) { + addCriterion("definition_id not like", value, "definitionId"); return (Criteria) this; } - public Criteria andStepModelIn(List values) { - addCriterion("step_model in", values, "stepModel"); + public Criteria andDefinitionIdIn(List values) { + addCriterion("definition_id in", values, "definitionId"); return (Criteria) this; } - public Criteria andStepModelNotIn(List values) { - addCriterion("step_model not in", values, "stepModel"); + public Criteria andDefinitionIdNotIn(List values) { + addCriterion("definition_id not in", values, "definitionId"); return (Criteria) this; } - public Criteria andStepModelBetween(String value1, String value2) { - addCriterion("step_model between", value1, value2, "stepModel"); + public Criteria andDefinitionIdBetween(String value1, String value2) { + addCriterion("definition_id between", value1, value2, "definitionId"); return (Criteria) this; } - public Criteria andStepModelNotBetween(String value1, String value2) { - addCriterion("step_model not between", value1, value2, "stepModel"); + public Criteria andDefinitionIdNotBetween(String value1, String value2) { + addCriterion("definition_id not between", value1, value2, "definitionId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItem.java similarity index 54% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItem.java index 379b562157..4257582416 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItem.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -9,44 +9,49 @@ import java.util.Arrays; import lombok.Data; @Data -public class ApiTemplate implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_template.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{api_template.id.length_range}", groups = {Created.class, Updated.class}) +public class StatusItem implements Serializable { + @Schema(description = "状态ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_item.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{status_item.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_template.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 255, message = "{api_template.name.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "状态名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_item.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{status_item.name.length_range}", groups = {Created.class, Updated.class}) private String name; - @Schema(description = "描述") - private String description; + @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_item.scene.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 30, message = "{status_item.scene.length_range}", groups = {Created.class, Updated.class}) + private String scene; - @Schema(description = "是否是内置模板") + @Schema(description = "状态说明") + private String remark; + + @Schema(description = "是否是内置字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{status_item.internal.not_blank}", groups = {Created.class}) private Boolean internal; - @Schema(description = "创建时间") - private Long createTime; + @Schema(description = "组织或项目级别字段(PROJECT, ORGANIZATION)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_item.scope_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{status_item.scope_type.length_range}", groups = {Created.class, Updated.class}) + private String scopeType; - @Schema(description = "创建人") - private String createUser; - - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_template.project_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{api_template.project_id.length_range}", groups = {Created.class, Updated.class}) - private String projectId; + @Schema(description = "组织或项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{status_item.scope_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{status_item.scope_id.length_range}", groups = {Created.class, Updated.class}) + private String scopeId; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), name("name", "name", "VARCHAR", true), - description("description", "description", "VARCHAR", false), + scene("scene", "scene", "VARCHAR", false), + remark("remark", "remark", "VARCHAR", false), internal("internal", "internal", "BIT", false), - createTime("create_time", "createTime", "BIGINT", false), - createUser("create_user", "createUser", "VARCHAR", false), - projectId("project_id", "projectId", "VARCHAR", false); + scopeType("scope_type", "scopeType", "VARCHAR", false), + scopeId("scope_id", "scopeId", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItemExample.java similarity index 66% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItemExample.java index 293708b3de..261041d719 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/StatusItemExample.java @@ -1,16 +1,16 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import java.util.ArrayList; import java.util.List; -public class ApiTemplateExample { +public class StatusItemExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public ApiTemplateExample() { + public StatusItemExample() { oredCriteria = new ArrayList(); } @@ -244,73 +244,143 @@ public class ApiTemplateExample { return (Criteria) this; } - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); + public Criteria andSceneIsNull() { + addCriterion("scene is null"); return (Criteria) this; } - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); + public Criteria andSceneIsNotNull() { + addCriterion("scene is not null"); return (Criteria) this; } - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); + public Criteria andSceneEqualTo(String value) { + addCriterion("scene =", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); + public Criteria andSceneNotEqualTo(String value) { + addCriterion("scene <>", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); + public Criteria andSceneGreaterThan(String value) { + addCriterion("scene >", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); + public Criteria andSceneGreaterThanOrEqualTo(String value) { + addCriterion("scene >=", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); + public Criteria andSceneLessThan(String value) { + addCriterion("scene <", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); + public Criteria andSceneLessThanOrEqualTo(String value) { + addCriterion("scene <=", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); + public Criteria andSceneLike(String value) { + addCriterion("scene like", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); + public Criteria andSceneNotLike(String value) { + addCriterion("scene not like", value, "scene"); return (Criteria) this; } - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); + public Criteria andSceneIn(List values) { + addCriterion("scene in", values, "scene"); return (Criteria) this; } - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); + public Criteria andSceneNotIn(List values) { + addCriterion("scene not in", values, "scene"); return (Criteria) this; } - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); + public Criteria andSceneBetween(String value1, String value2) { + addCriterion("scene between", value1, value2, "scene"); return (Criteria) this; } - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); + public Criteria andSceneNotBetween(String value1, String value2) { + addCriterion("scene not between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); return (Criteria) this; } @@ -374,203 +444,143 @@ public class ApiTemplateExample { return (Criteria) this; } - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); + public Criteria andScopeTypeIsNull() { + addCriterion("scope_type is null"); return (Criteria) this; } - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); + public Criteria andScopeTypeIsNotNull() { + addCriterion("scope_type is not null"); return (Criteria) this; } - public Criteria andCreateTimeEqualTo(Long value) { - addCriterion("create_time =", value, "createTime"); + public Criteria andScopeTypeEqualTo(String value) { + addCriterion("scope_type =", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeNotEqualTo(Long value) { - addCriterion("create_time <>", value, "createTime"); + public Criteria andScopeTypeNotEqualTo(String value) { + addCriterion("scope_type <>", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThan(Long value) { - addCriterion("create_time >", value, "createTime"); + public Criteria andScopeTypeGreaterThan(String value) { + addCriterion("scope_type >", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("create_time >=", value, "createTime"); + public Criteria andScopeTypeGreaterThanOrEqualTo(String value) { + addCriterion("scope_type >=", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeLessThan(Long value) { - addCriterion("create_time <", value, "createTime"); + public Criteria andScopeTypeLessThan(String value) { + addCriterion("scope_type <", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeLessThanOrEqualTo(Long value) { - addCriterion("create_time <=", value, "createTime"); + public Criteria andScopeTypeLessThanOrEqualTo(String value) { + addCriterion("scope_type <=", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); + public Criteria andScopeTypeLike(String value) { + addCriterion("scope_type like", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); + public Criteria andScopeTypeNotLike(String value) { + addCriterion("scope_type not like", value, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeBetween(Long value1, Long value2) { - addCriterion("create_time between", value1, value2, "createTime"); + public Criteria andScopeTypeIn(List values) { + addCriterion("scope_type in", values, "scopeType"); return (Criteria) this; } - public Criteria andCreateTimeNotBetween(Long value1, Long value2) { - addCriterion("create_time not between", value1, value2, "createTime"); + public Criteria andScopeTypeNotIn(List values) { + addCriterion("scope_type not in", values, "scopeType"); return (Criteria) this; } - public Criteria andCreateUserIsNull() { - addCriterion("create_user is null"); + public Criteria andScopeTypeBetween(String value1, String value2) { + addCriterion("scope_type between", value1, value2, "scopeType"); return (Criteria) this; } - public Criteria andCreateUserIsNotNull() { - addCriterion("create_user is not null"); + public Criteria andScopeTypeNotBetween(String value1, String value2) { + addCriterion("scope_type not between", value1, value2, "scopeType"); return (Criteria) this; } - public Criteria andCreateUserEqualTo(String value) { - addCriterion("create_user =", value, "createUser"); + public Criteria andScopeIdIsNull() { + addCriterion("scope_id is null"); return (Criteria) this; } - public Criteria andCreateUserNotEqualTo(String value) { - addCriterion("create_user <>", value, "createUser"); + public Criteria andScopeIdIsNotNull() { + addCriterion("scope_id is not null"); return (Criteria) this; } - public Criteria andCreateUserGreaterThan(String value) { - addCriterion("create_user >", value, "createUser"); + public Criteria andScopeIdEqualTo(String value) { + addCriterion("scope_id =", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserGreaterThanOrEqualTo(String value) { - addCriterion("create_user >=", value, "createUser"); + public Criteria andScopeIdNotEqualTo(String value) { + addCriterion("scope_id <>", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserLessThan(String value) { - addCriterion("create_user <", value, "createUser"); + public Criteria andScopeIdGreaterThan(String value) { + addCriterion("scope_id >", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserLessThanOrEqualTo(String value) { - addCriterion("create_user <=", value, "createUser"); + public Criteria andScopeIdGreaterThanOrEqualTo(String value) { + addCriterion("scope_id >=", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserLike(String value) { - addCriterion("create_user like", value, "createUser"); + public Criteria andScopeIdLessThan(String value) { + addCriterion("scope_id <", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserNotLike(String value) { - addCriterion("create_user not like", value, "createUser"); + public Criteria andScopeIdLessThanOrEqualTo(String value) { + addCriterion("scope_id <=", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserIn(List values) { - addCriterion("create_user in", values, "createUser"); + public Criteria andScopeIdLike(String value) { + addCriterion("scope_id like", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserNotIn(List values) { - addCriterion("create_user not in", values, "createUser"); + public Criteria andScopeIdNotLike(String value) { + addCriterion("scope_id not like", value, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserBetween(String value1, String value2) { - addCriterion("create_user between", value1, value2, "createUser"); + public Criteria andScopeIdIn(List values) { + addCriterion("scope_id in", values, "scopeId"); return (Criteria) this; } - public Criteria andCreateUserNotBetween(String value1, String value2) { - addCriterion("create_user not between", value1, value2, "createUser"); + public Criteria andScopeIdNotIn(List values) { + addCriterion("scope_id not in", values, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); + public Criteria andScopeIdBetween(String value1, String value2) { + addCriterion("scope_id between", value1, value2, "scopeId"); return (Criteria) this; } - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdEqualTo(String value) { - addCriterion("project_id =", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(String value) { - addCriterion("project_id <>", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThan(String value) { - addCriterion("project_id >", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThanOrEqualTo(String value) { - addCriterion("project_id >=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThan(String value) { - addCriterion("project_id <", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThanOrEqualTo(String value) { - addCriterion("project_id <=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLike(String value) { - addCriterion("project_id like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotLike(String value) { - addCriterion("project_id not like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdBetween(String value1, String value2) { - addCriterion("project_id between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotBetween(String value1, String value2) { - addCriterion("project_id not between", value1, value2, "projectId"); + public Criteria andScopeIdNotBetween(String value1, String value2) { + addCriterion("scope_id not between", value1, value2, "scopeId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java similarity index 51% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplate.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java index c6d07ed1cd..57c573078e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -9,44 +9,66 @@ import java.util.Arrays; import lombok.Data; @Data -public class BugTemplate implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{bug_template.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{bug_template.id.length_range}", groups = {Created.class, Updated.class}) +public class Template implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{template.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{bug_template.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 255, message = "{bug_template.name.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{template.name.length_range}", groups = {Created.class, Updated.class}) private String name; - @Schema(description = "描述") - private String description; + @Schema(description = "备注") + private String remark; - @Schema(description = "是否是内置模板") + @Schema(description = "是否是内置模板", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{template.internal.not_blank}", groups = {Created.class}) private Boolean internal; - @Schema(description = "创建时间") + @Schema(description = "创建时间") + private Long updateTime; + + @Schema(description = "创建时间") private Long createTime; - @Schema(description = "创建人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{bug_template.project_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{bug_template.project_id.length_range}", groups = {Created.class, Updated.class}) - private String projectId; + @Schema(description = "组织或项目级别字段(PROJECT, ORGANIZATION)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template.scope_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{template.scope_type.length_range}", groups = {Created.class, Updated.class}) + private String scopeType; + + @Schema(description = "组织或项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template.scope_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{template.scope_id.length_range}", groups = {Created.class, Updated.class}) + private String scopeId; + + @Schema(description = "是否开启api字段名配置", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{template.enable_third_part.not_blank}", groups = {Created.class}) + private Boolean enableThirdPart; + + @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template.scene.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 30, message = "{template.scene.length_range}", groups = {Created.class, Updated.class}) + private String scene; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), name("name", "name", "VARCHAR", true), - description("description", "description", "VARCHAR", false), + remark("remark", "remark", "VARCHAR", false), internal("internal", "internal", "BIT", false), + updateTime("update_time", "updateTime", "BIGINT", false), createTime("create_time", "createTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), - projectId("project_id", "projectId", "VARCHAR", false); + scopeType("scope_type", "scopeType", "VARCHAR", false), + scopeId("scope_id", "scopeId", "VARCHAR", false), + enableThirdPart("enable_third_part", "enableThirdPart", "BIT", false), + scene("scene", "scene", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomField.java similarity index 64% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomField.java index d828f1cf56..3ecfd9a00b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomField.java @@ -1,4 +1,4 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -9,41 +9,35 @@ import java.util.Arrays; import lombok.Data; @Data -public class CustomFieldTemplate implements Serializable { - @Schema(description = "自定义模版ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_template.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{custom_field_template.id.length_range}", groups = {Created.class, Updated.class}) +public class TemplateCustomField implements Serializable { + @Schema(description = "自定义模版ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template_custom_field.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{template_custom_field.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_template.field_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_template.field_id.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template_custom_field.field_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{template_custom_field.field_id.length_range}", groups = {Created.class, Updated.class}) private String fieldId; - @Schema(description = "模版ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_template.template_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_template.template_id.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "模版ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{template_custom_field.template_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{template_custom_field.template_id.length_range}", groups = {Created.class, Updated.class}) private String templateId; - @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_template.scene.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 30, message = "{custom_field_template.scene.length_range}", groups = {Created.class, Updated.class}) - private String scene; - - @Schema(description = "是否必填") + @Schema(description = "是否必填", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{template_custom_field.required.not_blank}", groups = {Created.class}) private Boolean required; - @Schema(description = "排序字段") + @Schema(description = "排序字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{template_custom_field.pos.not_blank}", groups = {Created.class}) private Integer pos; - @Schema(description = "自定义数据") - private String customData; + @Schema(description = "api字段名") + private String apiFieldId; - @Schema(description = "自定义表头") - private String key; - - @Schema(description = "默认值") - private byte[] defaultValue; + @Schema(description = "默认值") + private String defaultValue; private static final long serialVersionUID = 1L; @@ -51,12 +45,10 @@ public class CustomFieldTemplate implements Serializable { id("id", "id", "VARCHAR", false), fieldId("field_id", "fieldId", "VARCHAR", false), templateId("template_id", "templateId", "VARCHAR", false), - scene("scene", "scene", "VARCHAR", false), required("required", "required", "BIT", false), pos("pos", "pos", "INTEGER", false), - customData("custom_data", "customData", "VARCHAR", false), - key("key", "key", "VARCHAR", true), - defaultValue("default_value", "defaultValue", "LONGVARBINARY", false); + apiFieldId("api_field_id", "apiFieldId", "VARCHAR", false), + defaultValue("default_value", "defaultValue", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomFieldExample.java similarity index 75% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomFieldExample.java index 8f7817a3e6..4b2a40f840 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateCustomFieldExample.java @@ -1,16 +1,16 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import java.util.ArrayList; import java.util.List; -public class CustomFieldTemplateExample { +public class TemplateCustomFieldExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public CustomFieldTemplateExample() { + public TemplateCustomFieldExample() { oredCriteria = new ArrayList(); } @@ -314,76 +314,6 @@ public class CustomFieldTemplateExample { return (Criteria) this; } - public Criteria andSceneIsNull() { - addCriterion("scene is null"); - return (Criteria) this; - } - - public Criteria andSceneIsNotNull() { - addCriterion("scene is not null"); - return (Criteria) this; - } - - public Criteria andSceneEqualTo(String value) { - addCriterion("scene =", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotEqualTo(String value) { - addCriterion("scene <>", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneGreaterThan(String value) { - addCriterion("scene >", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneGreaterThanOrEqualTo(String value) { - addCriterion("scene >=", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneLessThan(String value) { - addCriterion("scene <", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneLessThanOrEqualTo(String value) { - addCriterion("scene <=", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneLike(String value) { - addCriterion("scene like", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotLike(String value) { - addCriterion("scene not like", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneIn(List values) { - addCriterion("scene in", values, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotIn(List values) { - addCriterion("scene not in", values, "scene"); - return (Criteria) this; - } - - public Criteria andSceneBetween(String value1, String value2) { - addCriterion("scene between", value1, value2, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotBetween(String value1, String value2) { - addCriterion("scene not between", value1, value2, "scene"); - return (Criteria) this; - } - public Criteria andRequiredIsNull() { addCriterion("required is null"); return (Criteria) this; @@ -504,143 +434,143 @@ public class CustomFieldTemplateExample { return (Criteria) this; } - public Criteria andCustomDataIsNull() { - addCriterion("custom_data is null"); + public Criteria andApiFieldIdIsNull() { + addCriterion("api_field_id is null"); return (Criteria) this; } - public Criteria andCustomDataIsNotNull() { - addCriterion("custom_data is not null"); + public Criteria andApiFieldIdIsNotNull() { + addCriterion("api_field_id is not null"); return (Criteria) this; } - public Criteria andCustomDataEqualTo(String value) { - addCriterion("custom_data =", value, "customData"); + public Criteria andApiFieldIdEqualTo(String value) { + addCriterion("api_field_id =", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataNotEqualTo(String value) { - addCriterion("custom_data <>", value, "customData"); + public Criteria andApiFieldIdNotEqualTo(String value) { + addCriterion("api_field_id <>", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataGreaterThan(String value) { - addCriterion("custom_data >", value, "customData"); + public Criteria andApiFieldIdGreaterThan(String value) { + addCriterion("api_field_id >", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataGreaterThanOrEqualTo(String value) { - addCriterion("custom_data >=", value, "customData"); + public Criteria andApiFieldIdGreaterThanOrEqualTo(String value) { + addCriterion("api_field_id >=", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataLessThan(String value) { - addCriterion("custom_data <", value, "customData"); + public Criteria andApiFieldIdLessThan(String value) { + addCriterion("api_field_id <", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataLessThanOrEqualTo(String value) { - addCriterion("custom_data <=", value, "customData"); + public Criteria andApiFieldIdLessThanOrEqualTo(String value) { + addCriterion("api_field_id <=", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataLike(String value) { - addCriterion("custom_data like", value, "customData"); + public Criteria andApiFieldIdLike(String value) { + addCriterion("api_field_id like", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataNotLike(String value) { - addCriterion("custom_data not like", value, "customData"); + public Criteria andApiFieldIdNotLike(String value) { + addCriterion("api_field_id not like", value, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataIn(List values) { - addCriterion("custom_data in", values, "customData"); + public Criteria andApiFieldIdIn(List values) { + addCriterion("api_field_id in", values, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataNotIn(List values) { - addCriterion("custom_data not in", values, "customData"); + public Criteria andApiFieldIdNotIn(List values) { + addCriterion("api_field_id not in", values, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataBetween(String value1, String value2) { - addCriterion("custom_data between", value1, value2, "customData"); + public Criteria andApiFieldIdBetween(String value1, String value2) { + addCriterion("api_field_id between", value1, value2, "apiFieldId"); return (Criteria) this; } - public Criteria andCustomDataNotBetween(String value1, String value2) { - addCriterion("custom_data not between", value1, value2, "customData"); + public Criteria andApiFieldIdNotBetween(String value1, String value2) { + addCriterion("api_field_id not between", value1, value2, "apiFieldId"); return (Criteria) this; } - public Criteria andKeyIsNull() { - addCriterion("`key` is null"); + public Criteria andDefaultValueIsNull() { + addCriterion("default_value is null"); return (Criteria) this; } - public Criteria andKeyIsNotNull() { - addCriterion("`key` is not null"); + public Criteria andDefaultValueIsNotNull() { + addCriterion("default_value is not null"); return (Criteria) this; } - public Criteria andKeyEqualTo(String value) { - addCriterion("`key` =", value, "key"); + public Criteria andDefaultValueEqualTo(String value) { + addCriterion("default_value =", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyNotEqualTo(String value) { - addCriterion("`key` <>", value, "key"); + public Criteria andDefaultValueNotEqualTo(String value) { + addCriterion("default_value <>", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyGreaterThan(String value) { - addCriterion("`key` >", value, "key"); + public Criteria andDefaultValueGreaterThan(String value) { + addCriterion("default_value >", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyGreaterThanOrEqualTo(String value) { - addCriterion("`key` >=", value, "key"); + public Criteria andDefaultValueGreaterThanOrEqualTo(String value) { + addCriterion("default_value >=", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyLessThan(String value) { - addCriterion("`key` <", value, "key"); + public Criteria andDefaultValueLessThan(String value) { + addCriterion("default_value <", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyLessThanOrEqualTo(String value) { - addCriterion("`key` <=", value, "key"); + public Criteria andDefaultValueLessThanOrEqualTo(String value) { + addCriterion("default_value <=", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyLike(String value) { - addCriterion("`key` like", value, "key"); + public Criteria andDefaultValueLike(String value) { + addCriterion("default_value like", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyNotLike(String value) { - addCriterion("`key` not like", value, "key"); + public Criteria andDefaultValueNotLike(String value) { + addCriterion("default_value not like", value, "defaultValue"); return (Criteria) this; } - public Criteria andKeyIn(List values) { - addCriterion("`key` in", values, "key"); + public Criteria andDefaultValueIn(List values) { + addCriterion("default_value in", values, "defaultValue"); return (Criteria) this; } - public Criteria andKeyNotIn(List values) { - addCriterion("`key` not in", values, "key"); + public Criteria andDefaultValueNotIn(List values) { + addCriterion("default_value not in", values, "defaultValue"); return (Criteria) this; } - public Criteria andKeyBetween(String value1, String value2) { - addCriterion("`key` between", value1, value2, "key"); + public Criteria andDefaultValueBetween(String value1, String value2) { + addCriterion("default_value between", value1, value2, "defaultValue"); return (Criteria) this; } - public Criteria andKeyNotBetween(String value1, String value2) { - addCriterion("`key` not between", value1, value2, "key"); + public Criteria andDefaultValueNotBetween(String value1, String value2) { + addCriterion("default_value not between", value1, value2, "defaultValue"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java similarity index 58% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java rename to backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java index fd25ef4269..3afd16ffe4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java @@ -1,16 +1,16 @@ -package io.metersphere.project.domain; +package io.metersphere.system.domain; import java.util.ArrayList; import java.util.List; -public class FunctionalCaseTemplateExample { +public class TemplateExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public FunctionalCaseTemplateExample() { + public TemplateExample() { oredCriteria = new ArrayList(); } @@ -244,73 +244,73 @@ public class FunctionalCaseTemplateExample { return (Criteria) this; } - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); return (Criteria) this; } - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); return (Criteria) this; } - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); return (Criteria) this; } - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); return (Criteria) this; } - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); return (Criteria) this; } - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); return (Criteria) this; } - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); return (Criteria) this; } @@ -374,6 +374,66 @@ public class FunctionalCaseTemplateExample { return (Criteria) this; } + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; @@ -504,73 +564,273 @@ public class FunctionalCaseTemplateExample { return (Criteria) this; } - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); + public Criteria andScopeTypeIsNull() { + addCriterion("scope_type is null"); return (Criteria) this; } - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); + public Criteria andScopeTypeIsNotNull() { + addCriterion("scope_type is not null"); return (Criteria) this; } - public Criteria andProjectIdEqualTo(String value) { - addCriterion("project_id =", value, "projectId"); + public Criteria andScopeTypeEqualTo(String value) { + addCriterion("scope_type =", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdNotEqualTo(String value) { - addCriterion("project_id <>", value, "projectId"); + public Criteria andScopeTypeNotEqualTo(String value) { + addCriterion("scope_type <>", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdGreaterThan(String value) { - addCriterion("project_id >", value, "projectId"); + public Criteria andScopeTypeGreaterThan(String value) { + addCriterion("scope_type >", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdGreaterThanOrEqualTo(String value) { - addCriterion("project_id >=", value, "projectId"); + public Criteria andScopeTypeGreaterThanOrEqualTo(String value) { + addCriterion("scope_type >=", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdLessThan(String value) { - addCriterion("project_id <", value, "projectId"); + public Criteria andScopeTypeLessThan(String value) { + addCriterion("scope_type <", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdLessThanOrEqualTo(String value) { - addCriterion("project_id <=", value, "projectId"); + public Criteria andScopeTypeLessThanOrEqualTo(String value) { + addCriterion("scope_type <=", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdLike(String value) { - addCriterion("project_id like", value, "projectId"); + public Criteria andScopeTypeLike(String value) { + addCriterion("scope_type like", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdNotLike(String value) { - addCriterion("project_id not like", value, "projectId"); + public Criteria andScopeTypeNotLike(String value) { + addCriterion("scope_type not like", value, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); + public Criteria andScopeTypeIn(List values) { + addCriterion("scope_type in", values, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); + public Criteria andScopeTypeNotIn(List values) { + addCriterion("scope_type not in", values, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdBetween(String value1, String value2) { - addCriterion("project_id between", value1, value2, "projectId"); + public Criteria andScopeTypeBetween(String value1, String value2) { + addCriterion("scope_type between", value1, value2, "scopeType"); return (Criteria) this; } - public Criteria andProjectIdNotBetween(String value1, String value2) { - addCriterion("project_id not between", value1, value2, "projectId"); + public Criteria andScopeTypeNotBetween(String value1, String value2) { + addCriterion("scope_type not between", value1, value2, "scopeType"); + return (Criteria) this; + } + + public Criteria andScopeIdIsNull() { + addCriterion("scope_id is null"); + return (Criteria) this; + } + + public Criteria andScopeIdIsNotNull() { + addCriterion("scope_id is not null"); + return (Criteria) this; + } + + public Criteria andScopeIdEqualTo(String value) { + addCriterion("scope_id =", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotEqualTo(String value) { + addCriterion("scope_id <>", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdGreaterThan(String value) { + addCriterion("scope_id >", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdGreaterThanOrEqualTo(String value) { + addCriterion("scope_id >=", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLessThan(String value) { + addCriterion("scope_id <", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLessThanOrEqualTo(String value) { + addCriterion("scope_id <=", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLike(String value) { + addCriterion("scope_id like", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotLike(String value) { + addCriterion("scope_id not like", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdIn(List values) { + addCriterion("scope_id in", values, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotIn(List values) { + addCriterion("scope_id not in", values, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdBetween(String value1, String value2) { + addCriterion("scope_id between", value1, value2, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotBetween(String value1, String value2) { + addCriterion("scope_id not between", value1, value2, "scopeId"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartIsNull() { + addCriterion("enable_third_part is null"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartIsNotNull() { + addCriterion("enable_third_part is not null"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartEqualTo(Boolean value) { + addCriterion("enable_third_part =", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartNotEqualTo(Boolean value) { + addCriterion("enable_third_part <>", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartGreaterThan(Boolean value) { + addCriterion("enable_third_part >", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartGreaterThanOrEqualTo(Boolean value) { + addCriterion("enable_third_part >=", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartLessThan(Boolean value) { + addCriterion("enable_third_part <", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartLessThanOrEqualTo(Boolean value) { + addCriterion("enable_third_part <=", value, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartIn(List values) { + addCriterion("enable_third_part in", values, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartNotIn(List values) { + addCriterion("enable_third_part not in", values, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartBetween(Boolean value1, Boolean value2) { + addCriterion("enable_third_part between", value1, value2, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andEnableThirdPartNotBetween(Boolean value1, Boolean value2) { + addCriterion("enable_third_part not between", value1, value2, "enableThirdPart"); + return (Criteria) this; + } + + public Criteria andSceneIsNull() { + addCriterion("scene is null"); + return (Criteria) this; + } + + public Criteria andSceneIsNotNull() { + addCriterion("scene is not null"); + return (Criteria) this; + } + + public Criteria andSceneEqualTo(String value) { + addCriterion("scene =", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotEqualTo(String value) { + addCriterion("scene <>", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThan(String value) { + addCriterion("scene >", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThanOrEqualTo(String value) { + addCriterion("scene >=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThan(String value) { + addCriterion("scene <", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThanOrEqualTo(String value) { + addCriterion("scene <=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLike(String value) { + addCriterion("scene like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotLike(String value) { + addCriterion("scene not like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneIn(List values) { + addCriterion("scene in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotIn(List values) { + addCriterion("scene not in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneBetween(String value1, String value2) { + addCriterion("scene between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotBetween(String value1, String value2) { + addCriterion("scene not between", value1, value2, "scene"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.java similarity index 70% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java rename to backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.java index 47bab49e81..48bc5605fa 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.java @@ -1,7 +1,7 @@ -package io.metersphere.project.mapper; +package io.metersphere.system.mapper; -import io.metersphere.project.domain.CustomField; -import io.metersphere.project.domain.CustomFieldExample; +import io.metersphere.system.domain.CustomField; +import io.metersphere.system.domain.CustomFieldExample; import java.util.List; import org.apache.ibatis.annotations.Param; @@ -16,22 +16,16 @@ public interface CustomFieldMapper { int insertSelective(CustomField record); - List selectByExampleWithBLOBs(CustomFieldExample example); - List selectByExample(CustomFieldExample example); CustomField selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") CustomField record, @Param("example") CustomFieldExample example); - int updateByExampleWithBLOBs(@Param("record") CustomField record, @Param("example") CustomFieldExample example); - int updateByExample(@Param("record") CustomField record, @Param("example") CustomFieldExample example); int updateByPrimaryKeySelective(CustomField record); - int updateByPrimaryKeyWithBLOBs(CustomField record); - int updateByPrimaryKey(CustomField record); int batchInsert(@Param("list") List list); diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml similarity index 59% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml index b0c2828c77..43d443acc3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml @@ -1,22 +1,18 @@ - - + + - - + + - - - - - + @@ -77,29 +73,10 @@ - id, `name`, scene, `type`, remark, `system`, `global`, create_time, update_time, - create_user, project_id, third_part + id, `name`, scene, `type`, remark, internal, scope_type, create_time, update_time, + create_user, scope_id - - `options` - - - select distinct @@ -113,11 +90,9 @@ order by ${orderByClause} - select - , - from custom_field where id = #{id,jdbcType=VARCHAR} @@ -125,25 +100,23 @@ delete from custom_field where id = #{id,jdbcType=VARCHAR} - + delete from custom_field - + insert into custom_field (id, `name`, scene, - `type`, remark, `system`, `global`, - create_time, update_time, create_user, - project_id, third_part, `options` - ) + `type`, remark, internal, + scope_type, create_time, update_time, + create_user, scope_id) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{scene,jdbcType=VARCHAR}, - #{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{system,jdbcType=BIT}, #{global,jdbcType=BIT}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, - #{projectId,jdbcType=VARCHAR}, #{thirdPart,jdbcType=BIT}, #{options,jdbcType=LONGVARCHAR} - ) + #{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{internal,jdbcType=BIT}, + #{scopeType,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{createUser,jdbcType=VARCHAR}, #{scopeId,jdbcType=VARCHAR}) - + insert into custom_field @@ -161,11 +134,11 @@ remark, - - `system`, + + internal, - - `global`, + + scope_type, create_time, @@ -176,14 +149,8 @@ create_user, - - project_id, - - - third_part, - - - `options`, + + scope_id, @@ -202,11 +169,11 @@ #{remark,jdbcType=VARCHAR}, - - #{system,jdbcType=BIT}, + + #{internal,jdbcType=BIT}, - - #{global,jdbcType=BIT}, + + #{scopeType,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, @@ -217,18 +184,12 @@ #{createUser,jdbcType=VARCHAR}, - - #{projectId,jdbcType=VARCHAR}, - - - #{thirdPart,jdbcType=BIT}, - - - #{options,jdbcType=LONGVARCHAR}, + + #{scopeId,jdbcType=VARCHAR}, - select count(*) from custom_field @@ -252,11 +213,11 @@ remark = #{record.remark,jdbcType=VARCHAR}, - - `system` = #{record.system,jdbcType=BIT}, + + internal = #{record.internal,jdbcType=BIT}, - - `global` = #{record.global,jdbcType=BIT}, + + scope_type = #{record.scopeType,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, @@ -267,39 +228,14 @@ create_user = #{record.createUser,jdbcType=VARCHAR}, - - project_id = #{record.projectId,jdbcType=VARCHAR}, - - - third_part = #{record.thirdPart,jdbcType=BIT}, - - - `options` = #{record.options,jdbcType=LONGVARCHAR}, + + scope_id = #{record.scopeId,jdbcType=VARCHAR}, - - update custom_field - set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - scene = #{record.scene,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - remark = #{record.remark,jdbcType=VARCHAR}, - `system` = #{record.system,jdbcType=BIT}, - `global` = #{record.global,jdbcType=BIT}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - third_part = #{record.thirdPart,jdbcType=BIT}, - `options` = #{record.options,jdbcType=LONGVARCHAR} - - - - update custom_field set id = #{record.id,jdbcType=VARCHAR}, @@ -307,18 +243,17 @@ scene = #{record.scene,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR}, - `system` = #{record.system,jdbcType=BIT}, - `global` = #{record.global,jdbcType=BIT}, + internal = #{record.internal,jdbcType=BIT}, + scope_type = #{record.scopeType,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - third_part = #{record.thirdPart,jdbcType=BIT} + scope_id = #{record.scopeId,jdbcType=VARCHAR} - + update custom_field @@ -333,11 +268,11 @@ remark = #{remark,jdbcType=VARCHAR}, - - `system` = #{system,jdbcType=BIT}, + + internal = #{internal,jdbcType=BIT}, - - `global` = #{global,jdbcType=BIT}, + + scope_type = #{scopeType,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, @@ -348,60 +283,36 @@ create_user = #{createUser,jdbcType=VARCHAR}, - - project_id = #{projectId,jdbcType=VARCHAR}, - - - third_part = #{thirdPart,jdbcType=BIT}, - - - `options` = #{options,jdbcType=LONGVARCHAR}, + + scope_id = #{scopeId,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} - + update custom_field set `name` = #{name,jdbcType=VARCHAR}, scene = #{scene,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR}, - `system` = #{system,jdbcType=BIT}, - `global` = #{global,jdbcType=BIT}, + internal = #{internal,jdbcType=BIT}, + scope_type = #{scopeType,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR}, - third_part = #{thirdPart,jdbcType=BIT}, - `options` = #{options,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - update custom_field - set `name` = #{name,jdbcType=VARCHAR}, - scene = #{scene,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, - remark = #{remark,jdbcType=VARCHAR}, - `system` = #{system,jdbcType=BIT}, - `global` = #{global,jdbcType=BIT}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR}, - third_part = #{thirdPart,jdbcType=BIT} + scope_id = #{scopeId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} insert into custom_field - (id, `name`, scene, `type`, remark, `system`, `global`, create_time, update_time, - create_user, project_id, third_part, `options`) + (id, `name`, scene, `type`, remark, internal, scope_type, create_time, update_time, + create_user, scope_id) values (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.scene,jdbcType=VARCHAR}, - #{item.type,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.system,jdbcType=BIT}, - #{item.global,jdbcType=BIT}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, - #{item.createUser,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.thirdPart,jdbcType=BIT}, - #{item.options,jdbcType=LONGVARCHAR}) + #{item.type,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.internal,jdbcType=BIT}, + #{item.scopeType,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, + #{item.createUser,jdbcType=VARCHAR}, #{item.scopeId,jdbcType=VARCHAR}) @@ -429,11 +340,11 @@ #{item.remark,jdbcType=VARCHAR} - - #{item.system,jdbcType=BIT} + + #{item.internal,jdbcType=BIT} - - #{item.global,jdbcType=BIT} + + #{item.scopeType,jdbcType=VARCHAR} #{item.createTime,jdbcType=BIGINT} @@ -444,14 +355,8 @@ #{item.createUser,jdbcType=VARCHAR} - - #{item.projectId,jdbcType=VARCHAR} - - - #{item.thirdPart,jdbcType=BIT} - - - #{item.options,jdbcType=LONGVARCHAR} + + #{item.scopeId,jdbcType=VARCHAR} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.java new file mode 100644 index 0000000000..2ab3ec1391 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.CustomFieldOption; +import io.metersphere.system.domain.CustomFieldOptionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CustomFieldOptionMapper { + long countByExample(CustomFieldOptionExample example); + + int deleteByExample(CustomFieldOptionExample example); + + int deleteByPrimaryKey(@Param("fieldId") String fieldId, @Param("value") String value); + + int insert(CustomFieldOption record); + + int insertSelective(CustomFieldOption record); + + List selectByExample(CustomFieldOptionExample example); + + CustomFieldOption selectByPrimaryKey(@Param("fieldId") String fieldId, @Param("value") String value); + + int updateByExampleSelective(@Param("record") CustomFieldOption record, @Param("example") CustomFieldOptionExample example); + + int updateByExample(@Param("record") CustomFieldOption record, @Param("example") CustomFieldOptionExample example); + + int updateByPrimaryKeySelective(CustomFieldOption record); + + int updateByPrimaryKey(CustomFieldOption record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") CustomFieldOption.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.xml new file mode 100644 index 0000000000..df6b24d4de --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldOptionMapper.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + field_id, `value`, `text`, internal + + + + + delete from custom_field_option + where field_id = #{fieldId,jdbcType=VARCHAR} + and `value` = #{value,jdbcType=VARCHAR} + + + delete from custom_field_option + + + + + + insert into custom_field_option (field_id, `value`, `text`, + internal) + values (#{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR}, + #{internal,jdbcType=BIT}) + + + insert into custom_field_option + + + field_id, + + + `value`, + + + `text`, + + + internal, + + + + + #{fieldId,jdbcType=VARCHAR}, + + + #{value,jdbcType=VARCHAR}, + + + #{text,jdbcType=VARCHAR}, + + + #{internal,jdbcType=BIT}, + + + + + + update custom_field_option + + + field_id = #{record.fieldId,jdbcType=VARCHAR}, + + + `value` = #{record.value,jdbcType=VARCHAR}, + + + `text` = #{record.text,jdbcType=VARCHAR}, + + + internal = #{record.internal,jdbcType=BIT}, + + + + + + + + update custom_field_option + set field_id = #{record.fieldId,jdbcType=VARCHAR}, + `value` = #{record.value,jdbcType=VARCHAR}, + `text` = #{record.text,jdbcType=VARCHAR}, + internal = #{record.internal,jdbcType=BIT} + + + + + + update custom_field_option + + + `text` = #{text,jdbcType=VARCHAR}, + + + internal = #{internal,jdbcType=BIT}, + + + where field_id = #{fieldId,jdbcType=VARCHAR} + and `value` = #{value,jdbcType=VARCHAR} + + + update custom_field_option + set `text` = #{text,jdbcType=VARCHAR}, + internal = #{internal,jdbcType=BIT} + where field_id = #{fieldId,jdbcType=VARCHAR} + and `value` = #{value,jdbcType=VARCHAR} + + + insert into custom_field_option + (field_id, `value`, `text`, internal) + values + + (#{item.fieldId,jdbcType=VARCHAR}, #{item.value,jdbcType=VARCHAR}, #{item.text,jdbcType=VARCHAR}, + #{item.internal,jdbcType=BIT}) + + + + insert into custom_field_option ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.fieldId,jdbcType=VARCHAR} + + + #{item.value,jdbcType=VARCHAR} + + + #{item.text,jdbcType=VARCHAR} + + + #{item.internal,jdbcType=BIT} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.java new file mode 100644 index 0000000000..97dac405a7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.StatusDefinition; +import io.metersphere.system.domain.StatusDefinitionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StatusDefinitionMapper { + long countByExample(StatusDefinitionExample example); + + int deleteByExample(StatusDefinitionExample example); + + int deleteByPrimaryKey(String id); + + int insert(StatusDefinition record); + + int insertSelective(StatusDefinition record); + + List selectByExample(StatusDefinitionExample example); + + StatusDefinition selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") StatusDefinition record, @Param("example") StatusDefinitionExample example); + + int updateByExample(@Param("record") StatusDefinition record, @Param("example") StatusDefinitionExample example); + + int updateByPrimaryKeySelective(StatusDefinition record); + + int updateByPrimaryKey(StatusDefinition record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") StatusDefinition.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.xml similarity index 56% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.xml index dcc8a1d3e3..3902c0f914 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusDefinitionMapper.xml @@ -1,12 +1,10 @@ - - + + - - - - + + @@ -67,20 +65,15 @@ - id, title + id, status_id, definition_id - - content - - select distinct - , - - from bug_template_extend + from status_definition @@ -88,143 +81,114 @@ order by ${orderByClause} - - select - , - - from bug_template_extend + from status_definition where id = #{id,jdbcType=VARCHAR} - delete from bug_template_extend + delete from status_definition where id = #{id,jdbcType=VARCHAR} - - delete from bug_template_extend + + delete from status_definition - - insert into bug_template_extend (id, title, content + + insert into status_definition (id, status_id, definition_id ) - values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + values (#{id,jdbcType=VARCHAR}, #{statusId,jdbcType=VARCHAR}, #{definitionId,jdbcType=VARCHAR} ) - - insert into bug_template_extend + + insert into status_definition id, - - title, + + status_id, - - content, + + definition_id, #{id,jdbcType=VARCHAR}, - - #{title,jdbcType=VARCHAR}, + + #{statusId,jdbcType=VARCHAR}, - - #{content,jdbcType=LONGVARCHAR}, + + #{definitionId,jdbcType=VARCHAR}, - + select count(*) from status_definition - update bug_template_extend + update status_definition id = #{record.id,jdbcType=VARCHAR}, - - title = #{record.title,jdbcType=VARCHAR}, + + status_id = #{record.statusId,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=LONGVARCHAR}, + + definition_id = #{record.definitionId,jdbcType=VARCHAR}, - - update bug_template_extend - set id = #{record.id,jdbcType=VARCHAR}, - title = #{record.title,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=LONGVARCHAR} - - - - - update bug_template_extend + update status_definition set id = #{record.id,jdbcType=VARCHAR}, - title = #{record.title,jdbcType=VARCHAR} + status_id = #{record.statusId,jdbcType=VARCHAR}, + definition_id = #{record.definitionId,jdbcType=VARCHAR} - - update bug_template_extend + + update status_definition - - title = #{title,jdbcType=VARCHAR}, + + status_id = #{statusId,jdbcType=VARCHAR}, - - content = #{content,jdbcType=LONGVARCHAR}, + + definition_id = #{definitionId,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} - - update bug_template_extend - set title = #{title,jdbcType=VARCHAR}, - content = #{content,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - update bug_template_extend - set title = #{title,jdbcType=VARCHAR} + + update status_definition + set status_id = #{statusId,jdbcType=VARCHAR}, + definition_id = #{definitionId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} - insert into bug_template_extend - (id, title, content) + insert into status_definition + (id, status_id, definition_id) values - (#{item.id,jdbcType=VARCHAR}, #{item.title,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARCHAR} + (#{item.id,jdbcType=VARCHAR}, #{item.statusId,jdbcType=VARCHAR}, #{item.definitionId,jdbcType=VARCHAR} ) - insert into bug_template_extend ( + insert into status_definition ( ${column.escapedColumnName} @@ -236,11 +200,11 @@ #{item.id,jdbcType=VARCHAR} - - #{item.title,jdbcType=VARCHAR} + + #{item.statusId,jdbcType=VARCHAR} - - #{item.content,jdbcType=LONGVARCHAR} + + #{item.definitionId,jdbcType=VARCHAR} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.java new file mode 100644 index 0000000000..c529ec2e96 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.StatusItem; +import io.metersphere.system.domain.StatusItemExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StatusItemMapper { + long countByExample(StatusItemExample example); + + int deleteByExample(StatusItemExample example); + + int deleteByPrimaryKey(String id); + + int insert(StatusItem record); + + int insertSelective(StatusItem record); + + List selectByExample(StatusItemExample example); + + StatusItem selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") StatusItem record, @Param("example") StatusItemExample example); + + int updateByExample(@Param("record") StatusItem record, @Param("example") StatusItemExample example); + + int updateByPrimaryKeySelective(StatusItem record); + + int updateByPrimaryKey(StatusItem record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") StatusItem.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.xml similarity index 61% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.xml index badeba5941..6af2c9b8ba 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/StatusItemMapper.xml @@ -1,14 +1,14 @@ - - + + - + + - - - + + @@ -69,15 +69,15 @@ - id, `name`, description, internal, create_time, create_user, project_id + id, `name`, scene, remark, internal, scope_type, scope_id - select distinct - from bug_template + from status_item @@ -88,29 +88,29 @@ - delete from bug_template + delete from status_item where id = #{id,jdbcType=VARCHAR} - - delete from bug_template + + delete from status_item - - insert into bug_template (id, `name`, description, - internal, create_time, create_user, - project_id) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, - #{internal,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, - #{projectId,jdbcType=VARCHAR}) + + insert into status_item (id, `name`, scene, + remark, internal, scope_type, + scope_id) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{scene,jdbcType=VARCHAR}, + #{remark,jdbcType=VARCHAR}, #{internal,jdbcType=BIT}, #{scopeType,jdbcType=VARCHAR}, + #{scopeId,jdbcType=VARCHAR}) - - insert into bug_template + + insert into status_item id, @@ -118,20 +118,20 @@ `name`, - - description, + + scene, + + + remark, internal, - - create_time, + + scope_type, - - create_user, - - - project_id, + + scope_id, @@ -141,31 +141,31 @@ #{name,jdbcType=VARCHAR}, - - #{description,jdbcType=VARCHAR}, + + #{scene,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, #{internal,jdbcType=BIT}, - - #{createTime,jdbcType=BIGINT}, + + #{scopeType,jdbcType=VARCHAR}, - - #{createUser,jdbcType=VARCHAR}, - - - #{projectId,jdbcType=VARCHAR}, + + #{scopeId,jdbcType=VARCHAR}, - + select count(*) from status_item - update bug_template + update status_item id = #{record.id,jdbcType=VARCHAR}, @@ -173,20 +173,20 @@ `name` = #{record.name,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, + + scene = #{record.scene,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, internal = #{record.internal,jdbcType=BIT}, - - create_time = #{record.createTime,jdbcType=BIGINT}, + + scope_type = #{record.scopeType,jdbcType=VARCHAR}, - - create_user = #{record.createUser,jdbcType=VARCHAR}, - - - project_id = #{record.projectId,jdbcType=VARCHAR}, + + scope_id = #{record.scopeId,jdbcType=VARCHAR}, @@ -194,64 +194,64 @@ - update bug_template + update status_item set id = #{record.id,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, internal = #{record.internal,jdbcType=BIT}, - create_time = #{record.createTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR} + scope_type = #{record.scopeType,jdbcType=VARCHAR}, + scope_id = #{record.scopeId,jdbcType=VARCHAR} - - update bug_template + + update status_item `name` = #{name,jdbcType=VARCHAR}, - - description = #{description,jdbcType=VARCHAR}, + + scene = #{scene,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, internal = #{internal,jdbcType=BIT}, - - create_time = #{createTime,jdbcType=BIGINT}, + + scope_type = #{scopeType,jdbcType=VARCHAR}, - - create_user = #{createUser,jdbcType=VARCHAR}, - - - project_id = #{projectId,jdbcType=VARCHAR}, + + scope_id = #{scopeId,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} - - update bug_template + + update status_item set `name` = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, internal = #{internal,jdbcType=BIT}, - create_time = #{createTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR} + scope_type = #{scopeType,jdbcType=VARCHAR}, + scope_id = #{scopeId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} - insert into bug_template - (id, `name`, description, internal, create_time, create_user, project_id) + insert into status_item + (id, `name`, scene, remark, internal, scope_type, scope_id) values - (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR}, - #{item.internal,jdbcType=BIT}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, - #{item.projectId,jdbcType=VARCHAR}) + (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.scene,jdbcType=VARCHAR}, + #{item.remark,jdbcType=VARCHAR}, #{item.internal,jdbcType=BIT}, #{item.scopeType,jdbcType=VARCHAR}, + #{item.scopeId,jdbcType=VARCHAR}) - insert into bug_template ( + insert into status_item ( ${column.escapedColumnName} @@ -266,20 +266,20 @@ #{item.name,jdbcType=VARCHAR} - - #{item.description,jdbcType=VARCHAR} + + #{item.scene,jdbcType=VARCHAR} + + + #{item.remark,jdbcType=VARCHAR} #{item.internal,jdbcType=BIT} - - #{item.createTime,jdbcType=BIGINT} + + #{item.scopeType,jdbcType=VARCHAR} - - #{item.createUser,jdbcType=VARCHAR} - - - #{item.projectId,jdbcType=VARCHAR} + + #{item.scopeId,jdbcType=VARCHAR} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.java new file mode 100644 index 0000000000..f1999afb9f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.TemplateCustomField; +import io.metersphere.system.domain.TemplateCustomFieldExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TemplateCustomFieldMapper { + long countByExample(TemplateCustomFieldExample example); + + int deleteByExample(TemplateCustomFieldExample example); + + int deleteByPrimaryKey(String id); + + int insert(TemplateCustomField record); + + int insertSelective(TemplateCustomField record); + + List selectByExample(TemplateCustomFieldExample example); + + TemplateCustomField selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TemplateCustomField record, @Param("example") TemplateCustomFieldExample example); + + int updateByExample(@Param("record") TemplateCustomField record, @Param("example") TemplateCustomFieldExample example); + + int updateByPrimaryKeySelective(TemplateCustomField record); + + int updateByPrimaryKey(TemplateCustomField record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") TemplateCustomField.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.xml similarity index 56% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.xml index 02b4e399fe..a60ef9cc87 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateCustomFieldMapper.xml @@ -1,18 +1,14 @@ - - + + - - - - - - + + @@ -73,20 +69,15 @@ - id, field_id, template_id, scene, required, pos, custom_data, `key` + id, field_id, template_id, required, pos, api_field_id, default_value - - default_value - - select distinct - , - - from custom_field_template + from template_custom_field @@ -94,48 +85,32 @@ order by ${orderByClause} - - select - , - - from custom_field_template + from template_custom_field where id = #{id,jdbcType=VARCHAR} - delete from custom_field_template + delete from template_custom_field where id = #{id,jdbcType=VARCHAR} - - delete from custom_field_template + + delete from template_custom_field - - insert into custom_field_template (id, field_id, template_id, - scene, required, pos, custom_data, - `key`, default_value) + + insert into template_custom_field (id, field_id, template_id, + required, pos, api_field_id, + default_value) values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, - #{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{pos,jdbcType=INTEGER}, #{customData,jdbcType=VARCHAR}, - #{key,jdbcType=VARCHAR}, #{defaultValue,jdbcType=LONGVARBINARY}) + #{required,jdbcType=BIT}, #{pos,jdbcType=INTEGER}, #{apiFieldId,jdbcType=VARCHAR}, + #{defaultValue,jdbcType=VARCHAR}) - - insert into custom_field_template + + insert into template_custom_field id, @@ -146,20 +121,14 @@ template_id, - - scene, - required, pos, - - custom_data, - - - `key`, + + api_field_id, default_value, @@ -175,34 +144,28 @@ #{templateId,jdbcType=VARCHAR}, - - #{scene,jdbcType=VARCHAR}, - #{required,jdbcType=BIT}, #{pos,jdbcType=INTEGER}, - - #{customData,jdbcType=VARCHAR}, - - - #{key,jdbcType=VARCHAR}, + + #{apiFieldId,jdbcType=VARCHAR}, - #{defaultValue,jdbcType=LONGVARBINARY}, + #{defaultValue,jdbcType=VARCHAR}, - + select count(*) from template_custom_field - update custom_field_template + update template_custom_field id = #{record.id,jdbcType=VARCHAR}, @@ -213,60 +176,38 @@ template_id = #{record.templateId,jdbcType=VARCHAR}, - - scene = #{record.scene,jdbcType=VARCHAR}, - required = #{record.required,jdbcType=BIT}, pos = #{record.pos,jdbcType=INTEGER}, - - custom_data = #{record.customData,jdbcType=VARCHAR}, - - - `key` = #{record.key,jdbcType=VARCHAR}, + + api_field_id = #{record.apiFieldId,jdbcType=VARCHAR}, - default_value = #{record.defaultValue,jdbcType=LONGVARBINARY}, + default_value = #{record.defaultValue,jdbcType=VARCHAR}, - - update custom_field_template - set id = #{record.id,jdbcType=VARCHAR}, - field_id = #{record.fieldId,jdbcType=VARCHAR}, - template_id = #{record.templateId,jdbcType=VARCHAR}, - scene = #{record.scene,jdbcType=VARCHAR}, - required = #{record.required,jdbcType=BIT}, - pos = #{record.pos,jdbcType=INTEGER}, - custom_data = #{record.customData,jdbcType=VARCHAR}, - `key` = #{record.key,jdbcType=VARCHAR}, - default_value = #{record.defaultValue,jdbcType=LONGVARBINARY} - - - - - update custom_field_template + update template_custom_field set id = #{record.id,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, template_id = #{record.templateId,jdbcType=VARCHAR}, - scene = #{record.scene,jdbcType=VARCHAR}, required = #{record.required,jdbcType=BIT}, pos = #{record.pos,jdbcType=INTEGER}, - custom_data = #{record.customData,jdbcType=VARCHAR}, - `key` = #{record.key,jdbcType=VARCHAR} + api_field_id = #{record.apiFieldId,jdbcType=VARCHAR}, + default_value = #{record.defaultValue,jdbcType=VARCHAR} - - update custom_field_template + + update template_custom_field field_id = #{fieldId,jdbcType=VARCHAR}, @@ -274,64 +215,43 @@ template_id = #{templateId,jdbcType=VARCHAR}, - - scene = #{scene,jdbcType=VARCHAR}, - required = #{required,jdbcType=BIT}, pos = #{pos,jdbcType=INTEGER}, - - custom_data = #{customData,jdbcType=VARCHAR}, - - - `key` = #{key,jdbcType=VARCHAR}, + + api_field_id = #{apiFieldId,jdbcType=VARCHAR}, - default_value = #{defaultValue,jdbcType=LONGVARBINARY}, + default_value = #{defaultValue,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} - - update custom_field_template + + update template_custom_field set field_id = #{fieldId,jdbcType=VARCHAR}, template_id = #{templateId,jdbcType=VARCHAR}, - scene = #{scene,jdbcType=VARCHAR}, required = #{required,jdbcType=BIT}, pos = #{pos,jdbcType=INTEGER}, - custom_data = #{customData,jdbcType=VARCHAR}, - `key` = #{key,jdbcType=VARCHAR}, - default_value = #{defaultValue,jdbcType=LONGVARBINARY} - where id = #{id,jdbcType=VARCHAR} - - - update custom_field_template - set field_id = #{fieldId,jdbcType=VARCHAR}, - template_id = #{templateId,jdbcType=VARCHAR}, - scene = #{scene,jdbcType=VARCHAR}, - required = #{required,jdbcType=BIT}, - pos = #{pos,jdbcType=INTEGER}, - custom_data = #{customData,jdbcType=VARCHAR}, - `key` = #{key,jdbcType=VARCHAR} + api_field_id = #{apiFieldId,jdbcType=VARCHAR}, + default_value = #{defaultValue,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} - insert into custom_field_template - (id, field_id, template_id, scene, required, pos, custom_data, `key`, default_value - ) + insert into template_custom_field + (id, field_id, template_id, required, pos, api_field_id, default_value) values (#{item.id,jdbcType=VARCHAR}, #{item.fieldId,jdbcType=VARCHAR}, #{item.templateId,jdbcType=VARCHAR}, - #{item.scene,jdbcType=VARCHAR}, #{item.required,jdbcType=BIT}, #{item.pos,jdbcType=INTEGER}, - #{item.customData,jdbcType=VARCHAR}, #{item.key,jdbcType=VARCHAR}, #{item.defaultValue,jdbcType=LONGVARBINARY} - ) + #{item.required,jdbcType=BIT}, #{item.pos,jdbcType=INTEGER}, #{item.apiFieldId,jdbcType=VARCHAR}, + #{item.defaultValue,jdbcType=VARCHAR}) - insert into custom_field_template ( + insert into template_custom_field ( ${column.escapedColumnName} @@ -349,23 +269,17 @@ #{item.templateId,jdbcType=VARCHAR} - - #{item.scene,jdbcType=VARCHAR} - #{item.required,jdbcType=BIT} #{item.pos,jdbcType=INTEGER} - - #{item.customData,jdbcType=VARCHAR} - - - #{item.key,jdbcType=VARCHAR} + + #{item.apiFieldId,jdbcType=VARCHAR} - #{item.defaultValue,jdbcType=LONGVARBINARY} + #{item.defaultValue,jdbcType=VARCHAR} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.java new file mode 100644 index 0000000000..a64f4bb711 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Template; +import io.metersphere.system.domain.TemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TemplateMapper { + long countByExample(TemplateExample example); + + int deleteByExample(TemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(Template record); + + int insertSelective(Template record); + + List