Merge remote-tracking branch 'origin/master' into master
# Conflicts: # backend/src/main/java/io/metersphere/xpack
This commit is contained in:
commit
4c716a0946
|
@ -1,10 +1,10 @@
|
|||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'master'
|
||||
label 'metersphere'
|
||||
}
|
||||
}
|
||||
options { quietPeriod(1200) }
|
||||
options { quietPeriod(600) }
|
||||
parameters {
|
||||
string(name: 'IMAGE_NAME', defaultValue: 'metersphere', description: '构建后的 Docker 镜像名称')
|
||||
string(name: 'IMAGE_FREFIX', defaultValue: 'registry.cn-qingdao.aliyuncs.com/metersphere', description: '构建后的 Docker 镜像带仓库名的前缀')
|
||||
|
|
|
@ -2,10 +2,10 @@ package io.metersphere.api.controller;
|
|||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||
import io.metersphere.api.dto.automation.ExecuteType;
|
||||
import io.metersphere.api.service.ApiScenarioReportService;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
|
@ -27,8 +27,8 @@ public class APIScenarioReportController {
|
|||
private ApiScenarioReportService apiReportService;
|
||||
|
||||
@GetMapping("/get/{reportId}/{infoDb}")
|
||||
public APIReportResult get(@PathVariable String reportId,@PathVariable Boolean infoDb) {
|
||||
if(infoDb){
|
||||
public APIScenarioReportResult get(@PathVariable String reportId, @PathVariable Boolean infoDb) {
|
||||
if (infoDb) {
|
||||
return apiReportService.get(reportId);
|
||||
}
|
||||
return apiReportService.getCacheResult(reportId);
|
||||
|
@ -44,12 +44,14 @@ public class APIScenarioReportController {
|
|||
@PostMapping("/add")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public String add(@RequestBody APIScenarioReportResult node) {
|
||||
return apiReportService.add(node);
|
||||
node.setExecuteType(ExecuteType.Saved.name());
|
||||
return apiReportService.save(node);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public String update(@RequestBody APIScenarioReportResult node) {
|
||||
node.setExecuteType(ExecuteType.Saved.name());
|
||||
return apiReportService.update(node);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.metersphere.api.dto.automation.*;
|
|||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||
import io.metersphere.api.service.ApiAutomationService;
|
||||
import io.metersphere.base.domain.ApiScenario;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -69,17 +70,19 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping("/getApiScenarios")
|
||||
public List<ApiScenario> getApiScenarios(@RequestBody List<String> ids) {
|
||||
public List<ApiScenarioWithBLOBs> getApiScenarios(@RequestBody List<String> ids) {
|
||||
return apiAutomationService.getApiScenarios(ids);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run/debug")
|
||||
public void runDebug(@RequestPart("request") RunDefinitionRequest request, @RequestPart(value = "files") List<MultipartFile> bodyFiles) {
|
||||
request.setExecuteType(ExecuteType.Debug.name());
|
||||
apiAutomationService.run(request, bodyFiles);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run")
|
||||
public void run(@RequestBody RunScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Completed.name());
|
||||
apiAutomationService.run(request);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import io.metersphere.base.domain.ApiScenarioReport;
|
|||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class APIScenarioReportResult extends ApiScenarioReport {
|
||||
|
@ -12,7 +14,11 @@ public class APIScenarioReportResult extends ApiScenarioReport {
|
|||
|
||||
private String projectName;
|
||||
|
||||
private String testId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private List<String> scenarioIds;
|
||||
|
||||
private String content;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package io.metersphere.api.dto.automation;
|
||||
|
||||
public enum ExecuteType {
|
||||
Saved, Completed, Debug
|
||||
}
|
|
@ -13,9 +13,13 @@ public class RunScenarioRequest {
|
|||
|
||||
private String reportId;
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String environmentId;
|
||||
|
||||
private String triggerMode;
|
||||
|
||||
private String executeType;
|
||||
|
||||
private List<String> scenarioIds;
|
||||
}
|
||||
|
|
|
@ -15,10 +15,14 @@ public class RunDefinitionRequest {
|
|||
|
||||
private String reportId;
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String environmentId;
|
||||
|
||||
private MsTestElement testElement;
|
||||
|
||||
private String executeType;
|
||||
|
||||
private Response response;
|
||||
|
||||
private List<String> bodyUploadIds;
|
||||
|
|
|
@ -11,17 +11,17 @@ import io.metersphere.api.dto.scenario.KeyValue;
|
|||
import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
|
||||
import io.metersphere.api.service.ApiAutomationService;
|
||||
import io.metersphere.api.service.ApiTestEnvironmentService;
|
||||
import io.metersphere.base.domain.ApiScenario;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jmeter.config.Arguments;
|
||||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.apache.jmeter.config.Arguments;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
@ -67,7 +67,7 @@ public class MsScenario extends MsTestElement {
|
|||
ApiAutomationService apiAutomationService = CommonBeanFactory.getBean(ApiAutomationService.class);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
ApiScenario scenario = apiAutomationService.getApiScenario(this.getId());
|
||||
ApiScenarioWithBLOBs scenario = apiAutomationService.getApiScenario(this.getId());
|
||||
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
||||
LinkedList<MsTestElement> elements = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
||||
});
|
||||
|
|
|
@ -101,7 +101,7 @@ public abstract class MsTestElement {
|
|||
return baos.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.warn("HashTree error, can't log jmx content");
|
||||
LogUtil.warn("HashTree error, can't log jmx scenarioDefinition");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ public abstract class ApiImportAbstractParser implements ApiImportParser {
|
|||
// }
|
||||
// }
|
||||
// if (!hasContentType) {
|
||||
// headers.add(new KeyValue(key, value));
|
||||
// headers.save(new KeyValue(key, value));
|
||||
// }
|
||||
// request.setHeaders(headers);
|
||||
// }
|
||||
|
|
|
@ -26,7 +26,6 @@ import io.swagger.models.properties.Property;
|
|||
import io.swagger.models.properties.RefProperty;
|
||||
import io.swagger.parser.SwaggerParser;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
|
@ -80,7 +79,7 @@ public class Swagger2Parser extends ApiImportAbstractParser {
|
|||
headerManager.setName(res.getName() + "Postman MsHeaderManager");
|
||||
headerManager.setHeaders(res.getHeaders());
|
||||
// HashTree tree = new HashTree();
|
||||
// tree.add(headerManager);
|
||||
// tree.save(headerManager);
|
||||
LinkedList<MsTestElement> list = new LinkedList<>();
|
||||
list.add(headerManager);
|
||||
requestElement.setHashTree(list);
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.fasterxml.jackson.core.type.TypeReference;
|
|||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.gson.Gson;
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.automation.*;
|
||||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||
import io.metersphere.api.dto.definition.request.*;
|
||||
|
@ -104,8 +103,8 @@ public class ApiAutomationService {
|
|||
public ApiScenario create(SaveApiScenarioRequest request, List<MultipartFile> bodyFiles) {
|
||||
request.setId(UUID.randomUUID().toString());
|
||||
checkNameExist(request);
|
||||
|
||||
final ApiScenario scenario = new ApiScenario();
|
||||
|
||||
final ApiScenarioWithBLOBs scenario = new ApiScenarioWithBLOBs();
|
||||
scenario.setId(request.getId());
|
||||
scenario.setName(request.getName());
|
||||
scenario.setProjectId(request.getProjectId());
|
||||
|
@ -142,7 +141,7 @@ public class ApiAutomationService {
|
|||
List<String> bodyUploadIds = request.getBodyUploadIds();
|
||||
apiDefinitionService.createBodyFiles(bodyUploadIds, bodyFiles);
|
||||
|
||||
final ApiScenario scenario = new ApiScenario();
|
||||
final ApiScenarioWithBLOBs scenario = new ApiScenarioWithBLOBs();
|
||||
scenario.setId(request.getId());
|
||||
scenario.setName(request.getName());
|
||||
scenario.setProjectId(request.getProjectId());
|
||||
|
@ -181,7 +180,7 @@ public class ApiAutomationService {
|
|||
|
||||
public void reduction(List<SaveApiScenarioRequest> requests) {
|
||||
List<String> apiIds = new ArrayList<>();
|
||||
requests.forEach(item->{
|
||||
requests.forEach(item -> {
|
||||
checkNameExist(item);
|
||||
apiIds.add(item.getId());
|
||||
});
|
||||
|
@ -196,11 +195,11 @@ public class ApiAutomationService {
|
|||
}
|
||||
}
|
||||
|
||||
public ApiScenario getApiScenario(String id) {
|
||||
public ApiScenarioWithBLOBs getApiScenario(String id) {
|
||||
return apiScenarioMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ApiScenario> getApiScenarios(List<String> ids) {
|
||||
public List<ApiScenarioWithBLOBs> getApiScenarios(List<String> ids) {
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
return extApiScenarioMapper.selectIds(ids);
|
||||
}
|
||||
|
@ -208,7 +207,7 @@ public class ApiAutomationService {
|
|||
}
|
||||
|
||||
public void deleteTag(String id) {
|
||||
List<ApiScenario> list = extApiScenarioMapper.selectByTagId(id);
|
||||
List<ApiScenarioWithBLOBs> list = extApiScenarioMapper.selectByTagId(id);
|
||||
if (!list.isEmpty()) {
|
||||
Gson gs = new Gson();
|
||||
list.forEach(item -> {
|
||||
|
@ -220,17 +219,17 @@ public class ApiAutomationService {
|
|||
}
|
||||
}
|
||||
|
||||
private void createAPIReportResult(String id, String triggerMode) {
|
||||
APIReportResult report = new APIReportResult();
|
||||
private void createAPIScenarioReportResult(String id, String triggerMode, String execType, String projectId) {
|
||||
APIScenarioReportResult report = new APIScenarioReportResult();
|
||||
report.setId(id);
|
||||
report.setTestId(id);
|
||||
report.setName("");
|
||||
report.setTriggerMode(null);
|
||||
report.setName("测试执行结果");
|
||||
report.setCreateTime(System.currentTimeMillis());
|
||||
report.setUpdateTime(System.currentTimeMillis());
|
||||
report.setStatus(APITestStatus.Running.name());
|
||||
report.setUserId(SessionUtils.getUserId());
|
||||
report.setTriggerMode(triggerMode);
|
||||
report.setExecuteType(execType);
|
||||
report.setProjectId(projectId);
|
||||
apiReportService.addResult(report);
|
||||
|
||||
}
|
||||
|
@ -242,11 +241,11 @@ public class ApiAutomationService {
|
|||
* @return
|
||||
*/
|
||||
public String run(RunScenarioRequest request) {
|
||||
List<ApiScenario> apiScenarios = extApiScenarioMapper.selectIds(request.getScenarioIds());
|
||||
List<ApiScenarioWithBLOBs> apiScenarios = extApiScenarioMapper.selectIds(request.getScenarioIds());
|
||||
MsTestPlan testPlan = new MsTestPlan();
|
||||
testPlan.setHashTree(new LinkedList<>());
|
||||
HashTree jmeterTestPlanHashTree = new ListedHashTree();
|
||||
for (ApiScenario item : apiScenarios) {
|
||||
for (ApiScenarioWithBLOBs item : apiScenarios) {
|
||||
MsThreadGroup group = new MsThreadGroup();
|
||||
group.setLabel(item.getName());
|
||||
group.setName(item.getName());
|
||||
|
@ -280,7 +279,8 @@ public class ApiAutomationService {
|
|||
// 调用执行方法
|
||||
jMeterService.runDefinition(request.getId(), jmeterTestPlanHashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
||||
|
||||
createAPIReportResult(request.getId(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode());
|
||||
createAPIScenarioReportResult(request.getId(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode(),
|
||||
request.getExecuteType(), request.getProjectId());
|
||||
return request.getId();
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ public class ApiAutomationService {
|
|||
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
||||
// 调用执行方法
|
||||
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
||||
createAPIReportResult(request.getId(), ReportTriggerMode.MANUAL.name());
|
||||
createAPIScenarioReportResult(request.getId(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId());
|
||||
return request.getId();
|
||||
}
|
||||
|
||||
|
@ -371,10 +371,10 @@ public class ApiAutomationService {
|
|||
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
||||
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
||||
|
||||
if(firstTime==null || lastTime == null){
|
||||
return 0;
|
||||
}else {
|
||||
return extApiScenarioMapper.countByProjectIDAndCreatInThisWeek(projectId,firstTime.getTime(),lastTime.getTime());
|
||||
if (firstTime == null || lastTime == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return extApiScenarioMapper.countByProjectIDAndCreatInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ package io.metersphere.api.service;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||
import io.metersphere.api.dto.automation.ExecuteType;
|
||||
import io.metersphere.api.jmeter.TestResult;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||
|
@ -49,11 +49,12 @@ public class ApiScenarioReportService {
|
|||
if (obj == null) {
|
||||
MSException.throwException(Translator.get("api_report_is_null"));
|
||||
}
|
||||
APIReportResult report = (APIReportResult) obj;
|
||||
APIScenarioReportResult report = (APIScenarioReportResult) obj;
|
||||
// report detail
|
||||
ApiTestReportDetail detail = new ApiTestReportDetail();
|
||||
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
||||
detail.setReportId(result.getTestId());
|
||||
detail.setTestId(report.getTestId());
|
||||
detail.setProjectId(report.getProjectId());
|
||||
report.setTestId(result.getTestId());
|
||||
detail.setContent(JSONObject.toJSONString(result).getBytes(StandardCharsets.UTF_8));
|
||||
// report
|
||||
report.setUpdateTime(System.currentTimeMillis());
|
||||
|
@ -65,11 +66,8 @@ public class ApiScenarioReportService {
|
|||
}
|
||||
}
|
||||
report.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
||||
cache.put(report.getTestId(), report);
|
||||
}
|
||||
|
||||
public void addResult(APIReportResult res) {
|
||||
cache.put(res.getTestId(), res);
|
||||
this.save(report);
|
||||
cache.put(report.getId(), report);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,10 +75,10 @@ public class ApiScenarioReportService {
|
|||
*
|
||||
* @param testId
|
||||
*/
|
||||
public APIReportResult getCacheResult(String testId) {
|
||||
public APIScenarioReportResult getCacheResult(String testId) {
|
||||
Object res = cache.get(testId);
|
||||
if (res != null) {
|
||||
APIReportResult reportResult = (APIReportResult) res;
|
||||
APIScenarioReportResult reportResult = (APIScenarioReportResult) res;
|
||||
if (!reportResult.getStatus().equals(APITestStatus.Running.name())) {
|
||||
cache.remove(testId);
|
||||
}
|
||||
|
@ -89,8 +87,13 @@ public class ApiScenarioReportService {
|
|||
return null;
|
||||
}
|
||||
|
||||
public APIReportResult get(String reportId) {
|
||||
APIReportResult reportResult = extApiScenarioReportMapper.get(reportId);
|
||||
|
||||
public void addResult(APIScenarioReportResult res) {
|
||||
cache.put(res.getId(), res);
|
||||
}
|
||||
|
||||
public APIScenarioReportResult get(String reportId) {
|
||||
APIScenarioReportResult reportResult = extApiScenarioReportMapper.get(reportId);
|
||||
ApiScenarioReportDetail detail = apiScenarioReportDetailMapper.selectByPrimaryKey(reportId);
|
||||
if (detail != null) {
|
||||
reportResult.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
||||
|
@ -105,7 +108,7 @@ public class ApiScenarioReportService {
|
|||
|
||||
private void checkNameExist(APIScenarioReportResult request) {
|
||||
ApiScenarioReportExample example = new ApiScenarioReportExample();
|
||||
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
||||
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()).andExecuteTypeEqualTo(ExecuteType.Saved.name()).andIdNotEqualTo(request.getId());
|
||||
if (apiScenarioReportMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("load_test_already_exists"));
|
||||
}
|
||||
|
@ -123,6 +126,7 @@ public class ApiScenarioReportService {
|
|||
report.setUpdateTime(System.currentTimeMillis());
|
||||
report.setStatus(test.getStatus());
|
||||
report.setUserId(test.getUserId());
|
||||
report.setExecuteType(test.getExecuteType());
|
||||
apiScenarioReportMapper.insert(report);
|
||||
return report;
|
||||
}
|
||||
|
@ -139,12 +143,13 @@ public class ApiScenarioReportService {
|
|||
report.setUpdateTime(System.currentTimeMillis());
|
||||
report.setStatus(test.getStatus());
|
||||
report.setUserId(test.getUserId());
|
||||
report.setExecuteType(test.getExecuteType());
|
||||
apiScenarioReportMapper.updateByPrimaryKey(report);
|
||||
return report;
|
||||
}
|
||||
|
||||
|
||||
public String add(APIScenarioReportResult test) {
|
||||
public String save(APIScenarioReportResult test) {
|
||||
ApiScenarioReport report = createReport(test);
|
||||
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
||||
TestResult result = JSON.parseObject(test.getContent(), TestResult.class);
|
||||
|
@ -218,10 +223,10 @@ public class ApiScenarioReportService {
|
|||
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
||||
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
||||
|
||||
if(firstTime==null || lastTime == null){
|
||||
return 0;
|
||||
}else {
|
||||
return extApiScenarioReportMapper.countByProjectIDAndCreateInThisWeek(projectId,firstTime.getTime(),lastTime.getTime());
|
||||
if (firstTime == null || lastTime == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return extApiScenarioReportMapper.countByProjectIDAndCreateInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinition implements Serializable {
|
||||
|
@ -16,8 +15,6 @@ public class ApiDefinition implements Serializable {
|
|||
|
||||
private String modulePath;
|
||||
|
||||
private String description;
|
||||
|
||||
private String environmentId;
|
||||
|
||||
private String schedule;
|
||||
|
|
|
@ -454,76 +454,6 @@ public class ApiDefinitionExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdIsNull() {
|
||||
addCriterion("environment_id is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ApiDefinitionWithBLOBs extends ApiDefinition implements Serializable {
|
||||
private String description;
|
||||
|
||||
private String request;
|
||||
|
||||
private String response;
|
||||
|
|
|
@ -31,8 +31,6 @@ public class ApiScenario implements Serializable {
|
|||
|
||||
private String schedule;
|
||||
|
||||
private String description;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
@ -43,7 +41,5 @@ public class ApiScenario implements Serializable {
|
|||
|
||||
private String reportId;
|
||||
|
||||
private String scenarioDefinition;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1004,76 +1004,6 @@ public class ApiScenarioExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ApiScenarioReport implements Serializable {
|
||||
private String id;
|
||||
|
@ -11,8 +12,6 @@ public class ApiScenarioReport implements Serializable {
|
|||
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
@ -23,5 +22,9 @@ public class ApiScenarioReport implements Serializable {
|
|||
|
||||
private String triggerMode;
|
||||
|
||||
private String executeType;
|
||||
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -314,76 +314,6 @@ public class ApiScenarioReportExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -713,6 +643,76 @@ public class ApiScenarioReportExample {
|
|||
addCriterion("trigger_mode not between", value1, value2, "triggerMode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeIsNull() {
|
||||
addCriterion("execute_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeIsNotNull() {
|
||||
addCriterion("execute_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeEqualTo(String value) {
|
||||
addCriterion("execute_type =", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeNotEqualTo(String value) {
|
||||
addCriterion("execute_type <>", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeGreaterThan(String value) {
|
||||
addCriterion("execute_type >", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("execute_type >=", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeLessThan(String value) {
|
||||
addCriterion("execute_type <", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("execute_type <=", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeLike(String value) {
|
||||
addCriterion("execute_type like", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeNotLike(String value) {
|
||||
addCriterion("execute_type not like", value, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeIn(List<String> values) {
|
||||
addCriterion("execute_type in", values, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeNotIn(List<String> values) {
|
||||
addCriterion("execute_type not in", values, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeBetween(String value1, String value2) {
|
||||
addCriterion("execute_type between", value1, value2, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("execute_type not between", value1, value2, "executeType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ApiScenarioWithBLOBs extends ApiScenario implements Serializable {
|
||||
private String scenarioDefinition;
|
||||
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiTestCase implements Serializable {
|
||||
|
@ -16,8 +15,6 @@ public class ApiTestCase implements Serializable {
|
|||
|
||||
private String apiDefinitionId;
|
||||
|
||||
private String description;
|
||||
|
||||
private String createUserId;
|
||||
|
||||
private String updateUserId;
|
||||
|
|
|
@ -454,76 +454,6 @@ public class ApiTestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIdIsNull() {
|
||||
addCriterion("create_user_id is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ApiTestCaseWithBLOBs extends ApiTestCase implements Serializable {
|
||||
private String description;
|
||||
|
||||
private String request;
|
||||
|
||||
private String response;
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.dataCount.response.ApiDataCountDTO;
|
||||
import io.metersphere.base.domain.ApiDefinition;
|
||||
import io.metersphere.base.domain.ApiDefinitionExample;
|
||||
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ApiDefinitionMapper {
|
||||
long countByExample(ApiDefinitionExample example);
|
||||
|
@ -38,5 +34,4 @@ public interface ApiDefinitionMapper {
|
|||
int updateByPrimaryKeyWithBLOBs(ApiDefinitionWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(ApiDefinition record);
|
||||
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
|
@ -19,6 +18,7 @@
|
|||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
||||
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
||||
</resultMap>
|
||||
|
@ -81,11 +81,11 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, `name`, `method`, module_path, description, environment_id, schedule,
|
||||
`status`, module_id, user_id, create_time, update_time, protocol, `path`
|
||||
id, project_id, `name`, `method`, module_path, environment_id, schedule, `status`,
|
||||
module_id, user_id, create_time, update_time, protocol, `path`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
request, response
|
||||
description, request, response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiDefinitionExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
|
@ -137,16 +137,16 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
insert into api_definition (id, project_id, `name`,
|
||||
`method`, module_path, description,
|
||||
environment_id, schedule, `status`,
|
||||
module_id, user_id, create_time,
|
||||
update_time, protocol, `path`,
|
||||
`method`, module_path, environment_id,
|
||||
schedule, `status`, module_id,
|
||||
user_id, create_time, update_time,
|
||||
protocol, `path`, description,
|
||||
request, response)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{environmentId,jdbcType=VARCHAR}, #{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{moduleId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
|
||||
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||
#{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR},
|
||||
#{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
|
@ -167,9 +167,6 @@
|
|||
<if test="modulePath != null">
|
||||
module_path,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
|
@ -197,6 +194,9 @@
|
|||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="request != null">
|
||||
request,
|
||||
</if>
|
||||
|
@ -220,9 +220,6 @@
|
|||
<if test="modulePath != null">
|
||||
#{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -250,6 +247,9 @@
|
|||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="request != null">
|
||||
#{request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -282,9 +282,6 @@
|
|||
<if test="record.modulePath != null">
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -312,6 +309,9 @@
|
|||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.request != null">
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -330,7 +330,6 @@
|
|||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
`method` = #{record.method,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
|
@ -340,6 +339,7 @@
|
|||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -353,7 +353,6 @@
|
|||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
`method` = #{record.method,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
|
@ -382,9 +381,6 @@
|
|||
<if test="modulePath != null">
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -412,6 +408,9 @@
|
|||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="request != null">
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -427,7 +426,6 @@
|
|||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
|
@ -437,6 +435,7 @@
|
|||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
response = #{response,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -447,7 +446,6 @@
|
|||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
|
|
|
@ -2,9 +2,9 @@ package io.metersphere.base.mapper;
|
|||
|
||||
import io.metersphere.base.domain.ApiScenario;
|
||||
import io.metersphere.base.domain.ApiScenarioExample;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
public interface ApiScenarioMapper {
|
||||
long countByExample(ApiScenarioExample example);
|
||||
|
@ -13,26 +13,25 @@ public interface ApiScenarioMapper {
|
|||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(ApiScenario record);
|
||||
int insert(ApiScenarioWithBLOBs record);
|
||||
|
||||
int insertSelective(ApiScenario record);
|
||||
int insertSelective(ApiScenarioWithBLOBs record);
|
||||
|
||||
List<ApiScenario> selectByExampleWithBLOBs(ApiScenarioExample example);
|
||||
List<ApiScenarioWithBLOBs> selectByExampleWithBLOBs(ApiScenarioExample example);
|
||||
|
||||
List<ApiScenario> selectByExample(ApiScenarioExample example);
|
||||
|
||||
ApiScenario selectByPrimaryKey(String id);
|
||||
ApiScenarioWithBLOBs selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
||||
int updateByExampleSelective(@Param("record") ApiScenarioWithBLOBs record, @Param("example") ApiScenarioExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
||||
int updateByExampleWithBLOBs(@Param("record") ApiScenarioWithBLOBs record, @Param("example") ApiScenarioExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ApiScenario record);
|
||||
int updateByPrimaryKeySelective(ApiScenarioWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenario record);
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenario record);
|
||||
|
||||
}
|
|
@ -15,15 +15,15 @@
|
|||
<result column="step_total" jdbcType="INTEGER" property="stepTotal" />
|
||||
<result column="follow_people" jdbcType="VARCHAR" property="followPeople" />
|
||||
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="pass_rate" jdbcType="VARCHAR" property="passRate" />
|
||||
<result column="last_result" jdbcType="VARCHAR" property="lastResult" />
|
||||
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenario">
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
<result column="scenario_definition" jdbcType="LONGVARCHAR" property="scenarioDefinition" />
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -85,11 +85,11 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, tag_id, user_id, api_scenario_module_id, module_path, `name`, `level`,
|
||||
`status`, principal, step_total, follow_people, schedule, description, create_time,
|
||||
update_time, pass_rate, last_result, report_id
|
||||
`status`, principal, step_total, follow_people, schedule, create_time, update_time,
|
||||
pass_rate, last_result, report_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
scenario_definition
|
||||
scenario_definition, description
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
|
@ -139,23 +139,25 @@
|
|||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
insert into api_scenario (id, project_id, tag_id,
|
||||
user_id, api_scenario_module_id, module_path,
|
||||
`name`, `level`, `status`,
|
||||
principal, step_total, follow_people,
|
||||
schedule, description, create_time,
|
||||
update_time, pass_rate, last_result,
|
||||
report_id, scenario_definition)
|
||||
schedule, create_time, update_time,
|
||||
pass_rate, last_result, report_id,
|
||||
scenario_definition, description
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tagId,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{followPeople,jdbcType=VARCHAR},
|
||||
#{schedule,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR},
|
||||
#{reportId,jdbcType=VARCHAR}, #{scenarioDefinition,jdbcType=LONGVARCHAR})
|
||||
#{schedule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{scenarioDefinition,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
insert into api_scenario
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -197,9 +199,6 @@
|
|||
<if test="schedule != null">
|
||||
schedule,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -218,6 +217,9 @@
|
|||
<if test="scenarioDefinition != null">
|
||||
scenario_definition,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -259,9 +261,6 @@
|
|||
<if test="schedule != null">
|
||||
#{schedule,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -280,6 +279,9 @@
|
|||
<if test="scenarioDefinition != null">
|
||||
#{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultType="java.lang.Long">
|
||||
|
@ -330,9 +332,6 @@
|
|||
<if test="record.schedule != null">
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -351,6 +350,9 @@
|
|||
<if test="record.scenarioDefinition != null">
|
||||
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -371,13 +373,13 @@
|
|||
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
||||
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
description = #{record.description,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},
|
||||
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR}
|
||||
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -397,7 +399,6 @@
|
|||
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
||||
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||
|
@ -407,7 +408,7 @@
|
|||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
update api_scenario
|
||||
<set>
|
||||
<if test="projectId != null">
|
||||
|
@ -446,9 +447,6 @@
|
|||
<if test="schedule != null">
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -467,10 +465,13 @@
|
|||
<if test="scenarioDefinition != null">
|
||||
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
update api_scenario
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
tag_id = #{tagId,jdbcType=VARCHAR},
|
||||
|
@ -484,13 +485,13 @@
|
|||
step_total = #{stepTotal,jdbcType=INTEGER},
|
||||
follow_people = #{followPeople,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
description = #{description,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},
|
||||
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR}
|
||||
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||
|
@ -507,7 +508,6 @@
|
|||
step_total = #{stepTotal,jdbcType=INTEGER},
|
||||
follow_people = #{followPeople,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||
|
|
|
@ -2,9 +2,9 @@ package io.metersphere.base.mapper;
|
|||
|
||||
import io.metersphere.base.domain.ApiScenarioReport;
|
||||
import io.metersphere.base.domain.ApiScenarioReportExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ApiScenarioReportMapper {
|
||||
long countByExample(ApiScenarioReportExample example);
|
||||
|
@ -17,16 +17,21 @@ public interface ApiScenarioReportMapper {
|
|||
|
||||
int insertSelective(ApiScenarioReport record);
|
||||
|
||||
List<ApiScenarioReport> selectByExampleWithBLOBs(ApiScenarioReportExample example);
|
||||
|
||||
List<ApiScenarioReport> selectByExample(ApiScenarioReportExample example);
|
||||
|
||||
ApiScenarioReport selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ApiScenarioReport record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioReport record);
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioReport record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioReport record);
|
||||
}
|
|
@ -5,12 +5,15 @@
|
|||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="trigger_mode" jdbcType="VARCHAR" property="triggerMode" />
|
||||
<result column="execute_type" jdbcType="VARCHAR" property="executeType" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioReport">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -71,9 +74,28 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, `name`, description, create_time, update_time, `status`, user_id,
|
||||
trigger_mode
|
||||
id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode,
|
||||
execute_type
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from api_scenario_report
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
|
@ -88,9 +110,11 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from api_scenario_report
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
@ -106,13 +130,13 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||
insert into api_scenario_report (id, project_id, `name`,
|
||||
description, create_time, update_time,
|
||||
`status`, user_id, trigger_mode
|
||||
)
|
||||
create_time, update_time, `status`,
|
||||
user_id, trigger_mode, execute_type,
|
||||
description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}
|
||||
)
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{executeType,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||
insert into api_scenario_report
|
||||
|
@ -126,9 +150,6 @@
|
|||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -144,6 +165,12 @@
|
|||
<if test="triggerMode != null">
|
||||
trigger_mode,
|
||||
</if>
|
||||
<if test="executeType != null">
|
||||
execute_type,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -155,9 +182,6 @@
|
|||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -173,6 +197,12 @@
|
|||
<if test="triggerMode != null">
|
||||
#{triggerMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executeType != null">
|
||||
#{executeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultType="java.lang.Long">
|
||||
|
@ -193,9 +223,6 @@
|
|||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -211,22 +238,44 @@
|
|||
<if test="record.triggerMode != null">
|
||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.executeType != null">
|
||||
execute_type = #{record.executeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update api_scenario_report
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||
execute_type = #{record.executeType,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update api_scenario_report
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}
|
||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||
execute_type = #{record.executeType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -240,9 +289,6 @@
|
|||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -258,19 +304,38 @@
|
|||
<if test="triggerMode != null">
|
||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executeType != null">
|
||||
execute_type = #{executeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||
update api_scenario_report
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||
execute_type = #{executeType,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||
update api_scenario_report
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR}
|
||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||
execute_type = #{executeType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -1,13 +1,10 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.base.domain.ApiTestCase;
|
||||
import io.metersphere.base.domain.ApiTestCaseExample;
|
||||
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ApiTestCaseMapper {
|
||||
long countByExample(ApiTestCaseExample example);
|
||||
|
@ -37,5 +34,4 @@ public interface ApiTestCaseMapper {
|
|||
int updateByPrimaryKeyWithBLOBs(ApiTestCaseWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(ApiTestCase record);
|
||||
|
||||
}
|
|
@ -7,13 +7,13 @@
|
|||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="priority" jdbcType="VARCHAR" property="priority" />
|
||||
<result column="api_definition_id" jdbcType="VARCHAR" property="apiDefinitionId" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
||||
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
||||
</resultMap>
|
||||
|
@ -76,11 +76,11 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, `name`, priority, api_definition_id, description, create_user_id,
|
||||
update_user_id, create_time, update_time
|
||||
id, project_id, `name`, priority, api_definition_id, create_user_id, update_user_id,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
request, response
|
||||
description, request, response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiTestCaseExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
|
@ -132,14 +132,14 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||
insert into api_test_case (id, project_id, `name`,
|
||||
priority, api_definition_id, description,
|
||||
create_user_id, update_user_id, create_time,
|
||||
update_time, request, response
|
||||
priority, api_definition_id, create_user_id,
|
||||
update_user_id, create_time, update_time,
|
||||
description, request, response
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}
|
||||
#{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{createUserId,jdbcType=VARCHAR},
|
||||
#{updateUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||
|
@ -160,9 +160,6 @@
|
|||
<if test="apiDefinitionId != null">
|
||||
api_definition_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
|
@ -175,6 +172,9 @@
|
|||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="request != null">
|
||||
request,
|
||||
</if>
|
||||
|
@ -198,9 +198,6 @@
|
|||
<if test="apiDefinitionId != null">
|
||||
#{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -213,6 +210,9 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="request != null">
|
||||
#{request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -245,9 +245,6 @@
|
|||
<if test="record.apiDefinitionId != null">
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUserId != null">
|
||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -260,6 +257,9 @@
|
|||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.request != null">
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -278,11 +278,11 @@
|
|||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -296,7 +296,6 @@
|
|||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
|
@ -320,9 +319,6 @@
|
|||
<if test="apiDefinitionId != null">
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -335,6 +331,9 @@
|
|||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="request != null">
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -350,11 +349,11 @@
|
|||
`name` = #{name,jdbcType=VARCHAR},
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
response = #{response,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -365,7 +364,6 @@
|
|||
`name` = #{name,jdbcType=VARCHAR},
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.base.mapper.ext;
|
|||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||
import io.metersphere.base.domain.ApiScenario;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
|
@ -11,9 +12,9 @@ import java.util.List;
|
|||
public interface ExtApiScenarioMapper {
|
||||
List<ApiScenarioDTO> list(@Param("request") ApiScenarioRequest request);
|
||||
|
||||
List<ApiScenario> selectByTagId(@Param("id") String id);
|
||||
List<ApiScenarioWithBLOBs> selectByTagId(@Param("id") String id);
|
||||
|
||||
List<ApiScenario> selectIds(@Param("ids") List<String> ids);
|
||||
List<ApiScenarioWithBLOBs> selectIds(@Param("ids") List<String> ids);
|
||||
|
||||
List<ApiScenario> selectReference(@Param("request") ApiScenarioRequest request);
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenario">
|
||||
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
select * from api_scenario where tag_id like CONCAT('%', #{id},'%')
|
||||
</select>
|
||||
|
||||
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenario">
|
||||
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||
select * from api_scenario where id in
|
||||
<foreach collection="ids" item="v" separator="," open="(" close=")">
|
||||
#{v}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -11,7 +10,7 @@ import java.util.List;
|
|||
public interface ExtApiScenarioReportMapper {
|
||||
List<APIScenarioReportResult> list(@Param("request") QueryAPIReportRequest request);
|
||||
|
||||
APIReportResult get(@Param("reportId") String reportId);
|
||||
APIScenarioReportResult get(@Param("reportId") String reportId);
|
||||
|
||||
@Select("SELECT count(id) AS countNumber FROM api_scenario_report WHERE project_id = #{0} ")
|
||||
long countByProjectID(String projectId);
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
AND r.status != 'Debug'
|
||||
AND r.execute_type = 'Saved'
|
||||
</where>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
|
@ -155,7 +155,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="get" resultType="io.metersphere.api.dto.APIReportResult">
|
||||
<select id="get" resultType="io.metersphere.api.dto.automation.APIScenarioReportResult">
|
||||
SELECT r.*,r.id As testId, r.name AS test_name, project.name AS project_name, user.name AS user_name
|
||||
FROM api_scenario_report r
|
||||
LEFT JOIN project ON project.id = r.project_id
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE api_scenario_report ADD execute_type varchar(200) NULL;
|
||||
ALTER TABLE api_definition MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test description';
|
||||
ALTER TABLE api_test_case MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test case description';
|
||||
ALTER TABLE api_scenario MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario description';
|
||||
ALTER TABLE api_scenario_report MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario report description';
|
|
@ -103,6 +103,7 @@
|
|||
if (this.isNotRunning) {
|
||||
try {
|
||||
this.content = JSON.parse(this.report.content);
|
||||
this.$emit('refresh');
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<el-col :span="5">
|
||||
<el-tooltip effect="dark" :content="request.responseResult.responseCode" placement="bottom" :open-delay="800">
|
||||
<div style="color: #5daf34" v-if="request.responseResult.responseCode==='200'">{{ request.responseResult.responseCode }}</div>
|
||||
<div style="color: #5daf34" v-if="request.success">{{ request.responseResult.responseCode }}</div>
|
||||
<div style="color: #FE6F71" v-else>{{ request.responseResult.responseCode }}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
|
|
|
@ -199,6 +199,7 @@
|
|||
let scenarioIds = this.selection;
|
||||
run.id = getUUID();
|
||||
run.scenarioIds = scenarioIds;
|
||||
run.projectId = getCurrentProjectID();
|
||||
this.$post(url, run, response => {
|
||||
let data = response.data;
|
||||
this.runVisible = true;
|
||||
|
@ -233,6 +234,7 @@
|
|||
let scenarioIds = [];
|
||||
scenarioIds.push(row.id);
|
||||
run.id = getUUID();
|
||||
run.projectId = getCurrentProjectID();
|
||||
run.scenarioIds = scenarioIds;
|
||||
this.$post(url, run, response => {
|
||||
let data = response.data;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div></div>
|
||||
</template>
|
||||
<script>
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||
import {createComponent} from "../../definition/components/jmeter/components";
|
||||
|
||||
export default {
|
||||
|
@ -96,7 +96,7 @@
|
|||
threadGroup.enableCookieShare = this.runData.enableCookieShare;
|
||||
threadGroup.hashTree.push(this.runData);
|
||||
testPlan.hashTree.push(threadGroup);
|
||||
let reqObj = {id: this.reportId, reportId: this.reportId, environmentId: this.environment, testElement: testPlan};
|
||||
let reqObj = {id: this.reportId, reportId: this.reportId, environmentId: this.environment, testElement: testPlan, projectId: getCurrentProjectID()};
|
||||
let bodyFiles = this.getBodyUploadFiles(reqObj);
|
||||
let url = "/api/automation/run/debug";
|
||||
this.$fileUpload(url, null, bodyFiles, reqObj, response => {
|
||||
|
|
|
@ -1,124 +1,127 @@
|
|||
<template>
|
||||
<el-card class="card-content">
|
||||
<div class="ms-main-div" @click="showAll">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<!--操作按钮-->
|
||||
<div class="ms-opt-btn">
|
||||
<el-button type="primary" size="small" @click="editScenario">{{$t('commons.save')}}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="tip">{{$t('test_track.plan_view.base_info')}}</div>
|
||||
<el-form :model="currentScenario" label-position="right" label-width="80px" size="small" :rules="rules" ref="currentScenario" style="margin-right: 20px">
|
||||
<!-- 基础信息 -->
|
||||
<div>
|
||||
<div class="ms-main-div" @click="showAll">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input class="ms-scenario-input" size="small" v-model="currentScenario.name"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.apiScenarioModuleId">
|
||||
<el-option v-for="item in moduleOptions" :key="item.id" :label="item.path" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-col>
|
||||
<!--操作按钮-->
|
||||
<div class="ms-opt-btn">
|
||||
<el-button type="primary" size="small" @click="editScenario">{{$t('commons.save')}}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.status')" prop="status">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.status">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
||||
<el-select v-model="currentScenario.principal"
|
||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||
class="ms-scenario-input">
|
||||
<el-option
|
||||
v-for="item in maintainerOptions"
|
||||
:key="item.id"
|
||||
:label="item.id + ' (' + item.name + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="tip">{{$t('test_track.plan_view.base_info')}}</div>
|
||||
<el-form :model="currentScenario" label-position="right" label-width="80px" size="small" :rules="rules" ref="currentScenario" style="margin-right: 20px">
|
||||
<!-- 基础信息 -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input class="ms-scenario-input" size="small" v-model="currentScenario.name"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.apiScenarioModuleId">
|
||||
<el-option v-for="item in moduleOptions" :key="item.id" :label="item.path" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.status')" prop="status">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.status">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
||||
<el-select v-model="currentScenario.principal"
|
||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||
class="ms-scenario-input">
|
||||
<el-option
|
||||
v-for="item in maintainerOptions"
|
||||
:key="item.id"
|
||||
:label="item.id + ' (' + item.name + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.level">
|
||||
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('api_test.automation.follow_people')" prop="followPeople">
|
||||
<el-select v-model="currentScenario.followPeople"
|
||||
:placeholder="$t('api_test.automation.follow_people')" filterable size="small"
|
||||
class="ms-scenario-input">
|
||||
<el-option
|
||||
v-for="item in maintainerOptions"
|
||||
:key="item.id"
|
||||
:label="item.id + ' (' + item.name + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
||||
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.level">
|
||||
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('api_test.automation.follow_people')" prop="followPeople">
|
||||
<el-select v-model="currentScenario.followPeople"
|
||||
:placeholder="$t('api_test.automation.follow_people')" filterable size="small"
|
||||
class="ms-scenario-input">
|
||||
<el-option
|
||||
v-for="item in maintainerOptions"
|
||||
:key="item.id"
|
||||
:label="item.id + ' (' + item.name + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="Tag" prop="tagId">
|
||||
<el-select v-model="currentScenario.tagId" size="small" class="ms-scenario-input" placeholder="Tag" :multiple="true">
|
||||
<el-option
|
||||
v-for="item in tags"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"/>
|
||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
||||
{{ $t('api_test.automation.create_tag') }}
|
||||
</el-button>
|
||||
<template v-slot:empty>
|
||||
<div>
|
||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
||||
{{ $t('api_test.automation.create_tag') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-select>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="Tag" prop="tagId">
|
||||
<el-select v-model="currentScenario.tagId" size="small" class="ms-scenario-input" placeholder="Tag" :multiple="true">
|
||||
<el-option
|
||||
v-for="item in tags"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"/>
|
||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
||||
{{ $t('api_test.automation.create_tag') }}
|
||||
</el-button>
|
||||
<template v-slot:empty>
|
||||
<div>
|
||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
||||
{{ $t('api_test.automation.create_tag') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.description')" prop="description">
|
||||
<el-input class="ms-http-textarea"
|
||||
v-model="currentScenario.description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 10}"
|
||||
:rows="2" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('commons.description')" prop="description">
|
||||
<el-input class="ms-http-textarea"
|
||||
v-model="currentScenario.description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 10}"
|
||||
:rows="2" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 场景步骤-->
|
||||
<div v-loading="loading">
|
||||
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
||||
<div @click="showAll">
|
||||
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="21">
|
||||
<!-- 调试部分 -->
|
||||
<div class="ms-debug-div">
|
||||
<div class="ms-debug-div" @click="showAll">
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="ms-col-one">
|
||||
{{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}}
|
||||
|
|
|
@ -844,6 +844,7 @@ export class JSR223Processor extends BaseConfig {
|
|||
this.script = undefined;
|
||||
this.language = "beanshell";
|
||||
this.enable = true;
|
||||
this.hashTree = [];
|
||||
this.set(options);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ export default {
|
|||
try {
|
||||
this.content = JSON.parse(this.report.content);
|
||||
} catch (e) {
|
||||
// console.log(this.report.content)
|
||||
// console.log(this.report.scenarioDefinition)
|
||||
throw e;
|
||||
}
|
||||
this.getFails();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433
|
||||
Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c
|
Loading…
Reference in New Issue