diff --git a/backend/src/main/java/io/metersphere/base/domain/Project.java b/backend/src/main/java/io/metersphere/base/domain/Project.java index 5a95aaa5ce..f6f24ddc6b 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Project.java +++ b/backend/src/main/java/io/metersphere/base/domain/Project.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class Project implements Serializable { @@ -30,5 +29,7 @@ public class Project implements Serializable { private String issueTemplateId; + private Boolean customNum; + private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java b/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java index b3c5b9ca12..0ea636173b 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ProjectExample.java @@ -913,6 +913,66 @@ public class ProjectExample { addCriterion("issue_template_id not between", value1, value2, "issueTemplateId"); return (Criteria) this; } + + public Criteria andCustomNumIsNull() { + addCriterion("custom_num is null"); + return (Criteria) this; + } + + public Criteria andCustomNumIsNotNull() { + addCriterion("custom_num is not null"); + return (Criteria) this; + } + + public Criteria andCustomNumEqualTo(Boolean value) { + addCriterion("custom_num =", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotEqualTo(Boolean value) { + addCriterion("custom_num <>", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumGreaterThan(Boolean value) { + addCriterion("custom_num >", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumGreaterThanOrEqualTo(Boolean value) { + addCriterion("custom_num >=", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumLessThan(Boolean value) { + addCriterion("custom_num <", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumLessThanOrEqualTo(Boolean value) { + addCriterion("custom_num <=", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumIn(List values) { + addCriterion("custom_num in", values, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotIn(List values) { + addCriterion("custom_num not in", values, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumBetween(Boolean value1, Boolean value2) { + addCriterion("custom_num between", value1, value2, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotBetween(Boolean value1, Boolean value2) { + addCriterion("custom_num not between", value1, value2, "customNum"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCase.java index 5b29f508cf..9c18ce630d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCase.java @@ -49,5 +49,7 @@ public class TestCase implements Serializable { private String status; + private String customNum; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java index 96daffcbf2..80aeb81946 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java @@ -1603,6 +1603,76 @@ public class TestCaseExample { addCriterion("`status` not between", value1, value2, "status"); return (Criteria) this; } + + public Criteria andCustomNumIsNull() { + addCriterion("custom_num is null"); + return (Criteria) this; + } + + public Criteria andCustomNumIsNotNull() { + addCriterion("custom_num is not null"); + return (Criteria) this; + } + + public Criteria andCustomNumEqualTo(String value) { + addCriterion("custom_num =", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotEqualTo(String value) { + addCriterion("custom_num <>", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumGreaterThan(String value) { + addCriterion("custom_num >", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumGreaterThanOrEqualTo(String value) { + addCriterion("custom_num >=", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumLessThan(String value) { + addCriterion("custom_num <", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumLessThanOrEqualTo(String value) { + addCriterion("custom_num <=", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumLike(String value) { + addCriterion("custom_num like", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotLike(String value) { + addCriterion("custom_num not like", value, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumIn(List values) { + addCriterion("custom_num in", values, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotIn(List values) { + addCriterion("custom_num not in", values, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumBetween(String value1, String value2) { + addCriterion("custom_num between", value1, value2, "customNum"); + return (Criteria) this; + } + + public Criteria andCustomNumNotBetween(String value1, String value2) { + addCriterion("custom_num not between", value1, value2, "customNum"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml index 9e8035bbef..2723649d41 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ProjectMapper.xml @@ -14,6 +14,7 @@ + @@ -75,7 +76,7 @@ id, workspace_id, `name`, description, create_time, update_time, tapd_id, jira_key, - zentao_id, `repeatable`, case_template_id, issue_template_id + zentao_id, `repeatable`, case_template_id, issue_template_id, custom_num @@ -243,6 +250,9 @@ issue_template_id = #{record.issueTemplateId,jdbcType=VARCHAR}, + + custom_num = #{record.customNum,jdbcType=BIT}, + @@ -261,7 +271,8 @@ zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, `repeatable` = #{record.repeatable,jdbcType=BIT}, case_template_id = #{record.caseTemplateId,jdbcType=VARCHAR}, - issue_template_id = #{record.issueTemplateId,jdbcType=VARCHAR} + issue_template_id = #{record.issueTemplateId,jdbcType=VARCHAR}, + custom_num = #{record.customNum,jdbcType=BIT} @@ -302,6 +313,9 @@ issue_template_id = #{issueTemplateId,jdbcType=VARCHAR}, + + custom_num = #{customNum,jdbcType=BIT}, + where id = #{id,jdbcType=VARCHAR} @@ -317,7 +331,8 @@ zentao_id = #{zentaoId,jdbcType=VARCHAR}, `repeatable` = #{repeatable,jdbcType=BIT}, case_template_id = #{caseTemplateId,jdbcType=VARCHAR}, - issue_template_id = #{issueTemplateId,jdbcType=VARCHAR} + issue_template_id = #{issueTemplateId,jdbcType=VARCHAR}, + custom_num = #{customNum,jdbcType=BIT} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml index c9d1cb6d90..2bfeb8402e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml @@ -24,6 +24,7 @@ + @@ -93,7 +94,7 @@ id, node_id, node_path, project_id, `name`, `type`, maintainer, priority, `method`, prerequisite, create_time, update_time, test_id, sort, num, other_test_name, review_status, - tags, demand_id, demand_name, follow_people, `status` + tags, demand_id, demand_name, follow_people, `status`, custom_num remark, steps, step_description, expected_result, custom_fields @@ -154,8 +155,8 @@ test_id, sort, num, other_test_name, review_status, tags, demand_id, demand_name, follow_people, - `status`, remark, steps, - step_description, expected_result, + `status`, custom_num, remark, + steps, step_description, expected_result, custom_fields) values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{nodePath,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, @@ -164,8 +165,8 @@ #{testId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{num,jdbcType=INTEGER}, #{otherTestName,jdbcType=VARCHAR}, #{reviewStatus,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, #{demandId,jdbcType=VARCHAR}, #{demandName,jdbcType=VARCHAR}, #{followPeople,jdbcType=VARCHAR}, - #{status,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR}, - #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR}, + #{status,jdbcType=VARCHAR}, #{customNum,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, + #{steps,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR}, #{customFields,jdbcType=LONGVARCHAR}) @@ -237,6 +238,9 @@ `status`, + + custom_num, + remark, @@ -320,6 +324,9 @@ #{status,jdbcType=VARCHAR}, + + #{customNum,jdbcType=VARCHAR}, + #{remark,jdbcType=LONGVARCHAR}, @@ -412,6 +419,9 @@ `status` = #{record.status,jdbcType=VARCHAR}, + + custom_num = #{record.customNum,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=LONGVARCHAR}, @@ -456,6 +466,7 @@ demand_name = #{record.demandName,jdbcType=VARCHAR}, follow_people = #{record.followPeople,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, + custom_num = #{record.customNum,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=LONGVARCHAR}, steps = #{record.steps,jdbcType=LONGVARCHAR}, step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, @@ -488,7 +499,8 @@ demand_id = #{record.demandId,jdbcType=VARCHAR}, demand_name = #{record.demandName,jdbcType=VARCHAR}, follow_people = #{record.followPeople,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR} + `status` = #{record.status,jdbcType=VARCHAR}, + custom_num = #{record.customNum,jdbcType=VARCHAR} @@ -559,6 +571,9 @@ `status` = #{status,jdbcType=VARCHAR}, + + custom_num = #{customNum,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=LONGVARCHAR}, @@ -600,6 +615,7 @@ demand_name = #{demandName,jdbcType=VARCHAR}, follow_people = #{followPeople,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, + custom_num = #{customNum,jdbcType=VARCHAR}, remark = #{remark,jdbcType=LONGVARCHAR}, steps = #{steps,jdbcType=LONGVARCHAR}, step_description = #{stepDescription,jdbcType=LONGVARCHAR}, @@ -629,7 +645,8 @@ demand_id = #{demandId,jdbcType=VARCHAR}, demand_name = #{demandName,jdbcType=VARCHAR}, follow_people = #{followPeople,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR} + `status` = #{status,jdbcType=VARCHAR}, + custom_num = #{customNum,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml index d42bddc58a..fdb9841919 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml @@ -4,7 +4,7 @@ select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status from test_case @@ -297,7 +300,8 @@ and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%') - or test_case.tags like CONCAT('%', #{request.name},'%')) + or test_case.tags like CONCAT('%', #{request.name},'%') + or test_case.custom_num like CONCAT('%', #{request.name},'%')) and test_case.id in (select test_case_id from test_case_test where test_case_test.create_time >= #{request.createTime}) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 84e7c614af..4b5731e16e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -138,7 +138,7 @@