From bf71b37cf4e08fa25782d3f5d42d6f0432b09df7 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 13 Aug 2020 19:09:02 +0800 Subject: [PATCH 1/7] =?UTF-8?q?style:=20=E6=B5=8B=E8=AF=95=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/domain/ReportResultComponent.java | 20 +++++ .../dto/TestCaseReportModuleResultDTO.java | 5 ++ .../TemplateComponent/DefectListComponent.vue | 80 +++++++++++++++++++ .../TemplateComponent/TemplateComponent.vue | 5 +- .../TemplateComponent/TestResultComponent.vue | 66 ++++++++++++--- .../report/TestCaseReportTemplateEdit.vue | 10 ++- .../comonents/report/TestCaseReportView.vue | 4 +- frontend/src/i18n/en-US.js | 2 + frontend/src/i18n/zh-CN.js | 2 + frontend/src/i18n/zh-TW.js | 2 + 10 files changed, 181 insertions(+), 15 deletions(-) create mode 100644 frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java index 5f24e1a3b7..28c69361a3 100644 --- a/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java +++ b/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java @@ -86,12 +86,32 @@ public class ReportResultComponent extends ReportComponent { moduleResult.setCaseCount(0); moduleResult.setPassCount(0); moduleResult.setIssuesCount(0); + moduleResult.setFailureCount(0); + moduleResult.setBlockingCount(0); + moduleResult.setPrepareCount(0); + moduleResult.setSkipCount(0); + moduleResult.setUnderwayCount(0); moduleResult.setModuleId(rootNodeId); } moduleResult.setCaseCount(moduleResult.getCaseCount() + 1); if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Pass.name())) { moduleResult.setPassCount(moduleResult.getPassCount() + 1); } + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Prepare.name())) { + moduleResult.setPrepareCount(moduleResult.getPrepareCount() + 1); + } + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Underway.name())) { + moduleResult.setUnderwayCount(moduleResult.getUnderwayCount() + 1); + } + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Failure.name())) { + moduleResult.setFailureCount(moduleResult.getFailureCount() + 1); + } + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Skip.name())) { + moduleResult.setSkipCount(moduleResult.getSkipCount() + 1); + } + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Blocking.name())) { + moduleResult.setBlockingCount(moduleResult.getBlockingCount() + 1); + } if (StringUtils.isNotBlank(testCase.getIssues())) { if (JSON.parseObject(testCase.getIssues()).getBoolean("hasIssues")) { moduleResult.setIssuesCount(moduleResult.getIssuesCount() + 1); diff --git a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java index 59b82f0c50..00e05f9486 100644 --- a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java +++ b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java @@ -12,4 +12,9 @@ public class TestCaseReportModuleResultDTO { private Integer passCount; private Double passRate; private Integer issuesCount; + private Integer prepareCount; + private Integer skipCount; + private Integer failureCount; + private Integer blockingCount; + private Integer underwayCount; } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue new file mode 100644 index 0000000000..02acec71b1 --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue index 911bddafe9..1d283a5e61 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue @@ -7,6 +7,7 @@ + @@ -16,6 +17,7 @@ + @@ -28,10 +30,11 @@ import TestResultChartComponent from "./TestResultChartComponent"; import RichTextComponent from "./RichTextComponent"; import FailureResultComponent from "./FailureResultComponent"; + import DefectListComponent from "./DefectListComponent"; export default { name: "TemplateComponent", components: { - FailureResultComponent, + FailureResultComponent,DefectListComponent, RichTextComponent, TestResultChartComponent, TestResultComponent, BaseInfoComponent}, props: { preview: { diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue index c65c738aa5..8bca789386 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue @@ -18,6 +18,36 @@ :label="$t('test_track.plan_view.case_count')" width="180"> + + + + + + + + + + + + @@ -50,19 +80,37 @@ moduleName: this.$t('test_track.module.module') + '1', caseCount: '14', passRate: 10.8, - issuesCount: 3 + issuesCount: 3, + passCount:0, + failureCount:0, + blockingCount:0, + skipCount:0, + underwayCount:0, + prepareCount:0 }, { - moduleName: this.$t('test_track.module.module') + '2', - caseCount: '24', - passRate: 40, - issuesCount: 6 + moduleName: this.$t('test_track.module.module') + '1', + caseCount: '14', + passRate: 10.8, + issuesCount: 3, + passCount:0, + failureCount:0, + blockingCount:0, + skipCount:0, + underwayCount:0, + prepareCount:0 }, { - moduleName: this.$t('test_track.module.module') + '3', - caseCount: '50', - passRate: 76.9, - issuesCount: 8 + moduleName: this.$t('test_track.module.module') + '1', + caseCount: '14', + passRate: 10.8, + issuesCount: 3, + passCount:0, + failureCount:0, + blockingCount:0, + skipCount:0, + underwayCount:0, + prepareCount:0 } ] } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue index 87a24f035b..d5a022954b 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue @@ -77,10 +77,11 @@ [2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}], [3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}], [4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}], - [5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}] + [5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}], + [6, { name: this.$t('test_track.plan_view.custom_component'), id:6,type: 'custom'}] ] ), - components: [5], + components: [6], previews: [], template: {}, isReport: false @@ -109,12 +110,12 @@ this.template = { name: '', content: { - components: [1,2,3,4,5], + components: [1,2,3,4,5,6], customComponent: new Map() } }; this.previews = []; - this.components = [5]; + this.components = [6]; if (id) { this.type = 'edit'; this.getTemplateById(id); @@ -144,6 +145,7 @@ } } }); + }, handleClose() { window.removeEventListener('popstate', this.goBack, false); diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue index a9f7514615..2689c0836a 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue @@ -69,7 +69,8 @@ [2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}], [3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}], [4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}], - [5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}] + [5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}], + [6, { name: this.$t('test_track.plan_view.custom_component'), id: 6 ,type: 'custom'}] ] ), isTestManagerOrTestUser: false @@ -166,6 +167,7 @@ getMetric() { this.result = this.$get('/test/plan/get/metric/' + this.planId, response => { this.metric = response.data; + console.log(this.metric) if (!this.metric.failureTestCases) { this.metric.failureTestCases = []; } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 2d07634630..b44b6b3059 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -601,6 +601,7 @@ export default { delete_confirm: "Confirm delete module:", delete_all_resource: "and all submodules and test cases under the module", module: "Module", + title:"Title" }, home: { recent_test: "Recent test", @@ -640,6 +641,7 @@ export default { result_distribution: "Result distribution", custom_component: "Custom", create_report: "Create report", + defect_list:"Defect list", view_report: "View report", component_library: "Component library", component_library_tip: "Drag and drop the component from the component library, add to the right, preview the report effect, only one can be added per system component.", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index bf943918e5..9467935821 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -606,6 +606,7 @@ export default { delete_confirm: "确认删除模块: ", delete_all_resource: "以及模块下所有子模块和测试用例", module: "模块", + title:"标题", }, home: { recent_test: "最近测试", @@ -644,6 +645,7 @@ export default { test_result: "测试结果", result_distribution: "测试结果分布", custom_component: "自定义模块", + defect_list:"缺陷列表", create_report: "创建测试报告", view_report: "查看测试报告", component_library: "组件库", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 1a0024912a..41a7c70dd4 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -601,6 +601,7 @@ export default { delete_confirm: "確認刪除模塊: ", delete_all_resource: "以及模塊下所有子模塊和測試用例", module: "模塊", + title:"標題", }, home: { recent_test: "最近測試", @@ -640,6 +641,7 @@ export default { result_distribution: "測試結果分布", custom_component: "自定義模塊", create_report: "創建測試報告", + defect_list:"缺陷清單", view_report: "查看測試報告", component_library: "組件庫", component_library_tip: "拖拽組件庫中組件,添加至右側,預覽報告效果,每個系統組件只能添加壹個。", From 3783d30d7e5df685e658059b41cee14c05ed18aa Mon Sep 17 00:00:00 2001 From: q4speed Date: Fri, 14 Aug 2020 13:34:18 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E9=85=8D?= =?UTF-8?q?=E9=A2=9D=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/domain/Quota.java | 29 + .../metersphere/base/domain/QuotaExample.java | 840 ++++++++++++++++++ .../io/metersphere/base/domain/Schedule.java | 3 +- .../metersphere/base/mapper/QuotaMapper.java | 30 + .../metersphere/base/mapper/QuotaMapper.xml | 291 ++++++ .../base/mapper/ScheduleMapper.xml | 70 +- .../base/mapper/ext/ExtApiTestMapper.xml | 2 +- .../io/metersphere/config/MybatisConfig.java | 2 +- backend/src/main/java/io/metersphere/xpack | 2 +- .../resources/db/migration/V13__add_quota.sql | 15 + .../components/common/router/router.js | 76 +- .../components/settings/SettingMenu.vue | 116 +-- .../components/settings/SettingMenuBackup.vue | 96 ++ .../business/components/settings/router.js | 88 ++ .../components/settings/system/User.vue | 8 +- frontend/src/business/components/xpack | 2 +- frontend/src/common/js/ajax.js | 22 +- frontend/src/i18n/en-US.js | 21 + frontend/src/i18n/zh-CN.js | 21 + frontend/src/i18n/zh-TW.js | 21 + 20 files changed, 1579 insertions(+), 176 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/Quota.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/QuotaExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.xml create mode 100644 backend/src/main/resources/db/migration/V13__add_quota.sql create mode 100644 frontend/src/business/components/settings/SettingMenuBackup.vue create mode 100644 frontend/src/business/components/settings/router.js diff --git a/backend/src/main/java/io/metersphere/base/domain/Quota.java b/backend/src/main/java/io/metersphere/base/domain/Quota.java new file mode 100644 index 0000000000..578d59f8ca --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/Quota.java @@ -0,0 +1,29 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class Quota implements Serializable { + private String id; + + private Integer api; + + private Integer performance; + + private Integer maxThreads; + + private Integer duration; + + private String resourcePool; + + private String organizationId; + + private String workspaceId; + + private Boolean useDefault; + + private Long updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/QuotaExample.java b/backend/src/main/java/io/metersphere/base/domain/QuotaExample.java new file mode 100644 index 0000000000..c9f47fdc7c --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/QuotaExample.java @@ -0,0 +1,840 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class QuotaExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public QuotaExample() { + 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 andApiIsNull() { + addCriterion("api is null"); + return (Criteria) this; + } + + public Criteria andApiIsNotNull() { + addCriterion("api is not null"); + return (Criteria) this; + } + + public Criteria andApiEqualTo(Integer value) { + addCriterion("api =", value, "api"); + return (Criteria) this; + } + + public Criteria andApiNotEqualTo(Integer value) { + addCriterion("api <>", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThan(Integer value) { + addCriterion("api >", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThanOrEqualTo(Integer value) { + addCriterion("api >=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThan(Integer value) { + addCriterion("api <", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThanOrEqualTo(Integer value) { + addCriterion("api <=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiIn(List values) { + addCriterion("api in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiNotIn(List values) { + addCriterion("api not in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiBetween(Integer value1, Integer value2) { + addCriterion("api between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andApiNotBetween(Integer value1, Integer value2) { + addCriterion("api not between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNull() { + addCriterion("performance is null"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNotNull() { + addCriterion("performance is not null"); + return (Criteria) this; + } + + public Criteria andPerformanceEqualTo(Integer value) { + addCriterion("performance =", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotEqualTo(Integer value) { + addCriterion("performance <>", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThan(Integer value) { + addCriterion("performance >", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThanOrEqualTo(Integer value) { + addCriterion("performance >=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThan(Integer value) { + addCriterion("performance <", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThanOrEqualTo(Integer value) { + addCriterion("performance <=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceIn(List values) { + addCriterion("performance in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotIn(List values) { + addCriterion("performance not in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceBetween(Integer value1, Integer value2) { + addCriterion("performance between", value1, value2, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotBetween(Integer value1, Integer value2) { + addCriterion("performance not between", value1, value2, "performance"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIsNull() { + addCriterion("max_threads is null"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIsNotNull() { + addCriterion("max_threads is not null"); + return (Criteria) this; + } + + public Criteria andMaxThreadsEqualTo(Integer value) { + addCriterion("max_threads =", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotEqualTo(Integer value) { + addCriterion("max_threads <>", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsGreaterThan(Integer value) { + addCriterion("max_threads >", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsGreaterThanOrEqualTo(Integer value) { + addCriterion("max_threads >=", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsLessThan(Integer value) { + addCriterion("max_threads <", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsLessThanOrEqualTo(Integer value) { + addCriterion("max_threads <=", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIn(List values) { + addCriterion("max_threads in", values, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotIn(List values) { + addCriterion("max_threads not in", values, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsBetween(Integer value1, Integer value2) { + addCriterion("max_threads between", value1, value2, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotBetween(Integer value1, Integer value2) { + addCriterion("max_threads not between", value1, value2, "maxThreads"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andResourcePoolIsNull() { + addCriterion("resource_pool is null"); + return (Criteria) this; + } + + public Criteria andResourcePoolIsNotNull() { + addCriterion("resource_pool is not null"); + return (Criteria) this; + } + + public Criteria andResourcePoolEqualTo(String value) { + addCriterion("resource_pool =", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotEqualTo(String value) { + addCriterion("resource_pool <>", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolGreaterThan(String value) { + addCriterion("resource_pool >", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolGreaterThanOrEqualTo(String value) { + addCriterion("resource_pool >=", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLessThan(String value) { + addCriterion("resource_pool <", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLessThanOrEqualTo(String value) { + addCriterion("resource_pool <=", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLike(String value) { + addCriterion("resource_pool like", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotLike(String value) { + addCriterion("resource_pool not like", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolIn(List values) { + addCriterion("resource_pool in", values, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotIn(List values) { + addCriterion("resource_pool not in", values, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolBetween(String value1, String value2) { + addCriterion("resource_pool between", value1, value2, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotBetween(String value1, String value2) { + addCriterion("resource_pool not between", value1, value2, "resourcePool"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andUseDefaultIsNull() { + addCriterion("use_default is null"); + return (Criteria) this; + } + + public Criteria andUseDefaultIsNotNull() { + addCriterion("use_default is not null"); + return (Criteria) this; + } + + public Criteria andUseDefaultEqualTo(Boolean value) { + addCriterion("use_default =", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotEqualTo(Boolean value) { + addCriterion("use_default <>", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultGreaterThan(Boolean value) { + addCriterion("use_default >", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultGreaterThanOrEqualTo(Boolean value) { + addCriterion("use_default >=", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultLessThan(Boolean value) { + addCriterion("use_default <", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultLessThanOrEqualTo(Boolean value) { + addCriterion("use_default <=", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultIn(List values) { + addCriterion("use_default in", values, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotIn(List values) { + addCriterion("use_default not in", values, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultBetween(Boolean value1, Boolean value2) { + addCriterion("use_default between", value1, value2, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotBetween(Boolean value1, Boolean value2) { + addCriterion("use_default not between", value1, value2, "useDefault"); + 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 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/src/main/java/io/metersphere/base/domain/Schedule.java b/backend/src/main/java/io/metersphere/base/domain/Schedule.java index c92c80d081..d38b68ed63 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Schedule.java +++ b/backend/src/main/java/io/metersphere/base/domain/Schedule.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class Schedule implements Serializable { diff --git a/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.java b/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.java new file mode 100644 index 0000000000..c9e190c9c2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.Quota; +import io.metersphere.base.domain.QuotaExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface QuotaMapper { + long countByExample(QuotaExample example); + + int deleteByExample(QuotaExample example); + + int deleteByPrimaryKey(String id); + + int insert(Quota record); + + int insertSelective(Quota record); + + List selectByExample(QuotaExample example); + + Quota selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Quota record, @Param("example") QuotaExample example); + + int updateByExample(@Param("record") Quota record, @Param("example") QuotaExample example); + + int updateByPrimaryKeySelective(Quota record); + + int updateByPrimaryKey(Quota record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.xml new file mode 100644 index 0000000000..72ab941079 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/QuotaMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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, api, performance, max_threads, duration, resource_pool, organization_id, workspace_id, + use_default, update_time + + + + + delete from quota + where id = #{id,jdbcType=VARCHAR} + + + delete from quota + + + + + + insert into quota (id, api, performance, + max_threads, duration, resource_pool, + organization_id, workspace_id, use_default, + update_time) + values (#{id,jdbcType=VARCHAR}, #{api,jdbcType=INTEGER}, #{performance,jdbcType=INTEGER}, + #{maxThreads,jdbcType=INTEGER}, #{duration,jdbcType=INTEGER}, #{resourcePool,jdbcType=VARCHAR}, + #{organizationId,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{useDefault,jdbcType=BIT}, + #{updateTime,jdbcType=BIGINT}) + + + insert into quota + + + id, + + + api, + + + performance, + + + max_threads, + + + duration, + + + resource_pool, + + + organization_id, + + + workspace_id, + + + use_default, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{api,jdbcType=INTEGER}, + + + #{performance,jdbcType=INTEGER}, + + + #{maxThreads,jdbcType=INTEGER}, + + + #{duration,jdbcType=INTEGER}, + + + #{resourcePool,jdbcType=VARCHAR}, + + + #{organizationId,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{useDefault,jdbcType=BIT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update quota + + + id = #{record.id,jdbcType=VARCHAR}, + + + api = #{record.api,jdbcType=INTEGER}, + + + performance = #{record.performance,jdbcType=INTEGER}, + + + max_threads = #{record.maxThreads,jdbcType=INTEGER}, + + + duration = #{record.duration,jdbcType=INTEGER}, + + + resource_pool = #{record.resourcePool,jdbcType=VARCHAR}, + + + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + use_default = #{record.useDefault,jdbcType=BIT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update quota + set id = #{record.id,jdbcType=VARCHAR}, + api = #{record.api,jdbcType=INTEGER}, + performance = #{record.performance,jdbcType=INTEGER}, + max_threads = #{record.maxThreads,jdbcType=INTEGER}, + duration = #{record.duration,jdbcType=INTEGER}, + resource_pool = #{record.resourcePool,jdbcType=VARCHAR}, + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + use_default = #{record.useDefault,jdbcType=BIT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update quota + + + api = #{api,jdbcType=INTEGER}, + + + performance = #{performance,jdbcType=INTEGER}, + + + max_threads = #{maxThreads,jdbcType=INTEGER}, + + + duration = #{duration,jdbcType=INTEGER}, + + + resource_pool = #{resourcePool,jdbcType=VARCHAR}, + + + organization_id = #{organizationId,jdbcType=VARCHAR}, + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + use_default = #{useDefault,jdbcType=BIT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update quota + set api = #{api,jdbcType=INTEGER}, + performance = #{performance,jdbcType=INTEGER}, + max_threads = #{maxThreads,jdbcType=INTEGER}, + duration = #{duration,jdbcType=INTEGER}, + resource_pool = #{resourcePool,jdbcType=VARCHAR}, + organization_id = #{organizationId,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + use_default = #{useDefault,jdbcType=BIT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ScheduleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ScheduleMapper.xml index 4e76ebcaea..8718a9b47f 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ScheduleMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ScheduleMapper.xml @@ -2,18 +2,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -284,18 +284,18 @@ update schedule set id = #{record.id,jdbcType=VARCHAR}, - `key` = #{record.key,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - `value` = #{record.value,jdbcType=VARCHAR}, - `group` = #{record.group,jdbcType=VARCHAR}, - job = #{record.job,jdbcType=VARCHAR}, - `enable` = #{record.enable,jdbcType=BIT}, - resource_id = #{record.resourceId,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=VARCHAR}, - workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - custom_data = #{record.customData,jdbcType=LONGVARCHAR} + `key` = #{record.key,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + `value` = #{record.value,jdbcType=VARCHAR}, + `group` = #{record.group,jdbcType=VARCHAR}, + job = #{record.job,jdbcType=VARCHAR}, + `enable` = #{record.enable,jdbcType=BIT}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + custom_data = #{record.customData,jdbcType=LONGVARCHAR} @@ -303,17 +303,17 @@ update schedule set id = #{record.id,jdbcType=VARCHAR}, - `key` = #{record.key,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - `value` = #{record.value,jdbcType=VARCHAR}, - `group` = #{record.group,jdbcType=VARCHAR}, - job = #{record.job,jdbcType=VARCHAR}, - `enable` = #{record.enable,jdbcType=BIT}, - resource_id = #{record.resourceId,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=VARCHAR}, - workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT} + `key` = #{record.key,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + `value` = #{record.value,jdbcType=VARCHAR}, + `group` = #{record.group,jdbcType=VARCHAR}, + job = #{record.job,jdbcType=VARCHAR}, + `enable` = #{record.enable,jdbcType=BIT}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml index 20f2afaa73..c1895316ff 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml @@ -91,7 +91,7 @@ - select api_test.*, project.name as project_name, user.name as user_name from api_test left join project on api_test.project_id = project.id diff --git a/backend/src/main/java/io/metersphere/config/MybatisConfig.java b/backend/src/main/java/io/metersphere/config/MybatisConfig.java index 05b825e6ee..691dd6c976 100644 --- a/backend/src/main/java/io/metersphere/config/MybatisConfig.java +++ b/backend/src/main/java/io/metersphere/config/MybatisConfig.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Properties; @Configuration -@MapperScan(basePackages = "io.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory") +@MapperScan(basePackages = {"io.metersphere.base.mapper", "io.metersphere.xpack.mapper"}, sqlSessionFactoryRef = "sqlSessionFactory") @EnableTransactionManagement public class MybatisConfig { diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 85f7879c49..fadab72bb6 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 85f7879c49d2d3b2444d8dc250fa007da4fc8181 +Subproject commit fadab72bb656a3a2644e43bf46783c1f6cd96d4f diff --git a/backend/src/main/resources/db/migration/V13__add_quota.sql b/backend/src/main/resources/db/migration/V13__add_quota.sql new file mode 100644 index 0000000000..bc1d5c4f45 --- /dev/null +++ b/backend/src/main/resources/db/migration/V13__add_quota.sql @@ -0,0 +1,15 @@ +CREATE TABLE IF NOT EXISTS `quota` +( + `id` varchar(50) NOT NULL, + `api` int(10) DEFAULT NULL, + `performance` int(10) DEFAULT NULL, + `max_threads` int(10) DEFAULT NULL, + `duration` int(10) DEFAULT NULL, + `resource_pool` varchar(1000) DEFAULT NULL, + `organization_id` varchar(50) DEFAULT NULL, + `workspace_id` varchar(50) DEFAULT NULL, + `use_default` tinyint(1) DEFAULT NULL, + `update_time` bigint(13) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 \ No newline at end of file diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 831b68821e..3686cd64ff 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -1,20 +1,9 @@ import Vue from "vue"; import VueRouter from 'vue-router' import RouterSidebar from "./RouterSidebar"; -import Setting from "../../settings/Setting"; -import User from "../../settings/system/User"; import EditPerformanceTestPlan from "../../performance/test/EditPerformanceTestPlan"; import PerformanceTestPlan from "../../performance/test/PerformanceTestPlan"; -import Organization from "../../settings/system/Organization"; -import OrganizationMember from "../../settings/organization/OrganizationMember"; -import Member from "../../settings/workspace/WorkspaceMember"; -import TestCaseReportTemplate from "../../settings/workspace/TestCaseReportTemplate"; -import TestResourcePool from "../../settings/system/TestResourcePool"; -import SystemParameterSetting from "../../settings/system/SystemParameterSetting"; import MsProject from "../../project/MsProject"; -import OrganizationWorkspace from "../../settings/organization/OrganizationWorkspace"; -import PersonSetting from "../../settings/personal/PersonSetting"; -import SystemWorkspace from "../../settings/system/SystemWorkspace"; import PerformanceChart from "../../performance/report/components/PerformanceChart"; import PerformanceTestReport from "../../performance/report/PerformanceTestReport"; import ApiTest from "../../api/ApiTest"; @@ -32,10 +21,7 @@ import TestCase from "../../track/case/TestCase"; import TestTrack from "../../track/TestTrack"; import ApiReportList from "../../api/report/ApiReportList"; import axios from "axios"; -import ApiKeys from "../../settings/personal/ApiKeys"; -import ServiceIntegration from "../../settings/organization/ServiceIntegration"; - -const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/) +import Setting from "@/business/components/settings/router"; Vue.use(VueRouter); @@ -48,65 +34,7 @@ const router = new VueRouter({ sidebar: RouterSidebar } }, - ...requireContext.keys().map(key => requireContext(key).default), - { - path: "/setting", - components: { - content: Setting - }, - children: [ - { - path: 'user', - component: User, - }, - { - path: 'organization', - component: Organization, - }, - { - path: 'organizationmember', - component: OrganizationMember, - }, - { - path: 'organizationworkspace', - component: OrganizationWorkspace, - }, - { - path: 'serviceintegration', - component: ServiceIntegration, - }, - { - path: 'personsetting', - component: PersonSetting - }, - { - path: 'apikeys', - component: ApiKeys - }, - { - path: 'member', - component: Member - }, - { - path: 'systemworkspace', - component: SystemWorkspace - }, - { - path: 'testresourcepool', - component: TestResourcePool - }, - { - path: 'systemparametersetting', - component: SystemParameterSetting - }, - { - path: 'testcase/report/template', - name: 'testCaseReportTemplate', - component: TestCaseReportTemplate - }, - - ] - }, + Setting, { path: "/api", name: "api", diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue index fd8b5b3603..33edf1924b 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -1,48 +1,42 @@ diff --git a/frontend/src/business/components/settings/SettingMenuBackup.vue b/frontend/src/business/components/settings/SettingMenuBackup.vue new file mode 100644 index 0000000000..f161626a7f --- /dev/null +++ b/frontend/src/business/components/settings/SettingMenuBackup.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/frontend/src/business/components/settings/router.js b/frontend/src/business/components/settings/router.js new file mode 100644 index 0000000000..91feff501f --- /dev/null +++ b/frontend/src/business/components/settings/router.js @@ -0,0 +1,88 @@ +import Setting from "@/business/components/settings/Setting"; +import User from "@/business/components/settings/system/User"; +import Organization from "@/business/components/settings/system/Organization"; +import OrganizationMember from "@/business/components/settings/organization/OrganizationMember"; +import OrganizationWorkspace from "@/business/components/settings/organization/OrganizationWorkspace"; +import ServiceIntegration from "@/business/components/settings/organization/ServiceIntegration"; +import PersonSetting from "@/business/components/settings/personal/PersonSetting"; +import ApiKeys from "@/business/components/settings/personal/ApiKeys"; +import Member from "@/business/components/settings/workspace/WorkspaceMember"; +import SystemWorkspace from "@/business/components/settings/system/SystemWorkspace"; +import TestResourcePool from "@/business/components/settings/system/TestResourcePool"; +import SystemParameterSetting from "@/business/components/settings/system/SystemParameterSetting"; +import TestCaseReportTemplate from "@/business/components/settings/workspace/TestCaseReportTemplate"; + +const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/) + +export default { + path: "/setting", + name: "Setting", + components: { + content: Setting + }, + children: [ + { + path: 'user', + component: User, + meta: {system: true, title: 'commons.user'} + }, + { + path: 'organization', + component: Organization, + meta: {system: true, title: 'commons.organization'} + }, + { + path: 'systemworkspace', + component: SystemWorkspace, + meta: {system: true, title: 'commons.workspace'} + }, + { + path: 'testresourcepool', + component: TestResourcePool, + meta: {system: true, title: 'commons.test_resource_pool'} + }, + { + path: 'systemparametersetting', + component: SystemParameterSetting, + meta: {system: true, title: 'commons.system_parameter_setting'} + }, + ...requireContext.keys().map(key => requireContext(key).system), + { + path: 'organizationmember', + component: OrganizationMember, + meta: {organization: true, title: 'commons.member'} + }, + { + path: 'organizationworkspace', + component: OrganizationWorkspace, + meta: {organization: true, title: 'commons.workspace'} + }, + { + path: 'serviceintegration', + component: ServiceIntegration, + meta: {organization: true, title: 'organization.service_integration'} + }, + { + path: 'member', + component: Member, + meta: {workspace: true, title: 'commons.member'} + }, + { + path: 'testcase/report/template', + name: 'testCaseReportTemplate', + component: TestCaseReportTemplate, + meta: {workspace: true, title: 'test_track.plan_view.report_template'} + }, + { + path: 'personsetting', + component: PersonSetting, + meta: {person: true, title: 'commons.personal_setting'} + }, + { + path: 'apikeys', + component: ApiKeys, + meta: {person: true, title: 'commons.api_keys'} + }, + + ] +} diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index 8f78c666f5..292511d927 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -173,7 +173,7 @@ - + @@ -296,7 +296,7 @@ import MsTableOperator from "../../common/components/MsTableOperator"; import MsDialogFooter from "../../common/components/MsDialogFooter"; import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; - import {getCurrentUser, listenGoBack, removeGoBackListener} from "../../../../common/js/utils"; + import {listenGoBack, removeGoBackListener} from "@/common/js/utils"; import MsRolesTag from "../../common/components/MsRolesTag"; export default { @@ -469,7 +469,7 @@ editUserPassword(editPasswordForm) { this.$refs[editPasswordForm].validate(valid => { if (valid) { - this.result = this.$post(this.editPasswordPath, this.ruleForm, response => { + this.result = this.$post(this.editPasswordPath, this.ruleForm, () => { this.$success(this.$t('commons.modify_success')); this.editPasswordVisible = false; this.search(); @@ -492,7 +492,7 @@ let roles = data.roles; // let userRoles = result.userRoles; this.$set(this.tableData[i], "roles", roles); - this.$set(this.tableData[i], "isLdapUser", this.tableData[i].source === 'LDAP' ? true : false); + this.$set(this.tableData[i], "isLdapUser", this.tableData[i].source === 'LDAP'); }); } }) diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 52adadce7e..7e4d80cc2b 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 52adadce7eb781fcab20c5e1ab7e83bd03b24b4e +Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d diff --git a/frontend/src/common/js/ajax.js b/frontend/src/common/js/ajax.js index f738df0795..8b4545524b 100644 --- a/frontend/src/common/js/ajax.js +++ b/frontend/src/common/js/ajax.js @@ -64,6 +64,20 @@ export default { } } + Vue.prototype.$$get = function (url, data, success) { + let result = {loading: true}; + if (!success) { + return axios.get(url, {params: data}); + } else { + axios.get(url, {params: data}).then(response => { + then(success, response, result); + }).catch(error => { + exception(error, result); + }); + return result; + } + }; + Vue.prototype.$get = function (url, success) { let result = {loading: true}; if (!success) { @@ -117,7 +131,7 @@ export default { axios.all(array).then(axios.spread(callback)); }; - Vue.prototype.$fileDownload = function(url) { + Vue.prototype.$fileDownload = function (url) { axios.get(url, {responseType: 'blob'}) .then(response => { let fileName = window.decodeURI(response.headers['content-disposition'].split('=')[1]); @@ -128,11 +142,11 @@ export default { }); }; - Vue.prototype.$fileUpload = function(url, file, param, success, failure) { + Vue.prototype.$fileUpload = function (url, file, param, success, failure) { let formData = new FormData(); formData.append("file", file); formData.append('request', new Blob([JSON.stringify(param)], {type: "application/json"})); - let axiosRequestConfig = { + let axiosRequestConfig = { method: 'POST', url: url, data: formData, @@ -140,7 +154,7 @@ export default { 'Content-Type': undefined } }; - return Vue.prototype.$request(axiosRequestConfig, success, failure); + return Vue.prototype.$request(axiosRequestConfig, success, failure); } } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index e4713201c7..f7d4d08543 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -43,6 +43,8 @@ export default { user: 'User', system: 'System', personal_setting: 'Personal Setting', + api_keys: 'API Keys', + quota: 'Quota', test_resource_pool: 'Resource Pool', system_setting: 'Settings', api: 'API', @@ -766,4 +768,23 @@ export default { no_qualifying_results: "No Qualifying Results", } }, + quota: { + default: { + organization: "Organization Default Quota", + workspace: "Workspace Default Quota", + }, + api: "Number of interface tests", + performance: "Number of performance tests", + resource_pool: "Available test resource pool", + max_threads: "Maximum Concurrency", + duration: "Stress test duration", + use_default: "Use default quota", + yes: "Yes", + no: "No", + edit: "Edit", + list: "Quota List", + modify: "Modify Quota", + edit_quota_title: "{0} quota", + workspace_quota_list: "Workspace quota list of {0}", + } }; diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 016cdfe8cf..b4a69a8d4f 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -36,6 +36,8 @@ export default { phone: '电话', role: '角色', personal_info: '个人信息', + api_keys: 'API Keys', + quota: '配额管理', status: '状态', show_all: '显示全部', show: '显示', @@ -769,4 +771,23 @@ export default { no_qualifying_results: "没有达到条件的结果", } }, + quota: { + default: { + organization: "组织默认配额", + workspace: "工作空间默认配额", + }, + api: "接口测试数量", + performance: "性能测试数量", + resource_pool: "可用测试资源池", + max_threads: "最大并发数", + duration: "压测时长", + use_default: "使用默认配额", + yes: "是", + no: "否", + edit: "编辑", + list: "配额列表", + modify: "修改配额", + edit_quota_title: "{0}的配额", + workspace_quota_list: "{0}的工作空间配额列表", + } }; diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 3038392d69..82e73a7167 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -43,6 +43,8 @@ export default { user: '用戶', system: '系統', personal_setting: '個人設置', + api_keys: 'API Keys', + quota: '配額管理', test_resource_pool: '測試資源池', system_setting: '系統設置', api: '接口測試', @@ -765,4 +767,23 @@ export default { no_qualifying_results: "沒有達到條件的結果", } }, + quota: { + default: { + organization: "組織默認配額", + workspace: "工作空間默認配額", + }, + api: "接口測試數量", + performance: "性能測試數量", + resource_pool: "可用測試資源池", + max_threads: "最大並發數", + duration: "壓測時長", + use_default: "使用默認配額", + yes: "是", + no: "否", + edit: "編輯", + list: "配額列表", + modify: "修改配額", + edit_quota_title: "{0}的配額", + workspace_quota_list: "{0}的工作空間配額列表", + } }; From b43c2f4962e6a8e59853c1c4b450fa72b9f8b3a2 Mon Sep 17 00:00:00 2001 From: q4speed Date: Fri, 14 Aug 2020 13:38:41 +0800 Subject: [PATCH 3/7] refactor: merge db.migration --- .../db/migration/{V13__add_quota.sql => V15__add_quota.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename backend/src/main/resources/db/migration/{V13__add_quota.sql => V15__add_quota.sql} (100%) diff --git a/backend/src/main/resources/db/migration/V13__add_quota.sql b/backend/src/main/resources/db/migration/V15__add_quota.sql similarity index 100% rename from backend/src/main/resources/db/migration/V13__add_quota.sql rename to backend/src/main/resources/db/migration/V15__add_quota.sql From 53ba3dd363128f438002c937b4e98826f6942294 Mon Sep 17 00:00:00 2001 From: wangzhen-fit2cloud Date: Fri, 14 Aug 2020 14:05:04 +0800 Subject: [PATCH 4/7] =?UTF-8?q?docs:=20=E5=9C=A8=20readme=20=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=B4=E8=B0=A2=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6c3febbb0b..b187c2dcdd 100755 --- a/README.md +++ b/README.md @@ -187,6 +187,12 @@ v1.1.0 是 v1.0.0 之后的功能版本。 - 基础设施: [Docker](https://www.docker.com/), [Kubernetes](https://kubernetes.io/) - 测试引擎: [JMeter](https://jmeter.apache.org/) +## 致谢 + +- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路 +- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎 +- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库 + ## 加入 MeterSphere 团队 我们正在招聘 MeterSphere 技术布道师,一起打造开源明星项目,请发简历到 metersphere@fit2cloud.com From 7f9d8235942a07ee18ec344f20a8f32928d203ff Mon Sep 17 00:00:00 2001 From: wangzhen-fit2cloud Date: Fri, 14 Aug 2020 14:22:46 +0800 Subject: [PATCH 5/7] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20readme=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b187c2dcdd..245a2a28ca 100755 --- a/README.md +++ b/README.md @@ -189,9 +189,9 @@ v1.1.0 是 v1.0.0 之后的功能版本。 ## 致谢 -- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路 -- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎 -- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库 +- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路 +- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎 +- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库 ## 加入 MeterSphere 团队 From 7e6530a591ae3198b891ecc30e860d3dcbf7af5a Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 14 Aug 2020 14:33:02 +0800 Subject: [PATCH 6/7] =?UTF-8?q?style(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?= =?UTF-8?q?:=20=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TemplateComponent/DefectListComponent.vue | 38 ++++++++++--------- .../TemplateComponent/TemplateComponent.vue | 2 +- .../comonents/report/TestCaseReportView.vue | 4 +- frontend/src/i18n/en-US.js | 6 ++- frontend/src/i18n/zh-CN.js | 6 ++- frontend/src/i18n/zh-TW.js | 6 ++- 6 files changed, 39 insertions(+), 23 deletions(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue index 02acec71b1..d04a69d014 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue @@ -2,7 +2,8 @@ @@ -58,16 +57,19 @@ name: "DefectListComponent", components: {StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem, CommonComponent}, props: { - failureTestCases: { + defectList: { type: Array, default() { return [ { + id: "1023", + module: "模块e", title: 'testCase1', + description: "第一个模块测试", + status: "接受/处理", + currentOwner: "Andy", + created: "2010.3.3", }, - { - title: 'testCase1', - } ] } } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue index 1d283a5e61..20f1782041 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue @@ -17,7 +17,7 @@ - + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue index 2689c0836a..47e43d6537 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue @@ -167,7 +167,6 @@ getMetric() { this.result = this.$get('/test/plan/get/metric/' + this.planId, response => { this.metric = response.data; - console.log(this.metric) if (!this.metric.failureTestCases) { this.metric.failureTestCases = []; } @@ -177,6 +176,9 @@ if (!this.metric.moduleExecuteResult) { this.metric.moduleExecuteResult = []; } + /*缺陷列表*/ + this.metric.defectList = []; + if (this.report.startTime) { this.metric.startTime = new Date(this.report.startTime); } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index bee8cb3353..32e5a138c0 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -606,7 +606,11 @@ export default { delete_confirm: "Confirm delete module:", delete_all_resource: "and all submodules and test cases under the module", module: "Module", - title:"Title" + title: "Title", + describe: "Describe", + status: "Status", + current_owner: "Current Owner", + creation_time: "Creation time" }, home: { recent_test: "Recent test", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index ed995f7b40..ca0b45eb0d 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -611,7 +611,11 @@ export default { delete_confirm: "确认删除模块: ", delete_all_resource: "以及模块下所有子模块和测试用例", module: "模块", - title:"标题", + title: "标题", + status: "状态", + describe: "描述", + current_owner: "处理人", + creation_time: "创建时间" }, home: { recent_test: "最近测试", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 8cc3789b1a..fce9ae9389 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -606,7 +606,11 @@ export default { delete_confirm: "確認刪除模塊: ", delete_all_resource: "以及模塊下所有子模塊和測試用例", module: "模塊", - title:"標題", + title: "標題", + status: "狀態", + describe: "描述", + current_owner: "處理人", + creation_time: "創建時間" }, home: { recent_test: "最近測試", From ce96ec0a4bf3ab52787cd13d963670144a33f043 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 14 Aug 2020 14:50:06 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/domain/Issues.java | 27 + .../base/domain/IssuesExample.java | 740 ++++++++++++++++++ .../base/domain/TestCaseIssues.java | 2 - .../base/domain/TestCaseIssuesExample.java | 70 -- .../metersphere/base/mapper/IssuesMapper.java | 36 + .../metersphere/base/mapper/IssuesMapper.xml | 323 ++++++++ .../base/mapper/TestCaseIssuesMapper.xml | 29 +- .../db/migration/V13__service_integration.sql | 17 +- 8 files changed, 1148 insertions(+), 96 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/Issues.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/IssuesExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.xml diff --git a/backend/src/main/java/io/metersphere/base/domain/Issues.java b/backend/src/main/java/io/metersphere/base/domain/Issues.java new file mode 100644 index 0000000000..1aac52464a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/Issues.java @@ -0,0 +1,27 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class Issues implements Serializable { + private String id; + + private String title; + + private String status; + + private Long createTime; + + private Long updateTime; + + private String reporter; + + private String lastmodify; + + private String platform; + + private String description; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/IssuesExample.java b/backend/src/main/java/io/metersphere/base/domain/IssuesExample.java new file mode 100644 index 0000000000..c2f363f61d --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/IssuesExample.java @@ -0,0 +1,740 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class IssuesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IssuesExample() { + 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 Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + 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 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 andReporterIsNull() { + addCriterion("reporter is null"); + return (Criteria) this; + } + + public Criteria andReporterIsNotNull() { + addCriterion("reporter is not null"); + return (Criteria) this; + } + + public Criteria andReporterEqualTo(String value) { + addCriterion("reporter =", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterNotEqualTo(String value) { + addCriterion("reporter <>", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterGreaterThan(String value) { + addCriterion("reporter >", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterGreaterThanOrEqualTo(String value) { + addCriterion("reporter >=", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterLessThan(String value) { + addCriterion("reporter <", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterLessThanOrEqualTo(String value) { + addCriterion("reporter <=", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterLike(String value) { + addCriterion("reporter like", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterNotLike(String value) { + addCriterion("reporter not like", value, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterIn(List values) { + addCriterion("reporter in", values, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterNotIn(List values) { + addCriterion("reporter not in", values, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterBetween(String value1, String value2) { + addCriterion("reporter between", value1, value2, "reporter"); + return (Criteria) this; + } + + public Criteria andReporterNotBetween(String value1, String value2) { + addCriterion("reporter not between", value1, value2, "reporter"); + return (Criteria) this; + } + + public Criteria andLastmodifyIsNull() { + addCriterion("lastmodify is null"); + return (Criteria) this; + } + + public Criteria andLastmodifyIsNotNull() { + addCriterion("lastmodify is not null"); + return (Criteria) this; + } + + public Criteria andLastmodifyEqualTo(String value) { + addCriterion("lastmodify =", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyNotEqualTo(String value) { + addCriterion("lastmodify <>", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyGreaterThan(String value) { + addCriterion("lastmodify >", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyGreaterThanOrEqualTo(String value) { + addCriterion("lastmodify >=", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyLessThan(String value) { + addCriterion("lastmodify <", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyLessThanOrEqualTo(String value) { + addCriterion("lastmodify <=", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyLike(String value) { + addCriterion("lastmodify like", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyNotLike(String value) { + addCriterion("lastmodify not like", value, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyIn(List values) { + addCriterion("lastmodify in", values, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyNotIn(List values) { + addCriterion("lastmodify not in", values, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyBetween(String value1, String value2) { + addCriterion("lastmodify between", value1, value2, "lastmodify"); + return (Criteria) this; + } + + public Criteria andLastmodifyNotBetween(String value1, String value2) { + addCriterion("lastmodify not between", value1, value2, "lastmodify"); + return (Criteria) this; + } + + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(String value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(String value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(String value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(String value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(String value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(String value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLike(String value) { + addCriterion("platform like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotLike(String value) { + addCriterion("platform not like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(String value1, String value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(String value1, String value2) { + addCriterion("platform not between", value1, value2, "platform"); + 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/src/main/java/io/metersphere/base/domain/TestCaseIssues.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseIssues.java index c658c42f84..cff8104fd7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseIssues.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseIssues.java @@ -11,7 +11,5 @@ public class TestCaseIssues implements Serializable { private String issuesId; - private String platform; - private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java index 4870ff4ad4..02920aa81a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java @@ -313,76 +313,6 @@ public class TestCaseIssuesExample { addCriterion("issues_id not between", value1, value2, "issuesId"); return (Criteria) this; } - - public Criteria andPlatformIsNull() { - addCriterion("platform is null"); - return (Criteria) this; - } - - public Criteria andPlatformIsNotNull() { - addCriterion("platform is not null"); - return (Criteria) this; - } - - public Criteria andPlatformEqualTo(String value) { - addCriterion("platform =", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformNotEqualTo(String value) { - addCriterion("platform <>", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformGreaterThan(String value) { - addCriterion("platform >", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformGreaterThanOrEqualTo(String value) { - addCriterion("platform >=", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformLessThan(String value) { - addCriterion("platform <", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformLessThanOrEqualTo(String value) { - addCriterion("platform <=", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformLike(String value) { - addCriterion("platform like", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformNotLike(String value) { - addCriterion("platform not like", value, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformIn(List values) { - addCriterion("platform in", values, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformNotIn(List values) { - addCriterion("platform not in", values, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformBetween(String value1, String value2) { - addCriterion("platform between", value1, value2, "platform"); - return (Criteria) this; - } - - public Criteria andPlatformNotBetween(String value1, String value2) { - addCriterion("platform not between", value1, value2, "platform"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.java b/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.java new file mode 100644 index 0000000000..0dd8d77d7d --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.Issues; +import io.metersphere.base.domain.IssuesExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IssuesMapper { + long countByExample(IssuesExample example); + + int deleteByExample(IssuesExample example); + + int deleteByPrimaryKey(String id); + + int insert(Issues record); + + int insertSelective(Issues record); + + List selectByExampleWithBLOBs(IssuesExample example); + + List selectByExample(IssuesExample example); + + Issues selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Issues record, @Param("example") IssuesExample example); + + int updateByExampleWithBLOBs(@Param("record") Issues record, @Param("example") IssuesExample example); + + int updateByExample(@Param("record") Issues record, @Param("example") IssuesExample example); + + int updateByPrimaryKeySelective(Issues record); + + int updateByPrimaryKeyWithBLOBs(Issues record); + + int updateByPrimaryKey(Issues record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.xml new file mode 100644 index 0000000000..5d5bac2cb6 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/IssuesMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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, title, `status`, create_time, update_time, reporter, lastmodify, platform + + + description + + + + + + delete from issues + where id = #{id,jdbcType=VARCHAR} + + + delete from issues + + + + + + insert into issues (id, title, `status`, + create_time, update_time, reporter, + lastmodify, platform, description + ) + values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reporter,jdbcType=VARCHAR}, + #{lastmodify,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR} + ) + + + insert into issues + + + id, + + + title, + + + `status`, + + + create_time, + + + update_time, + + + reporter, + + + lastmodify, + + + platform, + + + description, + + + + + #{id,jdbcType=VARCHAR}, + + + #{title,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{reporter,jdbcType=VARCHAR}, + + + #{lastmodify,jdbcType=VARCHAR}, + + + #{platform,jdbcType=VARCHAR}, + + + #{description,jdbcType=LONGVARCHAR}, + + + + + + update issues + + + id = #{record.id,jdbcType=VARCHAR}, + + + title = #{record.title,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + reporter = #{record.reporter,jdbcType=VARCHAR}, + + + lastmodify = #{record.lastmodify,jdbcType=VARCHAR}, + + + platform = #{record.platform,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=LONGVARCHAR}, + + + + + + + + update issues + set id = #{record.id,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + reporter = #{record.reporter,jdbcType=VARCHAR}, + lastmodify = #{record.lastmodify,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=LONGVARCHAR} + + + + + + update issues + set id = #{record.id,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + reporter = #{record.reporter,jdbcType=VARCHAR}, + lastmodify = #{record.lastmodify,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR} + + + + + + update issues + + + title = #{title,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + reporter = #{reporter,jdbcType=VARCHAR}, + + + lastmodify = #{lastmodify,jdbcType=VARCHAR}, + + + platform = #{platform,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update issues + set title = #{title,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + reporter = #{reporter,jdbcType=VARCHAR}, + lastmodify = #{lastmodify,jdbcType=VARCHAR}, + platform = #{platform,jdbcType=VARCHAR}, + description = #{description,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update issues + set title = #{title,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + reporter = #{reporter,jdbcType=VARCHAR}, + lastmodify = #{lastmodify,jdbcType=VARCHAR}, + platform = #{platform,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml index 9a4bd3460f..10755b5265 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml @@ -5,7 +5,6 @@ - @@ -66,7 +65,7 @@ - id, test_case_id, issues_id, platform + id, test_case_id, issues_id @@ -153,9 +146,6 @@ issues_id = #{record.issuesId,jdbcType=VARCHAR}, - - platform = #{record.platform,jdbcType=VARCHAR}, - @@ -165,8 +155,7 @@ update test_case_issues set id = #{record.id,jdbcType=VARCHAR}, test_case_id = #{record.testCaseId,jdbcType=VARCHAR}, - issues_id = #{record.issuesId,jdbcType=VARCHAR}, - platform = #{record.platform,jdbcType=VARCHAR} + issues_id = #{record.issuesId,jdbcType=VARCHAR} @@ -180,17 +169,13 @@ issues_id = #{issuesId,jdbcType=VARCHAR}, - - platform = #{platform,jdbcType=VARCHAR}, - where id = #{id,jdbcType=VARCHAR} update test_case_issues set test_case_id = #{testCaseId,jdbcType=VARCHAR}, - issues_id = #{issuesId,jdbcType=VARCHAR}, - platform = #{platform,jdbcType=VARCHAR} + issues_id = #{issuesId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/resources/db/migration/V13__service_integration.sql b/backend/src/main/resources/db/migration/V13__service_integration.sql index c48d2d627c..299084bace 100644 --- a/backend/src/main/resources/db/migration/V13__service_integration.sql +++ b/backend/src/main/resources/db/migration/V13__service_integration.sql @@ -13,6 +13,19 @@ create table if not exists test_case_issues id varchar(50) not null primary key, test_case_id varchar(50) not null, - issues_id varchar(100) not null, - platform varchar(50) not null + issues_id varchar(100) not null +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +create table if not exists issues +( + id varchar(50) not null + primary key, + title varchar(50) null, + description text null, + status varchar(50) null, + create_time bigint(13) null, + update_time bigint(13) null, + reporter varchar(50) null comment 'case issues creator', + lastmodify varchar(50) null, + platform varchar(50) null ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file