diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java new file mode 100644 index 0000000000..75d38cb2b6 --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java @@ -0,0 +1,21 @@ +package io.metersphere.api.controller; + +import io.metersphere.api.service.ApiAutomationService; +import io.metersphere.commons.constants.RoleConstants; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@RequestMapping(value = "/api/automation") +@RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) +public class ApiAutomationController { + + @Resource + ApiAutomationService apiAutomationService; + +} + diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java new file mode 100644 index 0000000000..e9655acdc0 --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -0,0 +1,15 @@ +package io.metersphere.api.service; + +import io.metersphere.base.mapper.ApiDefinitionHistoryMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +@Service +@Transactional(rollbackFor = Exception.class) +public class ApiAutomationService { + @Resource + private ApiDefinitionHistoryMapper apiDefinitionHistoryMapper; + +} diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java new file mode 100644 index 0000000000..75d93f7bce --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionHistoryService.java @@ -0,0 +1,20 @@ +package io.metersphere.api.service; + +import io.metersphere.base.domain.ApiDefinitionHistory; +import io.metersphere.base.mapper.ApiDefinitionHistoryMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +@Service +@Transactional(rollbackFor = Exception.class) +public class ApiDefinitionHistoryService { + @Resource + private ApiDefinitionHistoryMapper apiDefinitionHistoryMapper; + + public List selectByApiDefinitionId(String id){ + return apiDefinitionHistoryMapper.selectByApiDefinitionId(id); + } +} diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenario.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenario.java new file mode 100644 index 0000000000..a6cf1a7b5a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenario.java @@ -0,0 +1,28 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiScenario implements Serializable { + private String id; + + private String apiScenarioId; + + private String name; + + private String description; + + private Long createTime; + + private Long updateTime; + + private String status; + + private String userId; + + private String triggerMode; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioModule.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioModule.java new file mode 100644 index 0000000000..9981a8982e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioModule.java @@ -0,0 +1,25 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiScenarioModule implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String userId; + + private String parentId; + + private String level; + + private Long createTime; + + private Long updateTime; + +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java new file mode 100644 index 0000000000..6e73be36a5 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java @@ -0,0 +1,34 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiScenarioReport implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String scenarioId; + + private String level; + + private String status; + + private String principal; + + private String followPeople; + + private String description; + + private String scenarioDefinition; + + private String userId; + + private Long createTime; + + private Long updateTime; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportDetail.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportDetail.java new file mode 100644 index 0000000000..4a9b326731 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportDetail.java @@ -0,0 +1,16 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiScenarioReportDetail implements Serializable { + private String reportId; + + private String apiScenarioId; + + private byte[] content; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTag.java b/backend/src/main/java/io/metersphere/base/domain/ApiTag.java new file mode 100644 index 0000000000..18bee19de7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTag.java @@ -0,0 +1,22 @@ +package io.metersphere.base.domain; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiTag implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String userId; + + 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/mapper/ApiAutomationMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiAutomationMapper.java new file mode 100644 index 0000000000..604b9c2419 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiAutomationMapper.java @@ -0,0 +1,5 @@ +package io.metersphere.base.mapper; + +public interface ApiAutomationMapper { + +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiAutomationMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiAutomationMapper.xml new file mode 100644 index 0000000000..db74bb4db1 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiAutomationMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue new file mode 100644 index 0000000000..e1b1867e21 --- /dev/null +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/frontend/src/business/components/api/automation/report/ApiReport.vue b/frontend/src/business/components/api/automation/report/ApiReport.vue new file mode 100644 index 0000000000..222b287be3 --- /dev/null +++ b/frontend/src/business/components/api/automation/report/ApiReport.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue new file mode 100644 index 0000000000..238149d399 --- /dev/null +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/frontend/src/business/components/api/head/ApiHeaderMenus.vue b/frontend/src/business/components/api/head/ApiHeaderMenus.vue index cd1817adef..532283844c 100644 --- a/frontend/src/business/components/api/head/ApiHeaderMenus.vue +++ b/frontend/src/business/components/api/head/ApiHeaderMenus.vue @@ -1,7 +1,7 @@