diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java index 2ceaf9f5b3..fa4e5d86ef 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java @@ -144,6 +144,11 @@ public class ApiAutomationController { apiAutomationService.relevance(request); } + @PostMapping("/relevance/review") + public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){ + apiAutomationService.relevanceReview(request); + } + @PostMapping(value = "/schedule/update") public void updateSchedule(@RequestBody Schedule request) { apiAutomationService.updateSchedule(request); diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java index 2e971f4121..b7e23f8f29 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java @@ -59,6 +59,12 @@ public class ApiDefinitionController { request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiDefinitionService.listRelevance(request)); } + @PostMapping("/list/relevance/review/{goPage}/{pageSize}") + public Pager> listRelevanceReview(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiDefinitionRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return PageUtils.setPageInfo(page, apiDefinitionService.listRelevanceReview(request)); + } @PostMapping("/list/all") public List list(@RequestBody ApiDefinitionRequest request) { @@ -218,6 +224,10 @@ public class ApiDefinitionController { public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) { apiDefinitionService.testPlanRelevance(request); } + @PostMapping("/relevance/review") + public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){ + apiDefinitionService.testCaseReviewRelevance(request); + } @PostMapping("/preview") public String preview(@RequestBody String jsonSchema) { diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java b/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java index 01032800e6..4596900ca1 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java @@ -120,6 +120,10 @@ public class ApiTestCaseController { public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) { apiTestCaseService.relevanceByCase(request); } + @PostMapping("/relevance/review") + public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){ + apiTestCaseService.relevanceByApiByReview(request); + } @PostMapping(value = "/jenkins/run") public String jenkinsRun(@RequestBody RunCaseRequest request) { diff --git a/backend/src/main/java/io/metersphere/api/dto/automation/ApiScenarioRequest.java b/backend/src/main/java/io/metersphere/api/dto/automation/ApiScenarioRequest.java index 8034b6a573..4e288f06d6 100644 --- a/backend/src/main/java/io/metersphere/api/dto/automation/ApiScenarioRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/automation/ApiScenarioRequest.java @@ -22,4 +22,5 @@ public class ApiScenarioRequest extends BaseQueryRequest { private long createTime = 0; private String executeStatus; private boolean notInTestPlan; + private String reviewId; } diff --git a/backend/src/main/java/io/metersphere/api/dto/automation/TestPlanScenarioRequest.java b/backend/src/main/java/io/metersphere/api/dto/automation/TestPlanScenarioRequest.java index 6be0492f89..165970fedf 100644 --- a/backend/src/main/java/io/metersphere/api/dto/automation/TestPlanScenarioRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/automation/TestPlanScenarioRequest.java @@ -25,4 +25,5 @@ public class TestPlanScenarioRequest { private Map> filters; private Map combine; private List ids; + private String reviewId; } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionRequest.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionRequest.java index f8e4e186fa..e533699e41 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiDefinitionRequest.java @@ -20,4 +20,5 @@ public class ApiDefinitionRequest extends BaseQueryRequest { private long createTime = 0; private String status; private String apiCaseCoverage; + private String reviewId; } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java index c1ae7c9c5b..f0037ec69e 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java @@ -27,4 +27,5 @@ public class ApiTestCaseRequest { private Map combine; private boolean isSelectThisWeedData; private long createTime = 0; + private String reviewId; } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 917ba0216b..ebc994c1c4 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -23,6 +23,7 @@ import io.metersphere.api.parse.ApiImportParser; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.ApiScenarioMapper; import io.metersphere.base.mapper.ApiScenarioReportMapper; +import io.metersphere.base.mapper.TestCaseReviewScenarioMapper; import io.metersphere.base.mapper.TestPlanApiScenarioMapper; import io.metersphere.base.mapper.ext.*; import io.metersphere.commons.constants.*; @@ -71,6 +72,8 @@ public class ApiAutomationService { @Resource private TestPlanApiScenarioMapper testPlanApiScenarioMapper; @Resource + private TestCaseReviewScenarioMapper testCaseReviewScenarioMapper; + @Resource private JMeterService jMeterService; @Resource private ApiTestEnvironmentService environmentService; @@ -94,7 +97,12 @@ public class ApiAutomationService { setApiScenarioProjectIds(list); return list; } - + public List listReview(ApiScenarioRequest request) { + request = this.initRequest(request, true, true); + List list = extApiScenarioMapper.listReview(request); + setApiScenarioProjectIds(list); + return list; + } private void setApiScenarioProjectIds(List list) { // 如果场景步骤涉及多项目,则把涉及到的项目ID保存在projectIds属性 list.forEach(data -> { @@ -705,7 +713,32 @@ public class ApiAutomationService { testPlanApiScenarioMapper.insert(testPlanApiScenario); }); } + public void relevanceReview(ApiCaseRelevanceRequest request){ + Map> mapping = request.getMapping(); + Map envMap = request.getEnvMap(); + Set set = mapping.keySet(); + if (set.isEmpty()) { + return; + } + set.forEach(id->{ + Map newEnvMap = new HashMap<>(16); + if (envMap != null && !envMap.isEmpty()) { + List list = mapping.get(id); + list.forEach(l -> { + newEnvMap.put(l, envMap.get(l)); + }); + } + TestCaseReviewScenario testCaseReviewScenario=new TestCaseReviewScenario(); + testCaseReviewScenario.setId(UUID.randomUUID().toString()); + testCaseReviewScenario.setApiScenarioId(id); + testCaseReviewScenario.setTestCaseReviewId(request.getReviewId()); + testCaseReviewScenario.setCreateTime(System.currentTimeMillis()); + testCaseReviewScenario.setUpdateTime(System.currentTimeMillis()); + testCaseReviewScenario.setEnvironment(JSON.toJSONString(newEnvMap)); + testCaseReviewScenarioMapper.insert(testCaseReviewScenario); + }); + } public List selectByIds(List ids) { ApiScenarioExample example = new ApiScenarioExample(); example.createCriteria().andIdIn(ids); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index adb1757e92..91b3da86e7 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -15,6 +15,7 @@ import io.metersphere.commons.utils.DateUtils; import io.metersphere.commons.utils.SessionUtils; import io.metersphere.track.dto.TestPlanDTO; import io.metersphere.track.request.testcase.QueryTestPlanRequest; +import io.metersphere.track.service.TestCaseReviewApiCaseService; import io.metersphere.track.service.TestPlanApiCaseService; import io.metersphere.track.service.TestPlanService; import org.apache.commons.collections4.CollectionUtils; @@ -41,6 +42,8 @@ public class ApiDefinitionExecResultService { private TestPlanService testPlanService; @Resource private ApiTestCaseMapper apiTestCaseMapper; + @Resource + private TestCaseReviewApiCaseService testCaseReviewApiCaseService; @Resource SqlSessionFactory sqlSessionFactory; @@ -67,6 +70,8 @@ public class ApiDefinitionExecResultService { saveResult.setStatus(status); if (StringUtils.equals(type, ApiRunMode.API_PLAN.name())) { testPlanApiCaseService.setExecResult(item.getName(), status); + testCaseReviewApiCaseService.setExecResult(item.getName(), status); + } // 更新用例最后执行结果 ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = new ApiTestCaseWithBLOBs(); @@ -118,6 +123,7 @@ public class ApiDefinitionExecResultService { } else { userID = Objects.requireNonNull(SessionUtils.getUser()).getId(); testPlanApiCaseService.setExecResult(item.getName(), status); + testCaseReviewApiCaseService.setExecResult(item.getName(), status); } saveResult.setUserId(userID); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index c99ca91602..94d4cd2fb9 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -590,6 +590,10 @@ public class ApiDefinitionService { apiTestCaseService.relevanceByApi(request); } + public void testCaseReviewRelevance(ApiCaseRelevanceRequest request) { + apiTestCaseService.relevanceByApiByReview(request); + } + /** * 数据统计-接口类型 * @@ -674,6 +678,12 @@ public class ApiDefinitionService { calculateResult(resList); return resList; } + public List listRelevanceReview(ApiDefinitionRequest request) { + request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); + List resList = extApiDefinitionMapper.listRelevanceReview(request); + calculateResult(resList); + return resList; + } public void calculateResult(List resList) { if (!resList.isEmpty()) { diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index d207ca7912..a0eddeeca5 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -112,7 +112,9 @@ public class ApiModuleService extends NodeTreeService { apiModuleDTO.setName(name); apiModuleDTO.setLabel(name); apiModuleDTO.setChildren(nodeList); - list.add(apiModuleDTO); + if (!org.springframework.util.CollectionUtils.isEmpty(nodeList)) { + list.add(apiModuleDTO); + } }); return list; } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java index ab6ebab28a..23493f60c5 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java @@ -100,7 +100,9 @@ public class ApiScenarioModuleService extends NodeTreeService apiTestCases = apiTestCaseMapper.selectByExample(example); relevance(apiTestCases, request); } - + public void relevanceByApiByReview(ApiCaseRelevanceRequest request){ + List ids = request.getSelectIds(); + if (CollectionUtils.isEmpty(ids)) { + return; + } + ApiTestCaseExample example = new ApiTestCaseExample(); + example.createCriteria().andIdIn(ids); + List apiTestCases = apiTestCaseMapper.selectByExample(example); + relevanceByReview(apiTestCases, request); + } public void relevanceByCase(ApiCaseRelevanceRequest request) { List ids = request.getSelectIds(); if (CollectionUtils.isEmpty(ids)) { @@ -350,9 +358,33 @@ public class ApiTestCaseService { sqlSession.flushStatements(); } + private void relevanceByReview(List apiTestCases, ApiCaseRelevanceRequest request) { + SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); + ExtTestCaseReviewApiCaseMapper batchMapper = sqlSession.getMapper(ExtTestCaseReviewApiCaseMapper.class); + apiTestCases.forEach(apiTestCase -> { + TestCaseReviewApiCase TestCaseReviewApiCase = new TestCaseReviewApiCase(); + TestCaseReviewApiCase.setId(UUID.randomUUID().toString()); + TestCaseReviewApiCase.setApiCaseId(apiTestCase.getId()); + TestCaseReviewApiCase.setTestCaseReviewId(request.getReviewId()); + TestCaseReviewApiCase.setEnvironmentId(request.getEnvironmentId()); + TestCaseReviewApiCase.setCreateTime(System.currentTimeMillis()); + TestCaseReviewApiCase.setUpdateTime(System.currentTimeMillis()); + batchMapper.insertIfNotExists(TestCaseReviewApiCase); + }); + TestCaseReview testCaseReview=testCaseReviewMapper.selectByPrimaryKey(request.getReviewId()); + if (StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Prepare.name()) + || StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Completed.name())) { + testCaseReview.setStatus(TestPlanStatus.Underway.name()); + testCaseReviewMapper.updateByPrimaryKey(testCaseReview); + } + sqlSession.flushStatements(); + } public List selectIdsNotExistsInPlan(String projectId, String planId) { return extApiTestCaseMapper.selectIdsNotExistsInPlan(projectId, planId); } + public List selectIdsNotExistsInReview(String projectId,String reviewId){ + return extApiTestCaseMapper.selectIdsNotExistsInReview(projectId,reviewId); + } public List countProtocolByProjectID(String projectId) { return extApiTestCaseMapper.countProtocolByProjectID(projectId); diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCase.java new file mode 100644 index 0000000000..2755488e99 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCase.java @@ -0,0 +1,23 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewApiCase implements Serializable { + private String id; + + private String testCaseReviewId; + + private String apiCaseId; + + private String status; + + private String environmentId; + + private Long createTime; + + private Long updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCaseExample.java new file mode 100644 index 0000000000..90bd847731 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewApiCaseExample.java @@ -0,0 +1,670 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewApiCaseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewApiCaseExample() { + 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 andTestCaseReviewIdIsNull() { + addCriterion("test_case_review_id is null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIsNotNull() { + addCriterion("test_case_review_id is not null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdEqualTo(String value) { + addCriterion("test_case_review_id =", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotEqualTo(String value) { + addCriterion("test_case_review_id <>", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThan(String value) { + addCriterion("test_case_review_id >", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("test_case_review_id >=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThan(String value) { + addCriterion("test_case_review_id <", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) { + addCriterion("test_case_review_id <=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLike(String value) { + addCriterion("test_case_review_id like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotLike(String value) { + addCriterion("test_case_review_id not like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIn(List values) { + addCriterion("test_case_review_id in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotIn(List values) { + addCriterion("test_case_review_id not in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdBetween(String value1, String value2) { + addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) { + addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdIsNull() { + addCriterion("api_case_id is null"); + return (Criteria) this; + } + + public Criteria andApiCaseIdIsNotNull() { + addCriterion("api_case_id is not null"); + return (Criteria) this; + } + + public Criteria andApiCaseIdEqualTo(String value) { + addCriterion("api_case_id =", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdNotEqualTo(String value) { + addCriterion("api_case_id <>", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdGreaterThan(String value) { + addCriterion("api_case_id >", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("api_case_id >=", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdLessThan(String value) { + addCriterion("api_case_id <", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdLessThanOrEqualTo(String value) { + addCriterion("api_case_id <=", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdLike(String value) { + addCriterion("api_case_id like", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdNotLike(String value) { + addCriterion("api_case_id not like", value, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdIn(List values) { + addCriterion("api_case_id in", values, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdNotIn(List values) { + addCriterion("api_case_id not in", values, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdBetween(String value1, String value2) { + addCriterion("api_case_id between", value1, value2, "apiCaseId"); + return (Criteria) this; + } + + public Criteria andApiCaseIdNotBetween(String value1, String value2) { + addCriterion("api_case_id not between", value1, value2, "apiCaseId"); + 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 andEnvironmentIdIsNull() { + addCriterion("environment_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNotNull() { + addCriterion("environment_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdEqualTo(String value) { + addCriterion("environment_id =", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotEqualTo(String value) { + addCriterion("environment_id <>", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThan(String value) { + addCriterion("environment_id >", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_id >=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThan(String value) { + addCriterion("environment_id <", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThanOrEqualTo(String value) { + addCriterion("environment_id <=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLike(String value) { + addCriterion("environment_id like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotLike(String value) { + addCriterion("environment_id not like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIn(List values) { + addCriterion("environment_id in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotIn(List values) { + addCriterion("environment_id not in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdBetween(String value1, String value2) { + addCriterion("environment_id between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotBetween(String value1, String value2) { + addCriterion("environment_id not between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria 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 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/TestCaseReviewLoad.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewLoad.java new file mode 100644 index 0000000000..7812df44da --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewLoad.java @@ -0,0 +1,23 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewLoad implements Serializable { + private String id; + + private String testCaseReviewId; + + private String loadCaseId; + + private String status; + + private Long createTime; + + private Long updateTime; + + private String loadReportId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewLoadExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewLoadExample.java new file mode 100644 index 0000000000..714902099f --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewLoadExample.java @@ -0,0 +1,670 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewLoadExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewLoadExample() { + 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 andTestCaseReviewIdIsNull() { + addCriterion("test_case_review_id is null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIsNotNull() { + addCriterion("test_case_review_id is not null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdEqualTo(String value) { + addCriterion("test_case_review_id =", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotEqualTo(String value) { + addCriterion("test_case_review_id <>", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThan(String value) { + addCriterion("test_case_review_id >", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("test_case_review_id >=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThan(String value) { + addCriterion("test_case_review_id <", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) { + addCriterion("test_case_review_id <=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLike(String value) { + addCriterion("test_case_review_id like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotLike(String value) { + addCriterion("test_case_review_id not like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIn(List values) { + addCriterion("test_case_review_id in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotIn(List values) { + addCriterion("test_case_review_id not in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdBetween(String value1, String value2) { + addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) { + addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdIsNull() { + addCriterion("load_case_id is null"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdIsNotNull() { + addCriterion("load_case_id is not null"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdEqualTo(String value) { + addCriterion("load_case_id =", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdNotEqualTo(String value) { + addCriterion("load_case_id <>", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdGreaterThan(String value) { + addCriterion("load_case_id >", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("load_case_id >=", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdLessThan(String value) { + addCriterion("load_case_id <", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdLessThanOrEqualTo(String value) { + addCriterion("load_case_id <=", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdLike(String value) { + addCriterion("load_case_id like", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdNotLike(String value) { + addCriterion("load_case_id not like", value, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdIn(List values) { + addCriterion("load_case_id in", values, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdNotIn(List values) { + addCriterion("load_case_id not in", values, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdBetween(String value1, String value2) { + addCriterion("load_case_id between", value1, value2, "loadCaseId"); + return (Criteria) this; + } + + public Criteria andLoadCaseIdNotBetween(String value1, String value2) { + addCriterion("load_case_id not between", value1, value2, "loadCaseId"); + 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 andLoadReportIdIsNull() { + addCriterion("load_report_id is null"); + return (Criteria) this; + } + + public Criteria andLoadReportIdIsNotNull() { + addCriterion("load_report_id is not null"); + return (Criteria) this; + } + + public Criteria andLoadReportIdEqualTo(String value) { + addCriterion("load_report_id =", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdNotEqualTo(String value) { + addCriterion("load_report_id <>", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdGreaterThan(String value) { + addCriterion("load_report_id >", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdGreaterThanOrEqualTo(String value) { + addCriterion("load_report_id >=", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdLessThan(String value) { + addCriterion("load_report_id <", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdLessThanOrEqualTo(String value) { + addCriterion("load_report_id <=", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdLike(String value) { + addCriterion("load_report_id like", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdNotLike(String value) { + addCriterion("load_report_id not like", value, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdIn(List values) { + addCriterion("load_report_id in", values, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdNotIn(List values) { + addCriterion("load_report_id not in", values, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdBetween(String value1, String value2) { + addCriterion("load_report_id between", value1, value2, "loadReportId"); + return (Criteria) this; + } + + public Criteria andLoadReportIdNotBetween(String value1, String value2) { + addCriterion("load_report_id not between", value1, value2, "loadReportId"); + 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/TestCaseReviewScenario.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java new file mode 100644 index 0000000000..9040b490a7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java @@ -0,0 +1,29 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewScenario implements Serializable { + private String id; + + private String testCaseReviewId; + + private String apiScenarioId; + + private String status; + + private String environment; + + private Long createTime; + + private Long updateTime; + + private String passRate; + + private String lastResult; + + private String reportId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java new file mode 100644 index 0000000000..d83a2b911e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java @@ -0,0 +1,880 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewScenarioExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewScenarioExample() { + 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 andTestCaseReviewIdIsNull() { + addCriterion("test_case_review_id is null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIsNotNull() { + addCriterion("test_case_review_id is not null"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdEqualTo(String value) { + addCriterion("test_case_review_id =", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotEqualTo(String value) { + addCriterion("test_case_review_id <>", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThan(String value) { + addCriterion("test_case_review_id >", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("test_case_review_id >=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThan(String value) { + addCriterion("test_case_review_id <", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) { + addCriterion("test_case_review_id <=", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdLike(String value) { + addCriterion("test_case_review_id like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotLike(String value) { + addCriterion("test_case_review_id not like", value, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdIn(List values) { + addCriterion("test_case_review_id in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotIn(List values) { + addCriterion("test_case_review_id not in", values, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdBetween(String value1, String value2) { + addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) { + addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdIsNull() { + addCriterion("api_scenario_id is null"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdIsNotNull() { + addCriterion("api_scenario_id is not null"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdEqualTo(String value) { + addCriterion("api_scenario_id =", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdNotEqualTo(String value) { + addCriterion("api_scenario_id <>", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdGreaterThan(String value) { + addCriterion("api_scenario_id >", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdGreaterThanOrEqualTo(String value) { + addCriterion("api_scenario_id >=", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdLessThan(String value) { + addCriterion("api_scenario_id <", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdLessThanOrEqualTo(String value) { + addCriterion("api_scenario_id <=", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdLike(String value) { + addCriterion("api_scenario_id like", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdNotLike(String value) { + addCriterion("api_scenario_id not like", value, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdIn(List values) { + addCriterion("api_scenario_id in", values, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdNotIn(List values) { + addCriterion("api_scenario_id not in", values, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdBetween(String value1, String value2) { + addCriterion("api_scenario_id between", value1, value2, "apiScenarioId"); + return (Criteria) this; + } + + public Criteria andApiScenarioIdNotBetween(String value1, String value2) { + addCriterion("api_scenario_id not between", value1, value2, "apiScenarioId"); + 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 andEnvironmentIsNull() { + addCriterion("environment is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIsNotNull() { + addCriterion("environment is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentEqualTo(String value) { + addCriterion("environment =", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentNotEqualTo(String value) { + addCriterion("environment <>", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentGreaterThan(String value) { + addCriterion("environment >", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentGreaterThanOrEqualTo(String value) { + addCriterion("environment >=", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentLessThan(String value) { + addCriterion("environment <", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentLessThanOrEqualTo(String value) { + addCriterion("environment <=", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentLike(String value) { + addCriterion("environment like", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentNotLike(String value) { + addCriterion("environment not like", value, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentIn(List values) { + addCriterion("environment in", values, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentNotIn(List values) { + addCriterion("environment not in", values, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentBetween(String value1, String value2) { + addCriterion("environment between", value1, value2, "environment"); + return (Criteria) this; + } + + public Criteria andEnvironmentNotBetween(String value1, String value2) { + addCriterion("environment not between", value1, value2, "environment"); + 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 andPassRateIsNull() { + addCriterion("pass_rate is null"); + return (Criteria) this; + } + + public Criteria andPassRateIsNotNull() { + addCriterion("pass_rate is not null"); + return (Criteria) this; + } + + public Criteria andPassRateEqualTo(String value) { + addCriterion("pass_rate =", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateNotEqualTo(String value) { + addCriterion("pass_rate <>", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateGreaterThan(String value) { + addCriterion("pass_rate >", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateGreaterThanOrEqualTo(String value) { + addCriterion("pass_rate >=", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateLessThan(String value) { + addCriterion("pass_rate <", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateLessThanOrEqualTo(String value) { + addCriterion("pass_rate <=", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateLike(String value) { + addCriterion("pass_rate like", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateNotLike(String value) { + addCriterion("pass_rate not like", value, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateIn(List values) { + addCriterion("pass_rate in", values, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateNotIn(List values) { + addCriterion("pass_rate not in", values, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateBetween(String value1, String value2) { + addCriterion("pass_rate between", value1, value2, "passRate"); + return (Criteria) this; + } + + public Criteria andPassRateNotBetween(String value1, String value2) { + addCriterion("pass_rate not between", value1, value2, "passRate"); + return (Criteria) this; + } + + public Criteria andLastResultIsNull() { + addCriterion("last_result is null"); + return (Criteria) this; + } + + public Criteria andLastResultIsNotNull() { + addCriterion("last_result is not null"); + return (Criteria) this; + } + + public Criteria andLastResultEqualTo(String value) { + addCriterion("last_result =", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultNotEqualTo(String value) { + addCriterion("last_result <>", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultGreaterThan(String value) { + addCriterion("last_result >", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultGreaterThanOrEqualTo(String value) { + addCriterion("last_result >=", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultLessThan(String value) { + addCriterion("last_result <", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultLessThanOrEqualTo(String value) { + addCriterion("last_result <=", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultLike(String value) { + addCriterion("last_result like", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultNotLike(String value) { + addCriterion("last_result not like", value, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultIn(List values) { + addCriterion("last_result in", values, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultNotIn(List values) { + addCriterion("last_result not in", values, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultBetween(String value1, String value2) { + addCriterion("last_result between", value1, value2, "lastResult"); + return (Criteria) this; + } + + public Criteria andLastResultNotBetween(String value1, String value2) { + addCriterion("last_result not between", value1, value2, "lastResult"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + 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/mapper/TestCaseReviewApiCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewApiCaseMapper.java new file mode 100644 index 0000000000..ff3bfd9ebc --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewApiCaseMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewApiCase; +import io.metersphere.base.domain.TestCaseReviewApiCaseExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewApiCaseMapper { + long countByExample(TestCaseReviewApiCaseExample example); + + int deleteByExample(TestCaseReviewApiCaseExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseReviewApiCase record); + + int insertSelective(TestCaseReviewApiCase record); + + List selectByExample(TestCaseReviewApiCaseExample example); + + TestCaseReviewApiCase selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseReviewApiCase record, @Param("example") TestCaseReviewApiCaseExample example); + + int updateByExample(@Param("record") TestCaseReviewApiCase record, @Param("example") TestCaseReviewApiCaseExample example); + + int updateByPrimaryKeySelective(TestCaseReviewApiCase record); + + int updateByPrimaryKey(TestCaseReviewApiCase record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewApiCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewApiCaseMapper.xml new file mode 100644 index 0000000000..5fc3b30ee2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewApiCaseMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, test_case_review_id, api_case_id, `status`, environment_id, create_time, update_time + + + + + delete from test_case_review_api_case + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_review_api_case + + + + + + insert into test_case_review_api_case (id, test_case_review_id, api_case_id, + `status`, environment_id, create_time, + update_time) + values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiCaseId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}) + + + insert into test_case_review_api_case + + + id, + + + test_case_review_id, + + + api_case_id, + + + `status`, + + + environment_id, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testCaseReviewId,jdbcType=VARCHAR}, + + + #{apiCaseId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{environmentId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update test_case_review_api_case + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + + + api_case_id = #{record.apiCaseId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update test_case_review_api_case + set id = #{record.id,jdbcType=VARCHAR}, + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + api_case_id = #{record.apiCaseId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_case_review_api_case + + + test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + + + api_case_id = #{apiCaseId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + environment_id = #{environmentId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review_api_case + set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + api_case_id = #{apiCaseId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.java new file mode 100644 index 0000000000..379df4d99a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewLoad; +import io.metersphere.base.domain.TestCaseReviewLoadExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewLoadMapper { + long countByExample(TestCaseReviewLoadExample example); + + int deleteByExample(TestCaseReviewLoadExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseReviewLoad record); + + int insertSelective(TestCaseReviewLoad record); + + List selectByExample(TestCaseReviewLoadExample example); + + TestCaseReviewLoad selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseReviewLoad record, @Param("example") TestCaseReviewLoadExample example); + + int updateByExample(@Param("record") TestCaseReviewLoad record, @Param("example") TestCaseReviewLoadExample example); + + int updateByPrimaryKeySelective(TestCaseReviewLoad record); + + int updateByPrimaryKey(TestCaseReviewLoad record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.xml new file mode 100644 index 0000000000..791e6dc0b8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewLoadMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, test_case_review_id, load_case_id, `status`, create_time, update_time, load_report_id + + + + + delete from test_case_review_load + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_review_load + + + + + + insert into test_case_review_load (id, test_case_review_id, load_case_id, + `status`, create_time, update_time, + load_report_id) + values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{loadCaseId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{loadReportId,jdbcType=VARCHAR}) + + + insert into test_case_review_load + + + id, + + + test_case_review_id, + + + load_case_id, + + + `status`, + + + create_time, + + + update_time, + + + load_report_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testCaseReviewId,jdbcType=VARCHAR}, + + + #{loadCaseId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{loadReportId,jdbcType=VARCHAR}, + + + + + + update test_case_review_load + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + + + load_case_id = #{record.loadCaseId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + load_report_id = #{record.loadReportId,jdbcType=VARCHAR}, + + + + + + + + update test_case_review_load + set id = #{record.id,jdbcType=VARCHAR}, + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + load_case_id = #{record.loadCaseId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + load_report_id = #{record.loadReportId,jdbcType=VARCHAR} + + + + + + update test_case_review_load + + + test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + + + load_case_id = #{loadCaseId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + load_report_id = #{loadReportId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review_load + set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + load_case_id = #{loadCaseId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + load_report_id = #{loadReportId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java new file mode 100644 index 0000000000..3e458cef66 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewScenario; +import io.metersphere.base.domain.TestCaseReviewScenarioExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewScenarioMapper { + long countByExample(TestCaseReviewScenarioExample example); + + int deleteByExample(TestCaseReviewScenarioExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseReviewScenario record); + + int insertSelective(TestCaseReviewScenario record); + + List selectByExample(TestCaseReviewScenarioExample example); + + TestCaseReviewScenario selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example); + + int updateByExample(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example); + + int updateByPrimaryKeySelective(TestCaseReviewScenario record); + + int updateByPrimaryKey(TestCaseReviewScenario record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml new file mode 100644 index 0000000000..07929624e8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.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, test_case_review_id, api_scenario_id, `status`, environment, create_time, update_time, + pass_rate, last_result, report_id + + + + + delete from test_case_review_scenario + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_review_scenario + + + + + + insert into test_case_review_scenario (id, test_case_review_id, api_scenario_id, + `status`, environment, create_time, + update_time, pass_rate, last_result, + report_id) + values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{environment,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, + #{reportId,jdbcType=VARCHAR}) + + + insert into test_case_review_scenario + + + id, + + + test_case_review_id, + + + api_scenario_id, + + + `status`, + + + environment, + + + create_time, + + + update_time, + + + pass_rate, + + + last_result, + + + report_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testCaseReviewId,jdbcType=VARCHAR}, + + + #{apiScenarioId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{environment,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{passRate,jdbcType=VARCHAR}, + + + #{lastResult,jdbcType=VARCHAR}, + + + #{reportId,jdbcType=VARCHAR}, + + + + + + update test_case_review_scenario + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + + + api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + environment = #{record.environment,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + pass_rate = #{record.passRate,jdbcType=VARCHAR}, + + + last_result = #{record.lastResult,jdbcType=VARCHAR}, + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + + + + + + update test_case_review_scenario + set id = #{record.id,jdbcType=VARCHAR}, + test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR}, + api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + environment = #{record.environment,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + pass_rate = #{record.passRate,jdbcType=VARCHAR}, + last_result = #{record.lastResult,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR} + + + + + + update test_case_review_scenario + + + test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + + + api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + environment = #{environment,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + pass_rate = #{passRate,jdbcType=VARCHAR}, + + + last_result = #{lastResult,jdbcType=VARCHAR}, + + + report_id = #{reportId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review_scenario + set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR}, + api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + environment = #{environment,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + pass_rate = #{passRate,jdbcType=VARCHAR}, + last_result = #{lastResult,jdbcType=VARCHAR}, + report_id = #{reportId,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/ExtApiDefinitionMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java index d50d4fe3b0..44cf4c6abe 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.java @@ -36,6 +36,6 @@ public interface ExtApiDefinitionMapper { ApiDefinition getNextNum(@Param("projectId") String projectId); List listRelevance(@Param("request")ApiDefinitionRequest request); - + List listRelevanceReview(@Param("request")ApiDefinitionRequest request); List selectIds(@Param("request") BaseQueryRequest query); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml index 179c83c956..bfaa0afcd0 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -363,6 +363,86 @@ + + + + + + + + + + + + + + + + and (api_scenario.name like CONCAT('%', #{request.name},'%') + or api_scenario.tags like CONCAT('%', #{request.name},'%') + or api_scenario.num like CONCAT('%', #{request.name},'%')) + + + AND project.workspace_id = #{request.workspaceId} + + + AND project.id = #{request.projectId} + + + AND api_scenario.id = #{request.id} + + + AND api_scenario.user_id = #{request.userId} + + + AND api_scenario.api_scenario_module_id = #{request.moduleId} + + + AND api_scenario.project_id = #{request.projectId} + + + AND api_scenario.create_time >= #{request.createTime} + + + AND api_scenario.id in + + #{itemId} + + + + AND api_scenario.api_scenario_module_id in + + #{nodeId} + + + + + + + + and api_scenario.status in + + #{value} + + + + and api_scenario.user_id in + + #{value} + + + + and api_scenario.level in + + #{value} + + + + and api_scenario.last_result in + + #{value} + + + + + + + + and api_scenario.last_result IS NULL + + + and api_scenario.last_result = 'Fail' + + + and api_scenario.last_result = 'Success' + + + and api_scenario.id not in ( + select pc.api_scenario_id + from test_case_review_scenario pc + where pc.test_case_review_id = #{request.reviewId} + ) + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java index 88f1298c65..0457a6a710 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.java @@ -20,6 +20,8 @@ public interface ExtApiTestCaseMapper { List listSimple(@Param("request") ApiTestCaseRequest request); List selectIdsNotExistsInPlan(@Param("projectId") String projectId, @Param("planId") String planId); + List selectIdsNotExistsInReview(@Param("projectId") String projectId, @Param("reviewId") String reviewId); + List countProtocolByProjectID(String projectId); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index c082e8a2c3..1c560eb664 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -337,6 +337,15 @@ where pc.test_plan_id = #{planId} ) + + select + t.id, t.environment_id, t.create_time, t.update_time, + c.id as case_id, c.project_id, c.name, c.api_definition_id, c.priority, c.description, c.create_user_id, c.update_user_id, c.num, c.tags, + a.module_id, a.path, a.protocol, t.status execResult + from + test_case_review_api_case t + inner join + api_test_case c + on t.api_case_id = c.id + + and t.test_case_review_id = #{request.reviewId} + + inner join + api_definition a + on + c.api_definition_id = a.id + + and a.protocol = #{request.protocol} + + + + and a.status = 'Trash' + + + and a.status != 'Trash' + + + and a.status != 'Trash' + + + and t.status IS NULL + + + and t.status = #{request.status} + + + where 1 + + + and + + t.id in + + #{caseId} + + + + and (c.name like CONCAT('%', #{request.name},'%') or c.tags like CONCAT('%', #{request.name},'%')) + + + and a.module_id in + + #{nodeId} + + + + + + + + and c.priority in + + #{value} + + + + and c.create_user_id in + + #{value} + + + + + + + + order by + + + + t.${order.name} ${order.type} + + + create_user_id ${order.type} + + + ${order.name} ${order.type} + + + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.java new file mode 100644 index 0000000000..b83cc374dd --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.java @@ -0,0 +1,15 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.dto.TestReviewLoadCaseDTO; +import io.metersphere.track.request.testplan.LoadCaseRequest; +import io.metersphere.track.request.testreview.TestReviewRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtTestCaseReviewLoadMapper { + List selectIdsNotInPlan(@Param("projectId") String projectId, @Param("reviewId") String reviewId); + List selectTestReviewLoadCaseList(@Param("request") TestReviewRequest request); + void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status); + List getStatusByreviewId(@Param("reviewId") String reviewId); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.xml new file mode 100644 index 0000000000..f3003670ff --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewLoadMapper.xml @@ -0,0 +1,71 @@ + + + + + update test_case_review_load tplc + set status = #{status} + where tplc.load_report_id = #{reportId} + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.java new file mode 100644 index 0000000000..8392e5b996 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.java @@ -0,0 +1,21 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.automation.TestPlanScenarioRequest; +import io.metersphere.base.domain.TestCaseReviewScenario; +import io.metersphere.base.domain.TestPlanApiScenario; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtTestCaseReviewScenarioCaseMapper { + void insertIfNotExists(@Param("request") TestCaseReviewScenario request); + + List list(@Param("request") TestPlanScenarioRequest request); + + List getExecResultByReviewId(String reviewId); + + List getIdsByReviewId(String reviewId); + + List getNotRelevanceCaseIds(String planId, List relevanceProjectIds); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.xml new file mode 100644 index 0000000000..a806737b74 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewScenarioCaseMapper.xml @@ -0,0 +1,114 @@ + + + + + -- 查询没有数据再插入 + INSERT INTO test_case_review_scenario(id, test_case_review_id, api_scenario_id, create_time, update_time, environment) + SELECT #{request.id}, #{request.reviewId}, #{request.apiScenarioId}, #{request.createTime}, #{request.updateTime}, #{request.environment} + FROM DUAL + WHERE NOT EXISTS( + SELECT id FROM + test_case_review_scenario + WHERE test_case_review_id = #{request.reviewId} and api_scenario_id = #{request.apiScenarioId} + ) + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index 77a8904d1e..d196782bf1 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -45,4 +45,6 @@ public interface ExtTestPlanTestCaseMapper { void deleteByTestCaseID(String id); List getExecResultByPlanId(String planId); + + List listForMinder(@Param("planId") String planId); } 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 1e132017fd..80c68f3fbc 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 @@ -405,6 +405,23 @@ + + update test_plan_test_case @@ -423,4 +440,4 @@ from test_plan_api_case where api_case_id = #{id,jdbcType=VARCHAR} - \ No newline at end of file + diff --git a/backend/src/main/java/io/metersphere/dto/TestReviewLoadCaseDTO.java b/backend/src/main/java/io/metersphere/dto/TestReviewLoadCaseDTO.java new file mode 100644 index 0000000000..2da27cbc3e --- /dev/null +++ b/backend/src/main/java/io/metersphere/dto/TestReviewLoadCaseDTO.java @@ -0,0 +1,15 @@ +package io.metersphere.dto; + +import io.metersphere.base.domain.TestCaseReviewLoad; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class TestReviewLoadCaseDTO extends TestCaseReviewLoad { + private String userName; + private String caseName; + private String projectName; + private String caseStatus; + private String num; +} diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseIssuesController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseIssuesController.java index d0b690e94b..72c409936e 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestCaseIssuesController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseIssuesController.java @@ -37,9 +37,9 @@ public class TestCaseIssuesController { issuesService.closeLocalIssue(id); } - @GetMapping("/delete/{id}") - public void deleteIssue(@PathVariable String id) { - issuesService.deleteIssue(id); + @PostMapping("/delete") + public void deleteIssue(@RequestBody IssuesRequest request) { + issuesService.deleteIssue(request); } @GetMapping("/tapd/user/{caseId}") diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java new file mode 100644 index 0000000000..0d8bf9b36a --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java @@ -0,0 +1,56 @@ +package io.metersphere.track.controller; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.api.dto.definition.ApiTestCaseDTO; +import io.metersphere.api.dto.definition.ApiTestCaseRequest; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import io.metersphere.commons.constants.RoleConstants; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest; +import io.metersphere.track.request.testreview.TestReviewApiCaseBatchRequest; +import io.metersphere.track.service.TestCaseReviewApiCaseService; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +@RestController +@RequestMapping("/test/case/review/api/case") +public class TestCaseReviewApiCaseController { + @Resource + private TestCaseReviewApiCaseService testCaseReviewApiCaseService; + @PostMapping("/list/{goPage}/{pageSize}") + public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, testCaseReviewApiCaseService.list(request)); + } + @PostMapping("/relevance/list/{goPage}/{pageSize}") + public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return PageUtils.setPageInfo(page, testCaseReviewApiCaseService.relevanceList(request)); + } + + @GetMapping("/delete/{id}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public int deleteTestCase(@PathVariable String id) { + return testCaseReviewApiCaseService.delete(id); + } + + @PostMapping("/batch/delete") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void deleteApiCaseBath(@RequestBody TestReviewApiCaseBatchRequest request) { + testCaseReviewApiCaseService.deleteApiCaseBath(request); + } + + @PostMapping("/batch/update/env") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void batchUpdateEnv(@RequestBody TestPlanApiCaseBatchRequest request) { + testCaseReviewApiCaseService.batchUpdateEnv(request); + } +} diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java new file mode 100644 index 0000000000..3b69153905 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java @@ -0,0 +1,63 @@ +package io.metersphere.track.controller; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.api.dto.automation.*; +import io.metersphere.commons.constants.RoleConstants; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.track.dto.RelevanceScenarioRequest; +import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest; +import io.metersphere.track.service.TestCaseReviewScenarioCaseService; +import io.metersphere.track.service.TestPlanScenarioCaseService; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +@RestController +@RequestMapping("/test/case/review/scenario/case") +public class TestCaseReviewScenarioCaseController { + @Resource + TestCaseReviewScenarioCaseService testCaseReviewScenarioCaseService; + + @PostMapping("/list/{goPage}/{pageSize}") + public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestPlanScenarioRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, testCaseReviewScenarioCaseService.list(request)); + } + + @PostMapping("/relevance/list/{goPage}/{pageSize}") + public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiScenarioRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return PageUtils.setPageInfo(page, testCaseReviewScenarioCaseService.relevanceList(request)); + } + + @GetMapping("/delete/{id}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public int deleteTestCase(@PathVariable String id) { + return testCaseReviewScenarioCaseService.delete(id); + } + + @PostMapping("/batch/delete") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void deleteApiCaseBath(@RequestBody TestPlanApiCaseBatchRequest request) { + testCaseReviewScenarioCaseService.deleteApiCaseBath(request); + } + + @PostMapping(value = "/run") + public String run(@RequestBody RunScenarioRequest request) { + request.setExecuteType(ExecuteType.Completed.name()); + return testCaseReviewScenarioCaseService.run(request); + } + + @PostMapping("/batch/update/env") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void batchUpdateEnv(@RequestBody RelevanceScenarioRequest request) { + testCaseReviewScenarioCaseService.batchUpdateEnv(request); + } +} diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanTestCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanTestCaseController.java index 0d2d38cbad..f3362abbd0 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanTestCaseController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanTestCaseController.java @@ -39,6 +39,13 @@ public class TestPlanTestCaseController { return testPlanTestCaseService.listByPlanId(request); } + @GetMapping("/list/minder/{planId}") + public List listForMinder(@PathVariable String planId) { + QueryTestPlanCaseRequest request = new QueryTestPlanCaseRequest(); + request.setPlanId(planId); + return testPlanTestCaseService.listForMinder(planId); + } + @GetMapping("/list/node/{planId}/{nodePaths}") public List getTestPlanCasesByNodePath(@PathVariable String planId, @PathVariable String nodePaths) { String nodePath = nodePaths.replace("f", "/"); diff --git a/backend/src/main/java/io/metersphere/track/controller/TestReviewLoadCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestReviewLoadCaseController.java new file mode 100644 index 0000000000..1a0cf089ce --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/controller/TestReviewLoadCaseController.java @@ -0,0 +1,65 @@ +package io.metersphere.track.controller; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.base.domain.LoadTest; +import io.metersphere.base.domain.TestCaseReviewLoad; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.dto.TestReviewLoadCaseDTO; +import io.metersphere.performance.request.RunTestPlanRequest; +import io.metersphere.track.request.testplan.LoadCaseReportRequest; +import io.metersphere.track.request.testplan.LoadCaseRequest; +import io.metersphere.track.request.testreview.TestReviewRequest; +import io.metersphere.track.service.TestCaseReviewLoadService; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; + +@RestController +@RequestMapping("/test/review/load/case") +public class TestReviewLoadCaseController { + @Resource + private TestCaseReviewLoadService testCaseReviewLoadService; + + @PostMapping("/relevance/list/{goPage}/{pageSize}") + public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestReviewRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, testCaseReviewLoadService.relevanceList(request)); + } + + @PostMapping("/relevance") + public void relevanceCase(@RequestBody TestReviewRequest request) { + testCaseReviewLoadService.relevanceCase(request); + } + + @PostMapping("/list/{goPage}/{pageSize}") + public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestReviewRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, testCaseReviewLoadService.list(request)); + } + + @GetMapping("/delete/{id}") + public void delete(@PathVariable String id) { + testCaseReviewLoadService.delete(id); + } + + @PostMapping("/run") + public String run(@RequestBody RunTestPlanRequest request) { + return testCaseReviewLoadService.run(request); + } + + @PostMapping("/report/exist") + public Boolean isExistReport(@RequestBody LoadCaseReportRequest request) { + return testCaseReviewLoadService.isExistReport(request); + } + + @PostMapping("/batch/delete") + public void batchDelete(@RequestBody List ids) { + testCaseReviewLoadService.batchDelete(ids); + } + + @PostMapping("/update") + public void update(@RequestBody TestCaseReviewLoad testCaseReviewLoad) { + testCaseReviewLoadService.update(testCaseReviewLoad); + } +} diff --git a/backend/src/main/java/io/metersphere/track/request/testcase/ApiCaseRelevanceRequest.java b/backend/src/main/java/io/metersphere/track/request/testcase/ApiCaseRelevanceRequest.java index e73396a2c3..3c64b0b91f 100644 --- a/backend/src/main/java/io/metersphere/track/request/testcase/ApiCaseRelevanceRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testcase/ApiCaseRelevanceRequest.java @@ -36,4 +36,8 @@ public class ApiCaseRelevanceRequest { * 用例的环境的对应关系 */ private Map> mapping; + /** + *测试评审ID + */ + private String reviewId; } diff --git a/backend/src/main/java/io/metersphere/track/request/testcase/IssuesRequest.java b/backend/src/main/java/io/metersphere/track/request/testcase/IssuesRequest.java index a1ea0ad74a..127e18a0d5 100644 --- a/backend/src/main/java/io/metersphere/track/request/testcase/IssuesRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testcase/IssuesRequest.java @@ -21,4 +21,10 @@ public class IssuesRequest { * zentao bug 影响版本 */ private List zentaoBuilds; + + /** + * issues id + */ + private String id; + private String caseId; } diff --git a/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java b/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java index 3a8b604d7d..dfda1d6e90 100644 --- a/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java @@ -17,4 +17,5 @@ public class LoadCaseRequest extends TestPlanLoadCase { private String status; private Map> filters; private List orders; + } diff --git a/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewApiCaseBatchRequest.java b/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewApiCaseBatchRequest.java new file mode 100644 index 0000000000..2cf4b7729c --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewApiCaseBatchRequest.java @@ -0,0 +1,23 @@ +package io.metersphere.track.request.testreview; + +import io.metersphere.base.domain.TestCaseReviewApiCase; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; +import java.util.Map; +@Getter +@Setter +public class TestReviewApiCaseBatchRequest extends TestCaseReviewApiCase { + private List ids; + + /** + * 批量修改选中的数据 + */ + private Map selectRows; + + /** + * 项目ID,环境ID对应关系 + */ + private Map projectEnvMap; +} diff --git a/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewRequest.java b/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewRequest.java new file mode 100644 index 0000000000..59bd2da1fc --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/request/testreview/TestReviewRequest.java @@ -0,0 +1,20 @@ +package io.metersphere.track.request.testreview; + +import io.metersphere.base.domain.TestCaseReviewLoad; +import io.metersphere.controller.request.OrderRequest; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; +import java.util.Map; +@Getter +@Setter +public class TestReviewRequest extends TestCaseReviewLoad { + private String projectId; + private List caseIds; + private String name; + private String status; + private Map> filters; + private List orders; + +} diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index fca1712896..ee737fcf8c 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -1,10 +1,8 @@ package io.metersphere.track.service; -import io.metersphere.base.domain.Issues; -import io.metersphere.base.domain.Project; -import io.metersphere.base.domain.ServiceIntegration; -import io.metersphere.base.domain.TestCaseWithBLOBs; +import io.metersphere.base.domain.*; import io.metersphere.base.mapper.IssuesMapper; +import io.metersphere.base.mapper.TestCaseIssuesMapper; import io.metersphere.commons.constants.IssuesManagePlatform; import io.metersphere.commons.constants.NoticeConstants; import io.metersphere.commons.user.SessionUser; @@ -43,6 +41,8 @@ public class IssuesService { private IssuesMapper issuesMapper; @Resource private NoticeSendService noticeSendService; + @Resource + private TestCaseIssuesMapper testCaseIssuesMapper; public void testAuth(String platform) { AbstractIssuePlatform abstractPlatform = IssueFactory.createPlatform(platform, new IssuesRequest()); @@ -202,8 +202,14 @@ public class IssuesService { return platform.getPlatformUser(); } - public void deleteIssue(String id) { + public void deleteIssue(IssuesRequest request) { + String caseId = request.getCaseId(); + String id = request.getId(); issuesMapper.deleteByPrimaryKey(id); + + TestCaseIssuesExample example = new TestCaseIssuesExample(); + example.createCriteria().andTestCaseIdEqualTo(caseId).andIssuesIdEqualTo(id); + testCaseIssuesMapper.deleteByExample(example); } private static String getIssuesContext(SessionUser user, IssuesRequest issuesRequest, String type) { diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index ee74a265d0..2e6658799e 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -189,7 +189,9 @@ public class TestCaseNodeService extends NodeTreeService { testCaseNodeDTO.setName(name); testCaseNodeDTO.setLabel(name); testCaseNodeDTO.setChildren(nodeList); - list.add(testCaseNodeDTO); + if (!CollectionUtils.isEmpty(nodeList)) { + list.add(testCaseNodeDTO); + } } }); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewApiCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewApiCaseService.java new file mode 100644 index 0000000000..69cccdc7c0 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewApiCaseService.java @@ -0,0 +1,104 @@ +package io.metersphere.track.service; + +import io.metersphere.api.dto.definition.ApiTestCaseDTO; +import io.metersphere.api.dto.definition.ApiTestCaseRequest; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import io.metersphere.api.service.ApiDefinitionExecResultService; +import io.metersphere.api.service.ApiTestCaseService; +import io.metersphere.base.domain.TestCaseReviewApiCase; +import io.metersphere.base.domain.TestCaseReviewApiCaseExample; +import io.metersphere.base.domain.TestPlanApiCase; +import io.metersphere.base.domain.TestPlanApiCaseExample; +import io.metersphere.base.mapper.TestCaseReviewApiCaseMapper; +import io.metersphere.base.mapper.ext.ExtTestCaseReviewApiCaseMapper; +import io.metersphere.commons.utils.ServiceUtils; +import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest; +import io.metersphere.track.request.testreview.TestReviewApiCaseBatchRequest; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +@Service +@Transactional(rollbackFor = Exception.class) +public class TestCaseReviewApiCaseService { + @Resource + private ExtTestCaseReviewApiCaseMapper extTestCaseReviewApiCaseMapper; + @Resource + ApiTestCaseService apiTestCaseService; + @Resource + TestCaseReviewApiCaseMapper testCaseReviewApiCaseMapper; + @Lazy + @Resource + ApiDefinitionExecResultService apiDefinitionExecResultService; + public List list(ApiTestCaseRequest request) { + request.setProjectId(null); + request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); + List apiTestCases = extTestCaseReviewApiCaseMapper.list(request); + if (CollectionUtils.isEmpty(apiTestCases)) { + return apiTestCases; + } + apiTestCaseService.buildUserInfo(apiTestCases); + return apiTestCases; + } + public List getExecResultByReviewId(String reviewId) { + return extTestCaseReviewApiCaseMapper.getExecResultByReviewId(reviewId); + } + public List relevanceList(ApiTestCaseRequest request) { + List ids = apiTestCaseService.selectIdsNotExistsInReview(request.getProjectId(), request.getReviewId()); + if (CollectionUtils.isEmpty(ids)) { + return new ArrayList<>(); + } + request.setIds(ids); + return apiTestCaseService.listSimple(request); + } + public int delete(String id) { + apiDefinitionExecResultService.deleteByResourceId(id); + TestCaseReviewApiCaseExample example=new TestCaseReviewApiCaseExample(); + example.createCriteria() + .andIdEqualTo(id); + + return testCaseReviewApiCaseMapper.deleteByExample(example); + } + public void deleteApiCaseBath(TestReviewApiCaseBatchRequest request) { + if (CollectionUtils.isEmpty(request.getIds())) { + return; + } + apiDefinitionExecResultService.deleteByResourceIds(request.getIds()); + TestCaseReviewApiCaseExample example=new TestCaseReviewApiCaseExample(); + example.createCriteria() + .andIdIn(request.getIds()) + .andTestCaseReviewIdEqualTo(request.getTestCaseReviewId()); + testCaseReviewApiCaseMapper.deleteByExample(example); + } + public void batchUpdateEnv(TestPlanApiCaseBatchRequest request) { + // 批量修改用例环境 + Map rows = request.getSelectRows(); + Set ids = rows.keySet(); + Map env = request.getProjectEnvMap(); + if (env != null && !env.isEmpty()) { + ids.forEach(id -> { + TestCaseReviewApiCase apiCase = new TestCaseReviewApiCase(); + apiCase.setId(id); + apiCase.setEnvironmentId(env.get(rows.get(id))); + testCaseReviewApiCaseMapper.updateByPrimaryKeySelective(apiCase); + }); + } + } + public void setExecResult(String id, String status) { + TestCaseReviewApiCase apiCase = new TestCaseReviewApiCase(); + apiCase.setId(id); + apiCase.setStatus(status); + apiCase.setUpdateTime(System.currentTimeMillis()); + testCaseReviewApiCaseMapper.updateByPrimaryKeySelective(apiCase); + } + public void updateByPrimaryKeySelective(TestCaseReviewApiCase apiCase) { + testCaseReviewApiCaseMapper.updateByPrimaryKeySelective(apiCase); + } +} diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewLoadService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewLoadService.java new file mode 100644 index 0000000000..ff6e712bd9 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewLoadService.java @@ -0,0 +1,155 @@ +package io.metersphere.track.service; + +import io.metersphere.base.domain.*; +import io.metersphere.base.mapper.*; +import io.metersphere.base.mapper.ext.ExtTestCaseReviewLoadMapper; +import io.metersphere.base.mapper.ext.ExtTestPlanLoadCaseMapper; +import io.metersphere.commons.constants.TestPlanStatus; +import io.metersphere.controller.request.OrderRequest; +import io.metersphere.dto.TestReviewLoadCaseDTO; +import io.metersphere.performance.request.RunTestPlanRequest; +import io.metersphere.performance.service.PerformanceTestService; +import io.metersphere.track.dto.TestPlanLoadCaseDTO; +import io.metersphere.track.request.testplan.LoadCaseReportRequest; +import io.metersphere.track.request.testplan.LoadCaseRequest; +import io.metersphere.track.request.testreview.TestReviewRequest; +import org.apache.ibatis.session.ExecutorType; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; + +@Service +@Transactional(rollbackFor = Exception.class) +public class TestCaseReviewLoadService { + @Resource + TestCaseReviewMapper testCaseReviewMapper; + @Resource + private TestCaseReviewLoadMapper testCaseReviewLoadMapper; + @Resource + private ExtTestCaseReviewLoadMapper extTestCaseReviewLoadMapper; + @Resource + private PerformanceTestService performanceTestService; + @Resource + private SqlSessionFactory sqlSessionFactory; + @Resource + private LoadTestReportMapper loadTestReportMapper; + @Resource + private LoadTestMapper loadTestMapper; + + public List relevanceList(TestReviewRequest request) { + List ids = extTestCaseReviewLoadMapper.selectIdsNotInPlan(request.getProjectId(), request.getTestCaseReviewId()); + if (CollectionUtils.isEmpty(ids)) { + return new ArrayList<>(); + } + return performanceTestService.getLoadTestListByIds(ids); + } + + public List list(TestReviewRequest request) { + List orders = request.getOrders(); + if (orders == null || orders.size() < 1) { + OrderRequest orderRequest = new OrderRequest(); + orderRequest.setName("create_time"); + orderRequest.setType("desc"); + orders = new ArrayList<>(); + orders.add(orderRequest); + } + request.setOrders(orders); + return extTestCaseReviewLoadMapper.selectTestReviewLoadCaseList(request); + } + + public void relevanceCase(TestReviewRequest request) { + List caseIds = request.getCaseIds(); + String reviewId = request.getTestCaseReviewId(); + SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); + + TestCaseReviewLoadMapper testCaseReviewLoadMapper = sqlSession.getMapper(TestCaseReviewLoadMapper.class); + caseIds.forEach(id -> { + TestCaseReviewLoad t = new TestCaseReviewLoad(); + t.setId(UUID.randomUUID().toString()); + t.setTestCaseReviewId(reviewId); + t.setLoadCaseId(id); + t.setCreateTime(System.currentTimeMillis()); + t.setUpdateTime(System.currentTimeMillis()); + testCaseReviewLoadMapper.insert(t); + }); + TestCaseReview testCaseReview = testCaseReviewMapper.selectByPrimaryKey(request.getTestCaseReviewId()); + if (org.apache.commons.lang3.StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Prepare.name()) + || org.apache.commons.lang3.StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Completed.name())) { + testCaseReview.setStatus(TestPlanStatus.Underway.name()); + testCaseReviewMapper.updateByPrimaryKey(testCaseReview); + } + sqlSession.flushStatements(); + } + + public void delete(String id) { + TestCaseReviewLoadExample example = new TestCaseReviewLoadExample(); + example.createCriteria().andIdEqualTo(id); + testCaseReviewLoadMapper.deleteByExample(example); + } + + public String run(RunTestPlanRequest request) { + String reportId = performanceTestService.run(request); + TestCaseReviewLoad testCaseReviewLoad = new TestCaseReviewLoad(); + testCaseReviewLoad.setId(request.getTestPlanLoadId()); + testCaseReviewLoad.setLoadReportId(reportId); + testCaseReviewLoadMapper.updateByPrimaryKeySelective(testCaseReviewLoad); + return reportId; + } +//??? + public Boolean isExistReport(LoadCaseReportRequest request) { + String reportId = request.getReportId(); + String testPlanLoadCaseId = request.getTestPlanLoadCaseId(); + LoadTestReportExample example = new LoadTestReportExample(); + example.createCriteria().andIdEqualTo(reportId); + List loadTestReports = loadTestReportMapper.selectByExample(example); + if (CollectionUtils.isEmpty(loadTestReports)) { + TestCaseReviewLoad testCaseReviewLoad = new TestCaseReviewLoad(); + testCaseReviewLoad.setId(testPlanLoadCaseId); + testCaseReviewLoad.setLoadReportId(""); + testCaseReviewLoadMapper.updateByPrimaryKeySelective(testCaseReviewLoad); + return false; + } + return true; + } + + public void deleteByRelevanceProjectIds(String id, List relevanceProjectIds) { + LoadTestExample loadTestExample = new LoadTestExample(); + loadTestExample.createCriteria().andProjectIdIn(relevanceProjectIds); + List loadTests = loadTestMapper.selectByExample(loadTestExample); + TestCaseReviewLoadExample example = new TestCaseReviewLoadExample(); + TestCaseReviewLoadExample.Criteria criteria = example.createCriteria().andTestCaseReviewIdEqualTo(id); + if (!CollectionUtils.isEmpty(loadTests)) { + List ids = loadTests.stream().map(LoadTest::getId).collect(Collectors.toList()); + criteria.andLoadCaseIdNotIn(ids); + } + testCaseReviewLoadMapper.deleteByExample(example); + } + + public void batchDelete(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return; + } + TestCaseReviewLoadExample example = new TestCaseReviewLoadExample(); + example.createCriteria().andIdIn(ids); + testCaseReviewLoadMapper.deleteByExample(example); + } + + public void update(TestCaseReviewLoad testCaseReviewLoad) { + if (!StringUtils.isEmpty(testCaseReviewLoad.getId())) { + testCaseReviewLoadMapper.updateByPrimaryKeySelective(testCaseReviewLoad); + } + } + + public List getStatus(String reviewId) { + return extTestCaseReviewLoadMapper.getStatusByreviewId(reviewId); + } +} diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewScenarioCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewScenarioCaseService.java new file mode 100644 index 0000000000..76228fef48 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewScenarioCaseService.java @@ -0,0 +1,194 @@ +package io.metersphere.track.service; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONPath; +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.automation.ApiScenarioRequest; +import io.metersphere.api.dto.automation.RunScenarioRequest; +import io.metersphere.api.dto.automation.TestPlanScenarioRequest; +import io.metersphere.api.dto.definition.RunDefinitionRequest; +import io.metersphere.api.service.ApiAutomationService; +import io.metersphere.api.service.ApiScenarioReportService; +import io.metersphere.base.domain.TestCaseReviewScenario; +import io.metersphere.base.domain.TestCaseReviewScenarioExample; +import io.metersphere.base.domain.TestPlanApiScenario; +import io.metersphere.base.domain.TestPlanApiScenarioExample; +import io.metersphere.base.mapper.TestCaseReviewScenarioMapper; +import io.metersphere.base.mapper.TestPlanApiScenarioMapper; +import io.metersphere.base.mapper.ext.ExtTestCaseReviewScenarioCaseMapper; +import io.metersphere.base.mapper.ext.ExtTestPlanScenarioCaseMapper; +import io.metersphere.commons.constants.ApiRunMode; +import io.metersphere.commons.utils.ServiceUtils; +import io.metersphere.track.dto.RelevanceScenarioRequest; +import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +@Service +@Transactional(rollbackFor = Exception.class) +public class TestCaseReviewScenarioCaseService { + @Resource + ApiAutomationService apiAutomationService; + @Resource + TestCaseReviewScenarioMapper testCaseReviewScenarioMapper; + @Resource + ExtTestCaseReviewScenarioCaseMapper extTestCaseReviewScenarioCaseMapper; + @Resource + ApiScenarioReportService apiScenarioReportService; + public List list(TestPlanScenarioRequest request) { + request.setProjectId(null); + request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); + List apiTestCases = extTestCaseReviewScenarioCaseMapper.list(request); + setApiScenarioProjectIds(apiTestCases); + if (CollectionUtils.isEmpty(apiTestCases)) { + return apiTestCases; + } + return apiTestCases; + } + + private void setApiScenarioProjectIds(List list) { + // 如果场景步骤涉及多项目,则把涉及到的项目ID保存在projectIds属性 + list.forEach(data -> { + List idList = new ArrayList<>(); + String definition = data.getScenarioDefinition(); + if (org.apache.commons.lang3.StringUtils.isNotBlank(definition)) { + RunDefinitionRequest d = JSON.parseObject(definition, RunDefinitionRequest.class); + + if (d != null) { + Map map = d.getEnvironmentMap(); + if (map != null) { + if (map.isEmpty()) { + List ids = (List) JSONPath.read(definition, "$..projectId"); + idList.addAll(new HashSet<>(ids)); + } else { + Set set = d.getEnvironmentMap().keySet(); + idList = new ArrayList<>(set); + } + } else { + // 兼容历史数据,无EnvironmentMap直接赋值场景所属项目 + idList.add(data.getProjectId()); + } + } + + } + data.setProjectIds(idList); + }); + } + + public List relevanceList(ApiScenarioRequest request) { + request.setNotInTestPlan(true); + List list = apiAutomationService.listReview(request); + setApiScenarioProjectIds(list); + return list; + } + + public int delete(String id) { + TestCaseReviewScenario testCaseReviewScenario = testCaseReviewScenarioMapper.selectByPrimaryKey(id); + String reportId = testCaseReviewScenario.getReportId(); + if (!StringUtils.isEmpty(reportId)) { + apiScenarioReportService.delete(reportId); + } + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria() + .andIdEqualTo(id); + + return testCaseReviewScenarioMapper.deleteByExample(example); + } + + public void deleteApiCaseBath(TestPlanApiCaseBatchRequest request) { + if (CollectionUtils.isEmpty(request.getIds())) { + return; + } + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria() + .andIdIn(request.getIds()); + List reportIds = testCaseReviewScenarioMapper.selectByExample(example).stream() + .map(TestCaseReviewScenario::getReportId).collect(Collectors.toList()); + apiScenarioReportService.deleteByIds(reportIds); + testCaseReviewScenarioMapper.deleteByExample(example); + } + + public String run(RunScenarioRequest request) { + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria().andIdIn(request.getPlanCaseIds()); + List testPlanApiScenarioList = testCaseReviewScenarioMapper.selectByExample(example); + + List scenarioIds = new ArrayList<>(); + Map scenarioIdApiScarionMap = new HashMap<>(); + for (TestCaseReviewScenario apiScenario: + testPlanApiScenarioList) { + scenarioIds.add(apiScenario.getApiScenarioId()); + scenarioIdApiScarionMap.put(apiScenario.getApiScenarioId(),apiScenario.getId()); + } + request.setIds(scenarioIds); + request.setScenarioTestPlanIdMap(scenarioIdApiScarionMap); + request.setRunMode(ApiRunMode.SCENARIO_PLAN.name()); + return apiAutomationService.run(request); + } + + public List getCasesByReviewId(String reviewId) { + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria().andTestCaseReviewIdEqualTo(reviewId); + return testCaseReviewScenarioMapper.selectByExample(example); + } + + public List getExecResultByReviewId(String reviewId) { + return extTestCaseReviewScenarioCaseMapper.getExecResultByReviewId(reviewId); + } + + public void deleteByReviewId(String reviewId) { + TestPlanApiCaseBatchRequest request = new TestPlanApiCaseBatchRequest(); + List ids = extTestCaseReviewScenarioCaseMapper.getIdsByReviewId(reviewId); + request.setIds(ids); + deleteApiCaseBath(request); + } + + public void deleteByRelevanceProjectIds(String reviewId, List relevanceProjectIds) { + TestPlanApiCaseBatchRequest request = new TestPlanApiCaseBatchRequest(); + request.setIds(extTestCaseReviewScenarioCaseMapper.getNotRelevanceCaseIds(reviewId, relevanceProjectIds)); + request.setPlanId(reviewId); + deleteApiCaseBath(request); + } + + public void bathDeleteByScenarioIds(List ids) { + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria().andApiScenarioIdIn(ids); + testCaseReviewScenarioMapper.deleteByExample(example); + } + + public void deleteByScenarioId(String id) { + TestCaseReviewScenarioExample example = new TestCaseReviewScenarioExample(); + example.createCriteria().andApiScenarioIdEqualTo(id); + testCaseReviewScenarioMapper.deleteByExample(example); + } + + public void batchUpdateEnv(RelevanceScenarioRequest request) { + Map envMap = request.getEnvMap(); + Map> mapping = request.getMapping(); + Set set = mapping.keySet(); + if (set.isEmpty()) { return; } + set.forEach(id -> { + Map newEnvMap = new HashMap<>(16); + if (envMap != null && !envMap.isEmpty()) { + List list = mapping.get(id); + list.forEach(l -> { + newEnvMap.put(l, envMap.get(l)); + }); + } + if (!newEnvMap.isEmpty()) { + TestCaseReviewScenario scenario = new TestCaseReviewScenario(); + scenario.setId(id); + scenario.setEnvironment(JSON.toJSONString(newEnvMap)); + testCaseReviewScenarioMapper.updateByPrimaryKeySelective(scenario); + } + }); + + + } +} diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java index 8de4cdbcab..7617f37d07 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java @@ -150,4 +150,8 @@ public class TestPlanTestCaseService { public int updateTestCaseStates(List ids, String reportStatus) { return extTestPlanTestCaseMapper.updateTestCaseStates(ids, reportStatus); } + + public List listForMinder(String planId) { + return extTestPlanTestCaseMapper.listForMinder(planId); + } } diff --git a/backend/src/main/resources/db/migration/V78__v1.8_release.sql b/backend/src/main/resources/db/migration/V78__v1.8_release.sql index c1f35cfdab..c18df38be6 100644 --- a/backend/src/main/resources/db/migration/V78__v1.8_release.sql +++ b/backend/src/main/resources/db/migration/V78__v1.8_release.sql @@ -80,6 +80,8 @@ alter table test_case add demand_name varchar(999) null; alter table test_case add follow_people varchar(100) null; +alter table test_case + add status varchar(25) null; -- test_case_review add column ALTER TABLE test_case_review ADD tags VARCHAR(2000) NULL; @@ -94,6 +96,10 @@ alter table api_scenario add original_state varchar(64); update api_definition set original_state='Underway'; update api_scenario set original_state='Underway'; +-- alter test_case_review_scenario +alter table test_case_review_scenario modify environment longtext null; + + -- schedule table add project_id column alter table schedule add project_id varchar(50) NULL; -- set values for new colums of exitsting data diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index 5798709de6..c0595762e2 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -71,7 +71,11 @@ - + +
+
+
+ \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 345a94dfb5..c8bade0683 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -765,9 +765,6 @@ z-index: auto !important; } - /deep/ el-table__fixed-right { - - } /deep/ .el-table__fixed-right { height: 100% !important; diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index f45dea9632..ca7e7691f7 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -74,6 +74,7 @@ export default { }, planId: String, relevanceProjectId: String, + reviewId: String }, computed: { isPlanModel() { @@ -81,6 +82,9 @@ export default { }, isRelevanceModel() { return this.relevanceProjectId ? true : false; + }, + isReviewModel() { + return this.reviewId ? true : false; } }, mounted() { @@ -104,6 +108,9 @@ export default { }, relevanceProjectId() { this.list(); + }, + reviewId() { + this.list(); } }, methods: { diff --git a/frontend/src/business/components/track/TestTrack.vue b/frontend/src/business/components/track/TestTrack.vue index 4e63c93777..c251f0ccd4 100644 --- a/frontend/src/business/components/track/TestTrack.vue +++ b/frontend/src/business/components/track/TestTrack.vue @@ -16,14 +16,17 @@ import TrackHeaderMenus from "./head/TrackHeaderMenus"; export default { - name: "TrackHome", - components: {TrackHeaderMenus}, - data() { - return { - baseUrl: "track" - } + name: "TrackHome", + components: {TrackHeaderMenus}, + data() { + return { + baseUrl: "track" } + }, + activated() { + this.$refs.table.doLayout() } + } diff --git a/frontend/src/business/components/track/common/minder/TestPlanMinder.vue b/frontend/src/business/components/track/common/minder/TestPlanMinder.vue new file mode 100644 index 0000000000..f15a0c0ecd --- /dev/null +++ b/frontend/src/business/components/track/common/minder/TestPlanMinder.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/TestPlan.vue b/frontend/src/business/components/track/plan/TestPlan.vue index a1594962fd..6974f8cead 100644 --- a/frontend/src/business/components/track/plan/TestPlan.vue +++ b/frontend/src/business/components/track/plan/TestPlan.vue @@ -6,6 +6,7 @@ @openTestPlanEditDialog="openTestPlanEditDialog" @testPlanEdit="openTestPlanEditDialog" ref="testPlanList"/> + diff --git a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue index a767856738..7e9966d138 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue @@ -19,6 +19,11 @@ + + + + + @@ -93,6 +98,7 @@