Merge branch 'master' into temp
# Conflicts: # frontend/src/i18n/en-US.js # frontend/src/i18n/zh-CN.js # frontend/src/i18n/zh-TW.js
This commit is contained in:
commit
ba7fb40f42
|
@ -541,6 +541,11 @@
|
|||
<include name="*.html"/>
|
||||
</fileset>
|
||||
</move>
|
||||
<copy todir="src/main/resources/static/css">
|
||||
<fileset dir="../frontend/src/assets/theme">
|
||||
<include name="index.css"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
|
@ -15,6 +15,7 @@ import io.metersphere.api.service.*;
|
|||
import io.metersphere.base.domain.ApiTest;
|
||||
import io.metersphere.base.domain.Schedule;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.constants.ScheduleGroup;
|
||||
import io.metersphere.commons.utils.CronUtils;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -25,18 +26,17 @@ import io.metersphere.dto.ScheduleDao;
|
|||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.service.CheckPermissionService;
|
||||
import io.metersphere.service.ScheduleService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.python.core.AstList;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import static io.metersphere.commons.utils.JsonPathUtils.getListJson;
|
||||
|
||||
|
@ -343,10 +343,17 @@ public class APITestController {
|
|||
return returnList;
|
||||
}
|
||||
|
||||
@GetMapping("/runningTask/{projectID}")
|
||||
public List<TaskInfoResult> runningTask(@PathVariable String projectID) {
|
||||
|
||||
List<TaskInfoResult> resultList = scheduleService.findRunningTaskInfoByProjectID(projectID);
|
||||
@GetMapping("/runningTask/{projectID}/{callFrom}")
|
||||
public List<TaskInfoResult> runningTask(@PathVariable String projectID, @PathVariable String callFrom) {
|
||||
List<String> typeFilter = new ArrayList<>();
|
||||
if(StringUtils.equals(callFrom, "api_test")) { // 接口测试首页显示的运行中定时任务,只要这3种,不需要 性能测试、api_test(旧版)
|
||||
typeFilter.add(ScheduleGroup.API_SCENARIO_TEST.name());
|
||||
typeFilter.add(ScheduleGroup.SWAGGER_IMPORT.name());
|
||||
typeFilter.add(ScheduleGroup.TEST_PLAN_TEST.name());
|
||||
} else if(StringUtils.equals(callFrom, "track_home")) { // 测试跟踪首页只显示测试计划的定时任务
|
||||
typeFilter.add(ScheduleGroup.TEST_PLAN_TEST.name());
|
||||
}
|
||||
List<TaskInfoResult> resultList = scheduleService.findRunningTaskInfoByProjectID(projectID, typeFilter);
|
||||
int dataIndex = 1;
|
||||
for (TaskInfoResult taskInfo :
|
||||
resultList) {
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@GetMapping("/getApiScenario/{id}")
|
||||
public ApiScenario getScenarioDefinition(@PathVariable String id) {
|
||||
public ApiScenarioDTO getScenarioDefinition(@PathVariable String id) {
|
||||
return apiAutomationService.getApiScenario(id);
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,11 @@ public class ApiAutomationController {
|
|||
apiAutomationService.relevance(request);
|
||||
}
|
||||
|
||||
@PostMapping("/relevance/review")
|
||||
public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){
|
||||
apiAutomationService.relevanceReview(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/schedule/update")
|
||||
public void updateSchedule(@RequestBody Schedule request) {
|
||||
apiAutomationService.updateSchedule(request);
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -58,6 +59,12 @@ public class ApiDefinitionController {
|
|||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return PageUtils.setPageInfo(page, apiDefinitionService.listRelevance(request));
|
||||
}
|
||||
@PostMapping("/list/relevance/review/{goPage}/{pageSize}")
|
||||
public Pager<List<ApiDefinitionResult>> listRelevanceReview(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiDefinitionRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return PageUtils.setPageInfo(page, apiDefinitionService.listRelevanceReview(request));
|
||||
}
|
||||
|
||||
@PostMapping("/list/all")
|
||||
public List<ApiDefinitionResult> list(@RequestBody ApiDefinitionRequest request) {
|
||||
|
@ -157,7 +164,7 @@ public class ApiDefinitionController {
|
|||
|
||||
//定时任务创建
|
||||
@PostMapping(value = "/schedule/create")
|
||||
public void createSchedule(@RequestBody ScheduleRequest request) {
|
||||
public void createSchedule(@RequestBody ScheduleRequest request) throws MalformedURLException {
|
||||
apiDefinitionService.createSchedule(request);
|
||||
}
|
||||
@PostMapping(value = "/schedule/update")
|
||||
|
@ -217,6 +224,10 @@ public class ApiDefinitionController {
|
|||
public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) {
|
||||
apiDefinitionService.testPlanRelevance(request);
|
||||
}
|
||||
@PostMapping("/relevance/review")
|
||||
public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){
|
||||
apiDefinitionService.testCaseReviewRelevance(request);
|
||||
}
|
||||
|
||||
@PostMapping("/preview")
|
||||
public String preview(@RequestBody String jsonSchema) {
|
||||
|
|
|
@ -120,6 +120,10 @@ public class ApiTestCaseController {
|
|||
public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) {
|
||||
apiTestCaseService.relevanceByCase(request);
|
||||
}
|
||||
@PostMapping("/relevance/review")
|
||||
public void testCaseReviewRelevance(@RequestBody ApiCaseRelevanceRequest request){
|
||||
apiTestCaseService.relevanceByApiByReview(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/jenkins/run")
|
||||
public String jenkinsRun(@RequestBody RunCaseRequest request) {
|
||||
|
|
|
@ -18,4 +18,6 @@ public class ApiScenarioDTO extends ApiScenarioWithBLOBs {
|
|||
* 场景跨项目ID
|
||||
*/
|
||||
private List<String> projectIds;
|
||||
|
||||
private String caseId;
|
||||
}
|
||||
|
|
|
@ -22,4 +22,5 @@ public class ApiScenarioRequest extends BaseQueryRequest {
|
|||
private long createTime = 0;
|
||||
private String executeStatus;
|
||||
private boolean notInTestPlan;
|
||||
private String reviewId;
|
||||
}
|
||||
|
|
|
@ -25,4 +25,5 @@ public class TestPlanScenarioRequest {
|
|||
private Map<String, List<String>> filters;
|
||||
private Map<String, Object> combine;
|
||||
private List<String> ids;
|
||||
private String reviewId;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
|||
}
|
||||
}
|
||||
}
|
||||
samplerProxy.setPath(source.getPath());
|
||||
samplerProxy.setPath("");
|
||||
samplerProxy.setMethod(source.getMethod());
|
||||
if (source.getUrl() != null) {
|
||||
samplerProxy.setUrl(source.getUrl().toString());
|
||||
|
|
|
@ -29,5 +29,7 @@ public class TaskInfoResult {
|
|||
private Long updateTime;
|
||||
//定时任务类型 情景定时任务/范围计划任务
|
||||
private String taskType;
|
||||
//定时任务组别 swagger/scenario/testPlan 等
|
||||
private String taskGroup;
|
||||
|
||||
}
|
||||
|
|
|
@ -20,4 +20,5 @@ public class ApiDefinitionRequest extends BaseQueryRequest {
|
|||
private long createTime = 0;
|
||||
private String status;
|
||||
private String apiCaseCoverage;
|
||||
private String reviewId;
|
||||
}
|
||||
|
|
|
@ -27,4 +27,5 @@ public class ApiTestCaseRequest {
|
|||
private Map<String, Object> combine;
|
||||
private boolean isSelectThisWeedData;
|
||||
private long createTime = 0;
|
||||
private String reviewId;
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@ public class MsDefinitionParser extends MsAbstractParser<ApiDefinitionImport> {
|
|||
String testStr = getApiTestStr(source);
|
||||
JSONObject testObject = JSONObject.parseObject(testStr, Feature.OrderedField);
|
||||
this.projectId = request.getProjectId();
|
||||
if (testObject.get("projectName") != null || testObject.get("projectId") != null ) {
|
||||
if (testObject.get("projectName") != null || testObject.get("projectId") != null ) {// metersphere 格式导入
|
||||
return parseMsFormat(testStr, request);
|
||||
} else {
|
||||
} else { // chrome 插件录制格式导入
|
||||
request.setPlatform(ApiImportPlatform.Plugin.name());
|
||||
ApiDefinitionImport apiImport = new ApiDefinitionImport();
|
||||
apiImport.setProtocol(RequestType.HTTP);
|
||||
|
|
|
@ -137,7 +137,7 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
|
||||
private String getBodyType(Operation operation) {
|
||||
if (CollectionUtils.isEmpty(operation.getConsumes())) {
|
||||
return Body.RAW;
|
||||
return Body.JSON;
|
||||
}
|
||||
String contentType = operation.getConsumes().get(0);
|
||||
return getBodyType(contentType);
|
||||
|
@ -238,14 +238,12 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
return propertyList.toString();
|
||||
} else if (schema instanceof ModelImpl) {
|
||||
ModelImpl model = (ModelImpl) schema;
|
||||
if (StringUtils.equals("object", model.getType())) {
|
||||
model.getProperties();
|
||||
if (model != null) {
|
||||
JSONObject bodyParameters = getBodyParameters(model.getProperties(), new HashSet<>());
|
||||
Map<String, Property> properties = model.getProperties();
|
||||
if (model != null && properties != null) {
|
||||
JSONObject bodyParameters = getBodyParameters(properties, new HashSet<>());
|
||||
return bodyParameters.toJSONString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,12 @@ public class MsJSR223Processor extends MsTestElement {
|
|||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
processor.setProperty("scriptLanguage", this.getScriptLanguage());
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("nashornScript")) {
|
||||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("graalVMScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
}
|
||||
processor.setProperty("script", this.getScript());
|
||||
|
||||
final HashTree jsr223PreTree = tree.add(processor);
|
||||
|
|
|
@ -40,6 +40,12 @@ public class MsJSR223PostProcessor extends MsTestElement {
|
|||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
processor.setProperty("scriptLanguage", this.getScriptLanguage());
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("nashornScript")) {
|
||||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("graalVMScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
}
|
||||
processor.setProperty("script", this.getScript());
|
||||
|
||||
final HashTree jsr223PostTree = tree.add(processor);
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.jmeter.modifiers.JSR223PreProcessor;
|
|||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.graalvm.polyglot.Context;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -38,6 +39,8 @@ public class MsJSR223PreProcessor extends MsTestElement {
|
|||
}
|
||||
|
||||
public JSR223PreProcessor getJSR223PreProcessor() {
|
||||
Context.newBuilder().allowNativeAccess(true).build();
|
||||
|
||||
JSR223PreProcessor processor = new JSR223PreProcessor();
|
||||
processor.setEnabled(this.isEnable());
|
||||
if (StringUtils.isNotEmpty(this.getName())) {
|
||||
|
@ -49,6 +52,13 @@ public class MsJSR223PreProcessor extends MsTestElement {
|
|||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
processor.setProperty("scriptLanguage", this.getScriptLanguage());
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("nashornScript")) {
|
||||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("graalVMScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
}
|
||||
|
||||
processor.setProperty("script", this.getScript());
|
||||
return processor;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
URL urlObject = new URL(url);
|
||||
if (isUrl) {
|
||||
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));
|
||||
if (urlObject.getPort() > 0) {
|
||||
sampler.setPort(urlObject.getPort());
|
||||
}
|
||||
sampler.setProtocol(urlObject.getProtocol());
|
||||
} else {
|
||||
sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain());
|
||||
|
|
|
@ -98,7 +98,7 @@ public class APITestService {
|
|||
checkQuota();
|
||||
request.setBodyUploadIds(null);
|
||||
ApiTest test = createTest(request);
|
||||
saveFile(test.getId(), file);
|
||||
saveFile(test, file);
|
||||
return test;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class APITestService {
|
|||
request.setBodyUploadIds(null);
|
||||
ApiTest test = updateTest(request);
|
||||
createBodyFiles(test, bodyUploadIds, bodyFiles);
|
||||
saveFile(test.getId(), file);
|
||||
saveFile(test, file);
|
||||
}
|
||||
|
||||
private void createBodyFiles(ApiTest test, List<String> bodyUploadIds, List<MultipartFile> bodyFiles) {
|
||||
|
@ -292,10 +292,10 @@ public class APITestService {
|
|||
return test;
|
||||
}
|
||||
|
||||
private void saveFile(String testId, MultipartFile file) {
|
||||
final FileMetadata fileMetadata = fileService.saveFile(file);
|
||||
private void saveFile(ApiTest apiTest, MultipartFile file) {
|
||||
final FileMetadata fileMetadata = fileService.saveFile(file, apiTest.getProjectId());
|
||||
ApiTestFile apiTestFile = new ApiTestFile();
|
||||
apiTestFile.setTestId(testId);
|
||||
apiTestFile.setTestId(apiTest.getId());
|
||||
apiTestFile.setFileId(fileMetadata.getId());
|
||||
apiTestFileMapper.insert(apiTestFile);
|
||||
}
|
||||
|
@ -339,6 +339,8 @@ public class APITestService {
|
|||
schedule.setJob(ApiTestJob.class.getName());
|
||||
schedule.setGroup(ScheduleGroup.API_TEST.name());
|
||||
schedule.setType(ScheduleType.CRON.name());
|
||||
schedule.setProjectId(request.getProjectId());
|
||||
schedule.setName(request.getName());
|
||||
return schedule;
|
||||
}
|
||||
|
||||
|
@ -530,12 +532,12 @@ public class APITestService {
|
|||
|
||||
//处理附件
|
||||
Map<String, String> attachmentFiles = new HashMap<>();
|
||||
int fileIndex = 0;
|
||||
|
||||
for (String filePath: attachmentFilePathList) {
|
||||
File file = new File(filePath);
|
||||
if(file.exists() && file.isFile()){
|
||||
try{
|
||||
FileMetadata fileMetadata = fileService.saveFile(file,FileUtil.readAsByteArray(file),fileIndex++);
|
||||
FileMetadata fileMetadata = fileService.saveFile(file,FileUtil.readAsByteArray(file));
|
||||
attachmentFiles.put(fileMetadata.getId(),fileMetadata.getName());
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -23,11 +23,9 @@ import io.metersphere.api.parse.ApiImportParser;
|
|||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||
import io.metersphere.base.mapper.ApiScenarioReportMapper;
|
||||
import io.metersphere.base.mapper.TestCaseReviewScenarioMapper;
|
||||
import io.metersphere.base.mapper.TestPlanApiScenarioMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanApiCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanScenarioCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.*;
|
||||
import io.metersphere.commons.constants.*;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.*;
|
||||
|
@ -63,6 +61,8 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ApiAutomationService {
|
||||
@Resource
|
||||
private ExtScheduleMapper extScheduleMapper;
|
||||
@Resource
|
||||
private ApiScenarioMapper apiScenarioMapper;
|
||||
@Resource
|
||||
|
@ -72,6 +72,8 @@ public class ApiAutomationService {
|
|||
@Resource
|
||||
private TestPlanApiScenarioMapper testPlanApiScenarioMapper;
|
||||
@Resource
|
||||
private TestCaseReviewScenarioMapper testCaseReviewScenarioMapper;
|
||||
@Resource
|
||||
private JMeterService jMeterService;
|
||||
@Resource
|
||||
private ApiTestEnvironmentService environmentService;
|
||||
|
@ -92,13 +94,17 @@ public class ApiAutomationService {
|
|||
public List<ApiScenarioDTO> list(ApiScenarioRequest request) {
|
||||
request = this.initRequest(request, true, true);
|
||||
List<ApiScenarioDTO> list = extApiScenarioMapper.list(request);
|
||||
setApiScenarioProjectIds(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
private void setApiScenarioProjectIds(List<ApiScenarioDTO> list) {
|
||||
public List<ApiScenarioDTO> listReview(ApiScenarioRequest request) {
|
||||
request = this.initRequest(request, true, true);
|
||||
List<ApiScenarioDTO> list = extApiScenarioMapper.listReview(request);
|
||||
return list;
|
||||
}
|
||||
|
||||
private void setApiScenarioProjectIds(ApiScenarioDTO data) {
|
||||
// 如果场景步骤涉及多项目,则把涉及到的项目ID保存在projectIds属性
|
||||
list.forEach(data -> {
|
||||
List<String> idList = new ArrayList<>();
|
||||
String definition = data.getScenarioDefinition();
|
||||
if (StringUtils.isNotBlank(definition)) {
|
||||
|
@ -122,7 +128,6 @@ public class ApiAutomationService {
|
|||
|
||||
}
|
||||
data.setProjectIds(idList);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -196,6 +201,7 @@ public class ApiAutomationService {
|
|||
|
||||
final ApiScenarioWithBLOBs scenario = buildSaveScenario(request);
|
||||
apiScenarioMapper.updateByPrimaryKeySelective(scenario);
|
||||
extScheduleMapper.updateNameByResourceID(request.getId(), request.getName());// 修改场景name,同步到修改首页定时任务
|
||||
}
|
||||
|
||||
public ApiScenarioWithBLOBs buildSaveScenario(SaveApiScenarioRequest request) {
|
||||
|
@ -325,8 +331,15 @@ public class ApiAutomationService {
|
|||
}
|
||||
}
|
||||
|
||||
public ApiScenarioWithBLOBs getApiScenario(String id) {
|
||||
return apiScenarioMapper.selectByPrimaryKey(id);
|
||||
public ApiScenarioDTO getApiScenario(String id) {
|
||||
ApiScenarioDTO apiScenarioDTO = new ApiScenarioDTO();
|
||||
ApiScenarioWithBLOBs scenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id);
|
||||
if (scenarioWithBLOBs != null) {
|
||||
BeanUtils.copyBean(apiScenarioDTO, scenarioWithBLOBs);
|
||||
setApiScenarioProjectIds(apiScenarioDTO);
|
||||
return apiScenarioDTO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<ApiScenarioWithBLOBs> getApiScenarios(List<String> ids) {
|
||||
|
@ -706,6 +719,33 @@ public class ApiAutomationService {
|
|||
});
|
||||
}
|
||||
|
||||
public void relevanceReview(ApiCaseRelevanceRequest request) {
|
||||
Map<String, List<String>> mapping = request.getMapping();
|
||||
Map<String, String> envMap = request.getEnvMap();
|
||||
Set<String> set = mapping.keySet();
|
||||
if (set.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
set.forEach(id -> {
|
||||
Map<String, String> newEnvMap = new HashMap<>(16);
|
||||
if (envMap != null && !envMap.isEmpty()) {
|
||||
List<String> list = mapping.get(id);
|
||||
list.forEach(l -> {
|
||||
newEnvMap.put(l, envMap.get(l));
|
||||
});
|
||||
}
|
||||
TestCaseReviewScenario testCaseReviewScenario = new TestCaseReviewScenario();
|
||||
testCaseReviewScenario.setId(UUID.randomUUID().toString());
|
||||
testCaseReviewScenario.setApiScenarioId(id);
|
||||
testCaseReviewScenario.setTestCaseReviewId(request.getReviewId());
|
||||
testCaseReviewScenario.setCreateTime(System.currentTimeMillis());
|
||||
testCaseReviewScenario.setUpdateTime(System.currentTimeMillis());
|
||||
testCaseReviewScenario.setEnvironment(JSON.toJSONString(newEnvMap));
|
||||
testCaseReviewScenarioMapper.insert(testCaseReviewScenario);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public List<ApiScenario> selectByIds(List<String> ids) {
|
||||
ApiScenarioExample example = new ApiScenarioExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
|
@ -720,6 +760,9 @@ public class ApiAutomationService {
|
|||
|
||||
public void createSchedule(ScheduleRequest request) {
|
||||
Schedule schedule = scheduleService.buildApiTestSchedule(request);
|
||||
ApiScenarioWithBLOBs apiScene = apiScenarioMapper.selectByPrimaryKey(request.getResourceId());
|
||||
schedule.setName(apiScene.getName()); // add场景定时任务时,设置新增的数据库表字段的值
|
||||
schedule.setProjectId(apiScene.getProjectId());
|
||||
schedule.setJob(ApiScenarioTestJob.class.getName());
|
||||
schedule.setGroup(ScheduleGroup.API_SCENARIO_TEST.name());
|
||||
schedule.setType(ScheduleType.CRON.name());
|
||||
|
|
|
@ -15,6 +15,7 @@ import io.metersphere.commons.utils.DateUtils;
|
|||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.track.dto.TestPlanDTO;
|
||||
import io.metersphere.track.request.testcase.QueryTestPlanRequest;
|
||||
import io.metersphere.track.service.TestCaseReviewApiCaseService;
|
||||
import io.metersphere.track.service.TestPlanApiCaseService;
|
||||
import io.metersphere.track.service.TestPlanService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
@ -41,6 +42,8 @@ public class ApiDefinitionExecResultService {
|
|||
private TestPlanService testPlanService;
|
||||
@Resource
|
||||
private ApiTestCaseMapper apiTestCaseMapper;
|
||||
@Resource
|
||||
private TestCaseReviewApiCaseService testCaseReviewApiCaseService;
|
||||
|
||||
@Resource
|
||||
SqlSessionFactory sqlSessionFactory;
|
||||
|
@ -67,6 +70,8 @@ public class ApiDefinitionExecResultService {
|
|||
saveResult.setStatus(status);
|
||||
if (StringUtils.equals(type, ApiRunMode.API_PLAN.name())) {
|
||||
testPlanApiCaseService.setExecResult(item.getName(), status);
|
||||
testCaseReviewApiCaseService.setExecResult(item.getName(), status);
|
||||
|
||||
}
|
||||
// 更新用例最后执行结果
|
||||
ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = new ApiTestCaseWithBLOBs();
|
||||
|
@ -118,6 +123,7 @@ public class ApiDefinitionExecResultService {
|
|||
} else {
|
||||
userID = Objects.requireNonNull(SessionUtils.getUser()).getId();
|
||||
testPlanApiCaseService.setExecResult(item.getName(), status);
|
||||
testCaseReviewApiCaseService.setExecResult(item.getName(), status);
|
||||
}
|
||||
|
||||
saveResult.setUserId(userID);
|
||||
|
|
|
@ -49,6 +49,7 @@ import sun.security.util.Cache;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -215,7 +216,7 @@ public class ApiDefinitionService {
|
|||
ApiDefinitionExample example = new ApiDefinitionExample();
|
||||
if (request.getProtocol().equals(RequestType.HTTP)) {
|
||||
example.createCriteria().andMethodEqualTo(request.getMethod()).andStatusNotEqualTo("Trash")
|
||||
.andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath())
|
||||
.andPathEqualTo(request.getPath())
|
||||
.andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
||||
return apiDefinitionMapper.selectByExample(example);
|
||||
} else {
|
||||
|
@ -590,6 +591,10 @@ public class ApiDefinitionService {
|
|||
apiTestCaseService.relevanceByApi(request);
|
||||
}
|
||||
|
||||
public void testCaseReviewRelevance(ApiCaseRelevanceRequest request) {
|
||||
apiTestCaseService.relevanceByApiByReview(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据统计-接口类型
|
||||
*
|
||||
|
@ -674,6 +679,12 @@ public class ApiDefinitionService {
|
|||
calculateResult(resList);
|
||||
return resList;
|
||||
}
|
||||
public List<ApiDefinitionResult> listRelevanceReview(ApiDefinitionRequest request) {
|
||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
List<ApiDefinitionResult> resList = extApiDefinitionMapper.listRelevanceReview(request);
|
||||
calculateResult(resList);
|
||||
return resList;
|
||||
}
|
||||
|
||||
public void calculateResult(List<ApiDefinitionResult> resList) {
|
||||
if (!resList.isEmpty()) {
|
||||
|
@ -703,7 +714,7 @@ public class ApiDefinitionService {
|
|||
}
|
||||
|
||||
/*swagger定时导入*/
|
||||
public void createSchedule(ScheduleRequest request) {
|
||||
public void createSchedule(ScheduleRequest request) throws MalformedURLException {
|
||||
/*保存swaggerUrl*/
|
||||
SwaggerUrlProject swaggerUrlProject = new SwaggerUrlProject();
|
||||
swaggerUrlProject.setId(UUID.randomUUID().toString());
|
||||
|
@ -715,6 +726,9 @@ public class ApiDefinitionService {
|
|||
scheduleService.addSwaggerUrlSchedule(swaggerUrlProject);
|
||||
request.setResourceId(swaggerUrlProject.getId());
|
||||
Schedule schedule = scheduleService.buildApiTestSchedule(request);
|
||||
schedule.setProjectId(swaggerUrlProject.getProjectId());
|
||||
java.net.URL swaggerUrl = new java.net.URL(swaggerUrlProject.getSwaggerUrl());
|
||||
schedule.setName(swaggerUrl.getHost()); // swagger 定时任务的 name 设置为 swaggerURL 的域名
|
||||
schedule.setJob(SwaggerUrlImportJob.class.getName());
|
||||
schedule.setGroup(ScheduleGroup.SWAGGER_IMPORT.name());
|
||||
schedule.setType(ScheduleType.CRON.name());
|
||||
|
|
|
@ -112,7 +112,9 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
|
|||
apiModuleDTO.setName(name);
|
||||
apiModuleDTO.setLabel(name);
|
||||
apiModuleDTO.setChildren(nodeList);
|
||||
if (!org.springframework.util.CollectionUtils.isEmpty(nodeList)) {
|
||||
list.add(apiModuleDTO);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,9 @@ public class ApiScenarioModuleService extends NodeTreeService<ApiScenarioModuleD
|
|||
scenarioModuleDTO.setName(name);
|
||||
scenarioModuleDTO.setLabel(name);
|
||||
scenarioModuleDTO.setChildren(nodeList);
|
||||
if (!org.springframework.util.CollectionUtils.isEmpty(nodeList)) {
|
||||
list.add(scenarioModuleDTO);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -18,10 +18,7 @@ import io.metersphere.api.dto.scenario.request.RequestType;
|
|||
import io.metersphere.api.jmeter.JMeterService;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.*;
|
||||
import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtApiTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanApiCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.*;
|
||||
import io.metersphere.commons.constants.TestPlanStatus;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.*;
|
||||
|
@ -53,6 +50,8 @@ public class ApiTestCaseService {
|
|||
@Resource
|
||||
TestPlanMapper testPlanMapper;
|
||||
@Resource
|
||||
TestCaseReviewMapper testCaseReviewMapper;
|
||||
@Resource
|
||||
private ApiTestCaseMapper apiTestCaseMapper;
|
||||
@Resource
|
||||
private SqlSessionFactory sqlSessionFactory;
|
||||
|
@ -313,7 +312,16 @@ public class ApiTestCaseService {
|
|||
List<ApiTestCase> apiTestCases = apiTestCaseMapper.selectByExample(example);
|
||||
relevance(apiTestCases, request);
|
||||
}
|
||||
|
||||
public void relevanceByApiByReview(ApiCaseRelevanceRequest request){
|
||||
List<String> ids = request.getSelectIds();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
List<ApiTestCase> apiTestCases = apiTestCaseMapper.selectByExample(example);
|
||||
relevanceByReview(apiTestCases, request);
|
||||
}
|
||||
public void relevanceByCase(ApiCaseRelevanceRequest request) {
|
||||
List<String> ids = request.getSelectIds();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
|
@ -350,9 +358,33 @@ public class ApiTestCaseService {
|
|||
sqlSession.flushStatements();
|
||||
}
|
||||
|
||||
private void relevanceByReview(List<ApiTestCase> apiTestCases, ApiCaseRelevanceRequest request) {
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
ExtTestCaseReviewApiCaseMapper batchMapper = sqlSession.getMapper(ExtTestCaseReviewApiCaseMapper.class);
|
||||
apiTestCases.forEach(apiTestCase -> {
|
||||
TestCaseReviewApiCase TestCaseReviewApiCase = new TestCaseReviewApiCase();
|
||||
TestCaseReviewApiCase.setId(UUID.randomUUID().toString());
|
||||
TestCaseReviewApiCase.setApiCaseId(apiTestCase.getId());
|
||||
TestCaseReviewApiCase.setTestCaseReviewId(request.getReviewId());
|
||||
TestCaseReviewApiCase.setEnvironmentId(request.getEnvironmentId());
|
||||
TestCaseReviewApiCase.setCreateTime(System.currentTimeMillis());
|
||||
TestCaseReviewApiCase.setUpdateTime(System.currentTimeMillis());
|
||||
batchMapper.insertIfNotExists(TestCaseReviewApiCase);
|
||||
});
|
||||
TestCaseReview testCaseReview=testCaseReviewMapper.selectByPrimaryKey(request.getReviewId());
|
||||
if (StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Prepare.name())
|
||||
|| StringUtils.equals(testCaseReview.getStatus(), TestPlanStatus.Completed.name())) {
|
||||
testCaseReview.setStatus(TestPlanStatus.Underway.name());
|
||||
testCaseReviewMapper.updateByPrimaryKey(testCaseReview);
|
||||
}
|
||||
sqlSession.flushStatements();
|
||||
}
|
||||
public List<String> selectIdsNotExistsInPlan(String projectId, String planId) {
|
||||
return extApiTestCaseMapper.selectIdsNotExistsInPlan(projectId, planId);
|
||||
}
|
||||
public List<String> selectIdsNotExistsInReview(String projectId,String reviewId){
|
||||
return extApiTestCaseMapper.selectIdsNotExistsInReview(projectId,reviewId);
|
||||
}
|
||||
|
||||
public List<ApiDataCountResult> countProtocolByProjectID(String projectId) {
|
||||
return extApiTestCaseMapper.countProtocolByProjectID(projectId);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FileMetadata implements Serializable {
|
||||
|
@ -18,7 +17,7 @@ public class FileMetadata implements Serializable {
|
|||
|
||||
private Long size;
|
||||
|
||||
private Integer sort;
|
||||
private String projectId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -494,63 +494,73 @@ public class FileMetadataExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNull() {
|
||||
addCriterion("sort is null");
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNotNull() {
|
||||
addCriterion("sort is not null");
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortEqualTo(Integer value) {
|
||||
addCriterion("sort =", value, "sort");
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotEqualTo(Integer value) {
|
||||
addCriterion("sort <>", value, "sort");
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThan(Integer value) {
|
||||
addCriterion("sort >", value, "sort");
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort >=", value, "sort");
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThan(Integer value) {
|
||||
addCriterion("sort <", value, "sort");
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort <=", value, "sort");
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIn(List<Integer> values) {
|
||||
addCriterion("sort in", values, "sort");
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotIn(List<Integer> values) {
|
||||
addCriterion("sort not in", values, "sort");
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort between", value1, value2, "sort");
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort not between", value1, value2, "sort");
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LoadTestFile implements Serializable {
|
||||
|
@ -10,5 +9,7 @@ public class LoadTestFile implements Serializable {
|
|||
|
||||
private String fileId;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -243,6 +243,66 @@ public class LoadTestFileExample {
|
|||
addCriterion("file_id not between", value1, value2, "fileId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNull() {
|
||||
addCriterion("sort is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNotNull() {
|
||||
addCriterion("sort is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortEqualTo(Integer value) {
|
||||
addCriterion("sort =", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotEqualTo(Integer value) {
|
||||
addCriterion("sort <>", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThan(Integer value) {
|
||||
addCriterion("sort >", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort >=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThan(Integer value) {
|
||||
addCriterion("sort <", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort <=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIn(List<Integer> values) {
|
||||
addCriterion("sort in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotIn(List<Integer> values) {
|
||||
addCriterion("sort not in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort not between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Schedule implements Serializable {
|
||||
|
@ -30,7 +29,9 @@ public class Schedule implements Serializable {
|
|||
|
||||
private Long updateTime;
|
||||
|
||||
private String customData;
|
||||
private String projectId;
|
||||
|
||||
private String name;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -913,6 +913,146 @@ public class ScheduleExample {
|
|||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -244,6 +244,76 @@ public class TestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIsNull() {
|
||||
addCriterion("test_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIsNotNull() {
|
||||
addCriterion("test_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdEqualTo(String value) {
|
||||
addCriterion("test_id =", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotEqualTo(String value) {
|
||||
addCriterion("test_id <>", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdGreaterThan(String value) {
|
||||
addCriterion("test_id >", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_id >=", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLessThan(String value) {
|
||||
addCriterion("test_id <", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_id <=", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLike(String value) {
|
||||
addCriterion("test_id like", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotLike(String value) {
|
||||
addCriterion("test_id not like", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIn(List<String> values) {
|
||||
addCriterion("test_id in", values, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotIn(List<String> values) {
|
||||
addCriterion("test_id not in", values, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdBetween(String value1, String value2) {
|
||||
addCriterion("test_id between", value1, value2, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_id not between", value1, value2, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathIsNull() {
|
||||
addCriterion("node_path is null");
|
||||
return (Criteria) this;
|
||||
|
@ -924,76 +994,6 @@ public class TestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIsNull() {
|
||||
addCriterion("test_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIsNotNull() {
|
||||
addCriterion("test_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdEqualTo(String value) {
|
||||
addCriterion("test_id =", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotEqualTo(String value) {
|
||||
addCriterion("test_id <>", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdGreaterThan(String value) {
|
||||
addCriterion("test_id >", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_id >=", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLessThan(String value) {
|
||||
addCriterion("test_id <", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_id <=", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdLike(String value) {
|
||||
addCriterion("test_id like", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotLike(String value) {
|
||||
addCriterion("test_id not like", value, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdIn(List<String> values) {
|
||||
addCriterion("test_id in", values, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotIn(List<String> values) {
|
||||
addCriterion("test_id not in", values, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdBetween(String value1, String value2) {
|
||||
addCriterion("test_id between", value1, value2, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_id not between", value1, value2, "testId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNull() {
|
||||
addCriterion("sort is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestCaseReviewApiCase implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String testCaseReviewId;
|
||||
|
||||
private String apiCaseId;
|
||||
|
||||
private String status;
|
||||
|
||||
private String environmentId;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,670 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestCaseReviewApiCaseExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestCaseReviewApiCaseExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNull() {
|
||||
addCriterion("test_case_review_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNotNull() {
|
||||
addCriterion("test_case_review_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdEqualTo(String value) {
|
||||
addCriterion("test_case_review_id =", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <>", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThan(String value) {
|
||||
addCriterion("test_case_review_id >", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id >=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThan(String value) {
|
||||
addCriterion("test_case_review_id <", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLike(String value) {
|
||||
addCriterion("test_case_review_id like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotLike(String value) {
|
||||
addCriterion("test_case_review_id not like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIn(List<String> values) {
|
||||
addCriterion("test_case_review_id in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotIn(List<String> values) {
|
||||
addCriterion("test_case_review_id not in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdIsNull() {
|
||||
addCriterion("api_case_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdIsNotNull() {
|
||||
addCriterion("api_case_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdEqualTo(String value) {
|
||||
addCriterion("api_case_id =", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdNotEqualTo(String value) {
|
||||
addCriterion("api_case_id <>", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdGreaterThan(String value) {
|
||||
addCriterion("api_case_id >", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("api_case_id >=", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdLessThan(String value) {
|
||||
addCriterion("api_case_id <", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("api_case_id <=", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdLike(String value) {
|
||||
addCriterion("api_case_id like", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdNotLike(String value) {
|
||||
addCriterion("api_case_id not like", value, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdIn(List<String> values) {
|
||||
addCriterion("api_case_id in", values, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdNotIn(List<String> values) {
|
||||
addCriterion("api_case_id not in", values, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdBetween(String value1, String value2) {
|
||||
addCriterion("api_case_id between", value1, value2, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiCaseIdNotBetween(String value1, String value2) {
|
||||
addCriterion("api_case_id not between", value1, value2, "apiCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdIsNull() {
|
||||
addCriterion("environment_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdIsNotNull() {
|
||||
addCriterion("environment_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdEqualTo(String value) {
|
||||
addCriterion("environment_id =", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdNotEqualTo(String value) {
|
||||
addCriterion("environment_id <>", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdGreaterThan(String value) {
|
||||
addCriterion("environment_id >", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("environment_id >=", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdLessThan(String value) {
|
||||
addCriterion("environment_id <", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("environment_id <=", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdLike(String value) {
|
||||
addCriterion("environment_id like", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdNotLike(String value) {
|
||||
addCriterion("environment_id not like", value, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdIn(List<String> values) {
|
||||
addCriterion("environment_id in", values, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdNotIn(List<String> values) {
|
||||
addCriterion("environment_id not in", values, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdBetween(String value1, String value2) {
|
||||
addCriterion("environment_id between", value1, value2, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
|
||||
addCriterion("environment_id not between", value1, value2, "environmentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Long value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestCaseReviewLoad implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String testCaseReviewId;
|
||||
|
||||
private String loadCaseId;
|
||||
|
||||
private String status;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String loadReportId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,670 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestCaseReviewLoadExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestCaseReviewLoadExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNull() {
|
||||
addCriterion("test_case_review_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNotNull() {
|
||||
addCriterion("test_case_review_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdEqualTo(String value) {
|
||||
addCriterion("test_case_review_id =", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <>", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThan(String value) {
|
||||
addCriterion("test_case_review_id >", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id >=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThan(String value) {
|
||||
addCriterion("test_case_review_id <", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLike(String value) {
|
||||
addCriterion("test_case_review_id like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotLike(String value) {
|
||||
addCriterion("test_case_review_id not like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIn(List<String> values) {
|
||||
addCriterion("test_case_review_id in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotIn(List<String> values) {
|
||||
addCriterion("test_case_review_id not in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdIsNull() {
|
||||
addCriterion("load_case_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdIsNotNull() {
|
||||
addCriterion("load_case_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdEqualTo(String value) {
|
||||
addCriterion("load_case_id =", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdNotEqualTo(String value) {
|
||||
addCriterion("load_case_id <>", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdGreaterThan(String value) {
|
||||
addCriterion("load_case_id >", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("load_case_id >=", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdLessThan(String value) {
|
||||
addCriterion("load_case_id <", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("load_case_id <=", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdLike(String value) {
|
||||
addCriterion("load_case_id like", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdNotLike(String value) {
|
||||
addCriterion("load_case_id not like", value, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdIn(List<String> values) {
|
||||
addCriterion("load_case_id in", values, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdNotIn(List<String> values) {
|
||||
addCriterion("load_case_id not in", values, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdBetween(String value1, String value2) {
|
||||
addCriterion("load_case_id between", value1, value2, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadCaseIdNotBetween(String value1, String value2) {
|
||||
addCriterion("load_case_id not between", value1, value2, "loadCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Long value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdIsNull() {
|
||||
addCriterion("load_report_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdIsNotNull() {
|
||||
addCriterion("load_report_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdEqualTo(String value) {
|
||||
addCriterion("load_report_id =", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdNotEqualTo(String value) {
|
||||
addCriterion("load_report_id <>", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdGreaterThan(String value) {
|
||||
addCriterion("load_report_id >", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("load_report_id >=", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdLessThan(String value) {
|
||||
addCriterion("load_report_id <", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("load_report_id <=", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdLike(String value) {
|
||||
addCriterion("load_report_id like", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdNotLike(String value) {
|
||||
addCriterion("load_report_id not like", value, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdIn(List<String> values) {
|
||||
addCriterion("load_report_id in", values, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdNotIn(List<String> values) {
|
||||
addCriterion("load_report_id not in", values, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdBetween(String value1, String value2) {
|
||||
addCriterion("load_report_id between", value1, value2, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoadReportIdNotBetween(String value1, String value2) {
|
||||
addCriterion("load_report_id not between", value1, value2, "loadReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TestCaseReviewScenario implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String testCaseReviewId;
|
||||
|
||||
private String apiScenarioId;
|
||||
|
||||
private String status;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String passRate;
|
||||
|
||||
private String lastResult;
|
||||
|
||||
private String reportId;
|
||||
|
||||
private String environment;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,810 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestCaseReviewScenarioExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestCaseReviewScenarioExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNull() {
|
||||
addCriterion("test_case_review_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIsNotNull() {
|
||||
addCriterion("test_case_review_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdEqualTo(String value) {
|
||||
addCriterion("test_case_review_id =", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <>", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThan(String value) {
|
||||
addCriterion("test_case_review_id >", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id >=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThan(String value) {
|
||||
addCriterion("test_case_review_id <", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_case_review_id <=", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdLike(String value) {
|
||||
addCriterion("test_case_review_id like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotLike(String value) {
|
||||
addCriterion("test_case_review_id not like", value, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdIn(List<String> values) {
|
||||
addCriterion("test_case_review_id in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotIn(List<String> values) {
|
||||
addCriterion("test_case_review_id not in", values, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestCaseReviewIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_case_review_id not between", value1, value2, "testCaseReviewId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdIsNull() {
|
||||
addCriterion("api_scenario_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdIsNotNull() {
|
||||
addCriterion("api_scenario_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdEqualTo(String value) {
|
||||
addCriterion("api_scenario_id =", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdNotEqualTo(String value) {
|
||||
addCriterion("api_scenario_id <>", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdGreaterThan(String value) {
|
||||
addCriterion("api_scenario_id >", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("api_scenario_id >=", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdLessThan(String value) {
|
||||
addCriterion("api_scenario_id <", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("api_scenario_id <=", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdLike(String value) {
|
||||
addCriterion("api_scenario_id like", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdNotLike(String value) {
|
||||
addCriterion("api_scenario_id not like", value, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdIn(List<String> values) {
|
||||
addCriterion("api_scenario_id in", values, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdNotIn(List<String> values) {
|
||||
addCriterion("api_scenario_id not in", values, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdBetween(String value1, String value2) {
|
||||
addCriterion("api_scenario_id between", value1, value2, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApiScenarioIdNotBetween(String value1, String value2) {
|
||||
addCriterion("api_scenario_id not between", value1, value2, "apiScenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Long value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIsNull() {
|
||||
addCriterion("pass_rate is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIsNotNull() {
|
||||
addCriterion("pass_rate is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateEqualTo(String value) {
|
||||
addCriterion("pass_rate =", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotEqualTo(String value) {
|
||||
addCriterion("pass_rate <>", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateGreaterThan(String value) {
|
||||
addCriterion("pass_rate >", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("pass_rate >=", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateLessThan(String value) {
|
||||
addCriterion("pass_rate <", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateLessThanOrEqualTo(String value) {
|
||||
addCriterion("pass_rate <=", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateLike(String value) {
|
||||
addCriterion("pass_rate like", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotLike(String value) {
|
||||
addCriterion("pass_rate not like", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIn(List<String> values) {
|
||||
addCriterion("pass_rate in", values, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotIn(List<String> values) {
|
||||
addCriterion("pass_rate not in", values, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateBetween(String value1, String value2) {
|
||||
addCriterion("pass_rate between", value1, value2, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotBetween(String value1, String value2) {
|
||||
addCriterion("pass_rate not between", value1, value2, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultIsNull() {
|
||||
addCriterion("last_result is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultIsNotNull() {
|
||||
addCriterion("last_result is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultEqualTo(String value) {
|
||||
addCriterion("last_result =", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultNotEqualTo(String value) {
|
||||
addCriterion("last_result <>", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultGreaterThan(String value) {
|
||||
addCriterion("last_result >", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("last_result >=", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultLessThan(String value) {
|
||||
addCriterion("last_result <", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultLessThanOrEqualTo(String value) {
|
||||
addCriterion("last_result <=", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultLike(String value) {
|
||||
addCriterion("last_result like", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultNotLike(String value) {
|
||||
addCriterion("last_result not like", value, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultIn(List<String> values) {
|
||||
addCriterion("last_result in", values, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultNotIn(List<String> values) {
|
||||
addCriterion("last_result not in", values, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultBetween(String value1, String value2) {
|
||||
addCriterion("last_result between", value1, value2, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastResultNotBetween(String value1, String value2) {
|
||||
addCriterion("last_result not between", value1, value2, "lastResult");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNull() {
|
||||
addCriterion("report_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNotNull() {
|
||||
addCriterion("report_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdEqualTo(String value) {
|
||||
addCriterion("report_id =", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotEqualTo(String value) {
|
||||
addCriterion("report_id <>", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThan(String value) {
|
||||
addCriterion("report_id >", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("report_id >=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThan(String value) {
|
||||
addCriterion("report_id <", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("report_id <=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLike(String value) {
|
||||
addCriterion("report_id like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotLike(String value) {
|
||||
addCriterion("report_id not like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIn(List<String> values) {
|
||||
addCriterion("report_id in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotIn(List<String> values) {
|
||||
addCriterion("report_id not in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdBetween(String value1, String value2) {
|
||||
addCriterion("report_id between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotBetween(String value1, String value2) {
|
||||
addCriterion("report_id not between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TestPlan implements Serializable {
|
||||
private String id;
|
||||
|
@ -41,6 +42,8 @@ public class TestPlan implements Serializable {
|
|||
|
||||
private String projectId;
|
||||
|
||||
private Integer executionTimes;
|
||||
|
||||
private String tags;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -1303,6 +1303,66 @@ public class TestPlanExample {
|
|||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIsNull() {
|
||||
addCriterion("execution_times is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIsNotNull() {
|
||||
addCriterion("execution_times is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesEqualTo(Integer value) {
|
||||
addCriterion("execution_times =", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotEqualTo(Integer value) {
|
||||
addCriterion("execution_times <>", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesGreaterThan(Integer value) {
|
||||
addCriterion("execution_times >", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("execution_times >=", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesLessThan(Integer value) {
|
||||
addCriterion("execution_times <", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("execution_times <=", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIn(List<Integer> values) {
|
||||
addCriterion("execution_times in", values, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotIn(List<Integer> values) {
|
||||
addCriterion("execution_times not in", values, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesBetween(Integer value1, Integer value2) {
|
||||
addCriterion("execution_times between", value1, value2, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("execution_times not between", value1, value2, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="size" jdbcType="BIGINT" property="size" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -69,7 +69,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, `type`, create_time, update_time, `size`, sort
|
||||
id, `name`, `type`, create_time, update_time, `size`, project_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.FileMetadataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -104,10 +104,10 @@
|
|||
<insert id="insert" parameterType="io.metersphere.base.domain.FileMetadata">
|
||||
insert into file_metadata (id, `name`, `type`,
|
||||
create_time, update_time, `size`,
|
||||
sort)
|
||||
project_id)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{size,jdbcType=BIGINT},
|
||||
#{sort,jdbcType=INTEGER})
|
||||
#{projectId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.FileMetadata">
|
||||
insert into file_metadata
|
||||
|
@ -130,8 +130,8 @@
|
|||
<if test="size != null">
|
||||
`size`,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
@ -153,8 +153,8 @@
|
|||
<if test="size != null">
|
||||
#{size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -185,8 +185,8 @@
|
|||
<if test="record.size != null">
|
||||
`size` = #{record.size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.sort != null">
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
|
@ -201,7 +201,7 @@
|
|||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`size` = #{record.size,jdbcType=BIGINT},
|
||||
sort = #{record.sort,jdbcType=INTEGER}
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -224,8 +224,8 @@
|
|||
<if test="size != null">
|
||||
`size` = #{size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -237,7 +237,7 @@
|
|||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`size` = #{size,jdbcType=BIGINT},
|
||||
sort = #{sort,jdbcType=INTEGER}
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -4,6 +4,7 @@
|
|||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.LoadTestFile">
|
||||
<result column="test_id" jdbcType="VARCHAR" property="testId" />
|
||||
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -64,7 +65,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
test_id, file_id
|
||||
test_id, file_id, sort
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.LoadTestFileExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -87,8 +88,10 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.LoadTestFile">
|
||||
insert into load_test_file (test_id, file_id)
|
||||
values (#{testId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR})
|
||||
insert into load_test_file (test_id, file_id, sort
|
||||
)
|
||||
values (#{testId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.LoadTestFile">
|
||||
insert into load_test_file
|
||||
|
@ -99,6 +102,9 @@
|
|||
<if test="fileId != null">
|
||||
file_id,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="testId != null">
|
||||
|
@ -107,6 +113,9 @@
|
|||
<if test="fileId != null">
|
||||
#{fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.LoadTestFileExample" resultType="java.lang.Long">
|
||||
|
@ -124,6 +133,9 @@
|
|||
<if test="record.fileId != null">
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sort != null">
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -132,7 +144,8 @@
|
|||
<update id="updateByExample" parameterType="map">
|
||||
update load_test_file
|
||||
set test_id = #{record.testId,jdbcType=VARCHAR},
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR}
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR},
|
||||
sort = #{record.sort,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
|
|
@ -16,21 +16,15 @@ public interface ScheduleMapper {
|
|||
|
||||
int insertSelective(Schedule record);
|
||||
|
||||
List<Schedule> selectByExampleWithBLOBs(ScheduleExample example);
|
||||
|
||||
List<Schedule> selectByExample(ScheduleExample example);
|
||||
|
||||
Schedule selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") Schedule record, @Param("example") ScheduleExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") Schedule record, @Param("example") ScheduleExample example);
|
||||
|
||||
int updateByExample(@Param("record") Schedule record, @Param("example") ScheduleExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(Schedule record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(Schedule record);
|
||||
|
||||
int updateByPrimaryKey(Schedule record);
|
||||
}
|
|
@ -14,9 +14,8 @@
|
|||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<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.Schedule">
|
||||
<result column="custom_data" jdbcType="LONGVARCHAR" property="customData" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -78,27 +77,8 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `key`, `type`, `value`, `group`, job, `enable`, resource_id, user_id, workspace_id,
|
||||
create_time, update_time
|
||||
create_time, update_time, project_id, `name`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
custom_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ScheduleExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from schedule
|
||||
<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.ScheduleExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
|
@ -113,11 +93,9 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from schedule
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
@ -136,12 +114,12 @@
|
|||
`value`, `group`, job,
|
||||
`enable`, resource_id, user_id,
|
||||
workspace_id, create_time, update_time,
|
||||
custom_data)
|
||||
project_id, `name`)
|
||||
values (#{id,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR},
|
||||
#{enable,jdbcType=BIT}, #{resourceId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
|
||||
#{workspaceId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{customData,jdbcType=LONGVARCHAR})
|
||||
#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.Schedule">
|
||||
insert into schedule
|
||||
|
@ -182,8 +160,11 @@
|
|||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
custom_data,
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
@ -223,8 +204,11 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
#{customData,jdbcType=LONGVARCHAR},
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -273,33 +257,17 @@
|
|||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.customData != null">
|
||||
custom_data = #{record.customData,jdbcType=LONGVARCHAR},
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update schedule
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`key` = #{record.key,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
`value` = #{record.value,jdbcType=VARCHAR},
|
||||
`group` = #{record.group,jdbcType=VARCHAR},
|
||||
job = #{record.job,jdbcType=VARCHAR},
|
||||
`enable` = #{record.enable,jdbcType=BIT},
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
custom_data = #{record.customData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update schedule
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
|
@ -313,7 +281,9 @@
|
|||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -354,28 +324,15 @@
|
|||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
custom_data = #{customData,jdbcType=LONGVARCHAR},
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.Schedule">
|
||||
update schedule
|
||||
set `key` = #{key,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=VARCHAR},
|
||||
`group` = #{group,jdbcType=VARCHAR},
|
||||
job = #{job,jdbcType=VARCHAR},
|
||||
`enable` = #{enable,jdbcType=BIT},
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
custom_data = #{customData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.Schedule">
|
||||
update schedule
|
||||
set `key` = #{key,jdbcType=VARCHAR},
|
||||
|
@ -388,7 +345,9 @@
|
|||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,30 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReviewApiCase;
|
||||
import io.metersphere.base.domain.TestCaseReviewApiCaseExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TestCaseReviewApiCaseMapper {
|
||||
long countByExample(TestCaseReviewApiCaseExample example);
|
||||
|
||||
int deleteByExample(TestCaseReviewApiCaseExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(TestCaseReviewApiCase record);
|
||||
|
||||
int insertSelective(TestCaseReviewApiCase record);
|
||||
|
||||
List<TestCaseReviewApiCase> selectByExample(TestCaseReviewApiCaseExample example);
|
||||
|
||||
TestCaseReviewApiCase selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReviewApiCase record, @Param("example") TestCaseReviewApiCaseExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReviewApiCase record, @Param("example") TestCaseReviewApiCaseExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReviewApiCase record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReviewApiCase record);
|
||||
}
|
|
@ -0,0 +1,243 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.TestCaseReviewApiCaseMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="test_case_review_id" jdbcType="VARCHAR" property="testCaseReviewId" />
|
||||
<result column="api_case_id" jdbcType="VARCHAR" property="apiCaseId" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_case_review_id, api_case_id, `status`, environment_id, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewApiCaseExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_review_api_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_review_api_case
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from test_case_review_api_case
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewApiCaseExample">
|
||||
delete from test_case_review_api_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
insert into test_case_review_api_case (id, test_case_review_id, api_case_id,
|
||||
`status`, environment_id, create_time,
|
||||
update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiCaseId,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
insert into test_case_review_api_case
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id,
|
||||
</if>
|
||||
<if test="apiCaseId != null">
|
||||
api_case_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
#{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiCaseId != null">
|
||||
#{apiCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewApiCaseExample" resultType="java.lang.Long">
|
||||
select count(*) from test_case_review_api_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_case_review_api_case
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testCaseReviewId != null">
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiCaseId != null">
|
||||
api_case_id = #{record.apiCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_review_api_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_case_id = #{record.apiCaseId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
update test_case_review_api_case
|
||||
<set>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiCaseId != null">
|
||||
api_case_id = #{apiCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
update test_case_review_api_case
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_case_id = #{apiCaseId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,30 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReviewLoad;
|
||||
import io.metersphere.base.domain.TestCaseReviewLoadExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TestCaseReviewLoadMapper {
|
||||
long countByExample(TestCaseReviewLoadExample example);
|
||||
|
||||
int deleteByExample(TestCaseReviewLoadExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(TestCaseReviewLoad record);
|
||||
|
||||
int insertSelective(TestCaseReviewLoad record);
|
||||
|
||||
List<TestCaseReviewLoad> selectByExample(TestCaseReviewLoadExample example);
|
||||
|
||||
TestCaseReviewLoad selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReviewLoad record, @Param("example") TestCaseReviewLoadExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReviewLoad record, @Param("example") TestCaseReviewLoadExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReviewLoad record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReviewLoad record);
|
||||
}
|
|
@ -0,0 +1,243 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.TestCaseReviewLoadMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewLoad">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="test_case_review_id" jdbcType="VARCHAR" property="testCaseReviewId" />
|
||||
<result column="load_case_id" jdbcType="VARCHAR" property="loadCaseId" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="load_report_id" jdbcType="VARCHAR" property="loadReportId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_case_review_id, load_case_id, `status`, create_time, update_time, load_report_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewLoadExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_review_load
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_review_load
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from test_case_review_load
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewLoadExample">
|
||||
delete from test_case_review_load
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewLoad">
|
||||
insert into test_case_review_load (id, test_case_review_id, load_case_id,
|
||||
`status`, create_time, update_time,
|
||||
load_report_id)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{loadCaseId,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{loadReportId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewLoad">
|
||||
insert into test_case_review_load
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id,
|
||||
</if>
|
||||
<if test="loadCaseId != null">
|
||||
load_case_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="loadReportId != null">
|
||||
load_report_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
#{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadCaseId != null">
|
||||
#{loadCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loadReportId != null">
|
||||
#{loadReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewLoadExample" resultType="java.lang.Long">
|
||||
select count(*) from test_case_review_load
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_case_review_load
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testCaseReviewId != null">
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.loadCaseId != null">
|
||||
load_case_id = #{record.loadCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.loadReportId != null">
|
||||
load_report_id = #{record.loadReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_review_load
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
load_case_id = #{record.loadCaseId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
load_report_id = #{record.loadReportId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReviewLoad">
|
||||
update test_case_review_load
|
||||
<set>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadCaseId != null">
|
||||
load_case_id = #{loadCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loadReportId != null">
|
||||
load_report_id = #{loadReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReviewLoad">
|
||||
update test_case_review_load
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
load_case_id = #{loadCaseId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
load_report_id = #{loadReportId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,37 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReviewScenario;
|
||||
import io.metersphere.base.domain.TestCaseReviewScenarioExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TestCaseReviewScenarioMapper {
|
||||
long countByExample(TestCaseReviewScenarioExample example);
|
||||
|
||||
int deleteByExample(TestCaseReviewScenarioExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(TestCaseReviewScenario record);
|
||||
|
||||
int insertSelective(TestCaseReviewScenario record);
|
||||
|
||||
List<TestCaseReviewScenario> selectByExampleWithBLOBs(TestCaseReviewScenarioExample example);
|
||||
|
||||
List<TestCaseReviewScenario> selectByExample(TestCaseReviewScenarioExample example);
|
||||
|
||||
TestCaseReviewScenario selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReviewScenario record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TestCaseReviewScenario record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReviewScenario record);
|
||||
}
|
|
@ -0,0 +1,343 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.TestCaseReviewScenarioMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="test_case_review_id" jdbcType="VARCHAR" property="testCaseReviewId"/>
|
||||
<result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId"/>
|
||||
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||
<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.TestCaseReviewScenario">
|
||||
<result column="environment" jdbcType="LONGVARCHAR" property="environment"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_case_review_id, api_scenario_id, `status`, create_time, update_time, pass_rate,
|
||||
last_result, report_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
environment
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from test_case_review_scenario
|
||||
<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.TestCaseReviewScenarioExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from test_case_review_scenario
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from test_case_review_scenario
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from test_case_review_scenario
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample">
|
||||
delete from test_case_review_scenario
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
insert into test_case_review_scenario (id, test_case_review_id, api_scenario_id,
|
||||
`status`, create_time, update_time,
|
||||
pass_rate, last_result, report_id,
|
||||
environment)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{environment,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
insert into test_case_review_scenario
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id,
|
||||
</if>
|
||||
<if test="apiScenarioId != null">
|
||||
api_scenario_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
pass_rate,
|
||||
</if>
|
||||
<if test="lastResult != null">
|
||||
last_result,
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id,
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testCaseReviewId != null">
|
||||
#{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiScenarioId != null">
|
||||
#{apiScenarioId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
#{passRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastResult != null">
|
||||
#{lastResult,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
#{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
#{environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample" resultType="java.lang.Long">
|
||||
select count(*) from test_case_review_scenario
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_case_review_scenario
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testCaseReviewId != null">
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiScenarioId != null">
|
||||
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.passRate != null">
|
||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lastResult != null">
|
||||
last_result = #{record.lastResult,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.reportId != null">
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environment != null">
|
||||
environment = #{record.environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_case_review_scenario
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
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},
|
||||
environment = #{record.environment,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_review_scenario
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
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}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
update test_case_review_scenario
|
||||
<set>
|
||||
<if test="testCaseReviewId != null">
|
||||
test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiScenarioId != null">
|
||||
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastResult != null">
|
||||
last_result = #{lastResult,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment = #{environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
update test_case_review_scenario
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{status,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},
|
||||
environment = #{environment,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
update test_case_review_scenario
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||
last_result = #{lastResult,jdbcType=VARCHAR},
|
||||
report_id = #{reportId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -20,6 +20,7 @@
|
|||
<result column="actual_start_time" jdbcType="BIGINT" property="actualStartTime" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="execution_times" jdbcType="INTEGER" property="executionTimes"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlan">
|
||||
<result column="tags" jdbcType="LONGVARCHAR" property="tags" />
|
||||
|
@ -85,7 +86,7 @@
|
|||
<sql id="Base_Column_List">
|
||||
id, workspace_id, report_id, `name`, description, `status`, stage, principal, test_case_match_rule,
|
||||
executor_match_rule, create_time, update_time, actual_end_time, planned_start_time,
|
||||
planned_end_time, actual_start_time, creator, project_id
|
||||
planned_end_time, actual_start_time, creator, project_id, execution_times
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
tags
|
||||
|
@ -145,14 +146,14 @@
|
|||
executor_match_rule, create_time, update_time,
|
||||
actual_end_time, planned_start_time, planned_end_time,
|
||||
actual_start_time, creator, project_id,
|
||||
tags)
|
||||
execution_times, tags)
|
||||
values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{stage,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR},
|
||||
#{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{actualEndTime,jdbcType=BIGINT}, #{plannedStartTime,jdbcType=BIGINT}, #{plannedEndTime,jdbcType=BIGINT},
|
||||
#{actualStartTime,jdbcType=BIGINT}, #{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{tags,jdbcType=LONGVARCHAR})
|
||||
#{executionTimes,jdbcType=INTEGER}, #{tags,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlan">
|
||||
insert into test_plan
|
||||
|
@ -211,6 +212,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
execution_times,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
|
@ -270,6 +274,9 @@
|
|||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
#{executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -338,6 +345,9 @@
|
|||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.executionTimes != null">
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -366,6 +376,7 @@
|
|||
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -390,7 +401,8 @@
|
|||
planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT},
|
||||
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -449,6 +461,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -474,6 +489,7 @@
|
|||
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
@ -495,7 +511,8 @@
|
|||
planned_end_time = #{plannedEndTime,jdbcType=BIGINT},
|
||||
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -36,6 +36,6 @@ public interface ExtApiDefinitionMapper {
|
|||
ApiDefinition getNextNum(@Param("projectId") String projectId);
|
||||
|
||||
List<ApiDefinitionResult> listRelevance(@Param("request")ApiDefinitionRequest request);
|
||||
|
||||
List<ApiDefinitionResult> listRelevanceReview(@Param("request")ApiDefinitionRequest request);
|
||||
List<String> selectIds(@Param("request") BaseQueryRequest query);
|
||||
}
|
|
@ -363,6 +363,86 @@
|
|||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="listRelevanceReview" resultType="io.metersphere.api.dto.definition.ApiDefinitionResult">
|
||||
select
|
||||
<include refid="io.metersphere.base.mapper.ApiDefinitionMapper.Base_Column_List"/>
|
||||
from api_definition
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
<include refid="combine">
|
||||
<property name="condition" value="request.combine"/>
|
||||
<property name="name" value="request.name"/>
|
||||
<property name="objectKey" value="request.combine.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
|
||||
<if test="request.name != null">
|
||||
and api_definition.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
<if test="request.protocol != null">
|
||||
AND api_definition.protocol = #{request.protocol}
|
||||
</if>
|
||||
<if test="request.id != null">
|
||||
AND api_definition.id = #{request.id}
|
||||
</if>
|
||||
<if test="request.moduleId != null">
|
||||
AND api_definition.module_id = #{request.moduleId}
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
AND api_definition.project_id = #{request.projectId}
|
||||
</if>
|
||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||
AND api_definition.module_id in
|
||||
<foreach collection="request.moduleIds" item="nodeId" separator="," open="(" close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key=='status'">
|
||||
and api_definition.status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='method'">
|
||||
and api_definition.method in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='user_id'">
|
||||
and api_definition.user_id in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
and exists (
|
||||
select id
|
||||
from api_test_case c
|
||||
where c.api_definition_id = api_definition.id
|
||||
and not exists (
|
||||
select id
|
||||
from test_case_review_api_case t
|
||||
where t.api_case_id = c.id
|
||||
and t.test_case_review_id = #{request.reviewId}
|
||||
)
|
||||
)
|
||||
</where>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
api_definition.${order.name} ${order.type}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectScheduleList" resultType="io.metersphere.api.dto.definition.ApiSwaggerUrlDTO">
|
||||
SELECT apiScene.id AS scenarioId,
|
||||
apiScene.`name` AS `name`,
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||
|
||||
public interface ExtApiScenarioMapper {
|
||||
List<ApiScenarioDTO> list(@Param("request") ApiScenarioRequest request);
|
||||
|
||||
List<ApiScenarioDTO> listReview(@Param("request") ApiScenarioRequest request);
|
||||
List<ApiScenarioWithBLOBs> selectByTagId(@Param("id") String id);
|
||||
|
||||
List<ApiScenarioWithBLOBs> selectIds(@Param("ids") List<String> ids);
|
||||
|
|
|
@ -134,7 +134,6 @@
|
|||
</sql>
|
||||
<select id="list" resultMap="BaseResultMap">
|
||||
select api_scenario.id, api_scenario.project_id, api_scenario.tags, api_scenario.user_id, api_scenario.num,
|
||||
api_scenario.scenario_definition,
|
||||
api_scenario.api_scenario_module_id,api_scenario.module_path, api_scenario.name, api_scenario.level,
|
||||
api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people,
|
||||
api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id,
|
||||
|
@ -337,5 +336,117 @@
|
|||
<include refid="queryWhereCondition"/>
|
||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||
</select>
|
||||
<select id="listReview" resultMap="BaseResultMap">
|
||||
select api_scenario.id, api_scenario.project_id, api_scenario.tags, api_scenario.user_id, api_scenario.num,
|
||||
api_scenario.api_scenario_module_id,api_scenario.module_path, api_scenario.name, api_scenario.level,
|
||||
api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people,
|
||||
api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id,
|
||||
api_scenario.schedule, api_scenario.description, api_scenario.create_time, api_scenario.update_time,
|
||||
project.name as project_name, user.name as user_name
|
||||
from api_scenario
|
||||
left join project on api_scenario.project_id = project.id
|
||||
left join user on api_scenario.user_id = user.id
|
||||
<include refid="queryWhereConditionReview"/>
|
||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||
</select>
|
||||
|
||||
<sql id="queryWhereConditionReview">
|
||||
<where>
|
||||
<if test="request.combine != null">
|
||||
<include refid="combine">
|
||||
<property name="condition" value="request.combine"/>
|
||||
<property name="name" value="request.name"/>
|
||||
<property name="objectKey" value="request.combine.tags"/>
|
||||
</include>
|
||||
</if>
|
||||
|
||||
<if test="request.name != null">
|
||||
and (api_scenario.name like CONCAT('%', #{request.name},'%')
|
||||
or api_scenario.tags like CONCAT('%', #{request.name},'%')
|
||||
or api_scenario.num like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.workspaceId != null">
|
||||
AND project.workspace_id = #{request.workspaceId}
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
AND project.id = #{request.projectId}
|
||||
</if>
|
||||
<if test="request.id != null">
|
||||
AND api_scenario.id = #{request.id}
|
||||
</if>
|
||||
<if test="request.userId != null">
|
||||
AND api_scenario.user_id = #{request.userId}
|
||||
</if>
|
||||
<if test="request.moduleId != null">
|
||||
AND api_scenario.api_scenario_module_id = #{request.moduleId}
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
AND api_scenario.project_id = #{request.projectId}
|
||||
</if>
|
||||
<if test="request.createTime >0 ">
|
||||
AND api_scenario.create_time >= #{request.createTime}
|
||||
</if>
|
||||
<if test="request.ids != null and request.ids.size() > 0">
|
||||
AND api_scenario.id in
|
||||
<foreach collection="request.ids" item="itemId" separator="," open="(" close=")">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||
AND api_scenario.api_scenario_module_id in
|
||||
<foreach collection="request.moduleIds" item="nodeId" separator="," open="(" close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key=='status'">
|
||||
and api_scenario.status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='user_id'">
|
||||
and api_scenario.user_id in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='level'">
|
||||
and api_scenario.level in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='last_result'">
|
||||
and api_scenario.last_result in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.executeStatus == 'unExecute'">
|
||||
and api_scenario.last_result IS NULL
|
||||
</if>
|
||||
<if test="request.executeStatus == 'executeFailed'">
|
||||
and api_scenario.last_result = 'Fail'
|
||||
</if>
|
||||
<if test="request.executeStatus == 'executePass'">
|
||||
and api_scenario.last_result = 'Success'
|
||||
</if>
|
||||
<if test="request.notInTestPlan == true ">
|
||||
and api_scenario.id not in (
|
||||
select pc.api_scenario_id
|
||||
from test_case_review_scenario pc
|
||||
where pc.test_case_review_id = #{request.reviewId}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
|
@ -20,6 +20,8 @@ public interface ExtApiTestCaseMapper {
|
|||
List<ApiTestCaseDTO> listSimple(@Param("request") ApiTestCaseRequest request);
|
||||
|
||||
List<String> selectIdsNotExistsInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
||||
List<String> selectIdsNotExistsInReview(@Param("projectId") String projectId, @Param("reviewId") String reviewId);
|
||||
|
||||
|
||||
List<ApiDataCountResult> countProtocolByProjectID(String projectId);
|
||||
|
||||
|
|
|
@ -337,6 +337,15 @@
|
|||
where pc.test_plan_id = #{planId}
|
||||
)
|
||||
</select>
|
||||
<select id="selectIdsNotExistsInReview" resultType="java.lang.String">
|
||||
select c.id
|
||||
from api_test_case c
|
||||
where c.project_id = #{projectId} and c.id not in (
|
||||
select pc.api_case_id
|
||||
from test_case_review_api_case pc
|
||||
where pc.test_case_review_id = #{reviewId}
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT apiDef.protocol AS groupField,COUNT(testCase.id) AS countNumber FROM api_test_case testCase
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.base.domain.FileMetadata;
|
||||
import io.metersphere.base.domain.LoadTest;
|
||||
import io.metersphere.dto.LoadTestDTO;
|
||||
import io.metersphere.performance.dto.LoadTestFileDTO;
|
||||
import io.metersphere.performance.request.QueryTestPlanRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -18,6 +18,6 @@ public interface ExtLoadTestMapper {
|
|||
|
||||
LoadTest getNextNum(@Param("projectId") String projectId);
|
||||
|
||||
List<LoadTestFileDTO> getProjectFiles(@Param("projectId") String projectId, @Param("loadTypes") List<String> loadType);
|
||||
List<FileMetadata> getProjectFiles(@Param("projectId") String projectId, @Param("loadTypes") List<String> loadType);
|
||||
|
||||
}
|
||||
|
|
|
@ -102,7 +102,12 @@
|
|||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
ORDER BY
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
<if test="order.name == 'user_name'">
|
||||
user_name ${order.type}
|
||||
</if>
|
||||
<if test="order.name != 'user_name'">
|
||||
load_test.${order.name} ${order.type}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
@ -132,11 +137,9 @@
|
|||
select * from load_test lt where lt.project_id = #{projectId} ORDER BY num DESC LIMIT 1;
|
||||
</select>
|
||||
|
||||
<select id="getProjectFiles" resultType="io.metersphere.performance.dto.LoadTestFileDTO">
|
||||
SELECT file_metadata.*, load_test.id as testId, load_test.name as testName
|
||||
FROM load_test
|
||||
JOIN load_test_file ON load_test.id = load_test_file.test_id
|
||||
JOIN file_metadata ON load_test_file.file_id = file_metadata.id
|
||||
<select id="getProjectFiles" resultType="io.metersphere.base.domain.FileMetadata">
|
||||
SELECT file_metadata.*
|
||||
FROM file_metadata
|
||||
WHERE file_metadata.type IN
|
||||
<foreach collection="loadTypes" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
|
|
|
@ -15,10 +15,12 @@ public interface ExtScheduleMapper {
|
|||
|
||||
long countTaskByProjectIdAndCreateTimeRange(@Param("projectId")String projectId, @Param("startTime") long startTime, @Param("endTime") long endTime);
|
||||
|
||||
List<TaskInfoResult> findRunningTaskInfoByProjectID(String workspaceID);
|
||||
List<TaskInfoResult> findRunningTaskInfoByProjectID(@Param("projectId") String workspaceID, @Param("types") List<String> typeFilter);
|
||||
|
||||
void insert(@Param("apiSwaggerUrlDTO") ApiSwaggerUrlDTO apiSwaggerUrlDTO);
|
||||
|
||||
ApiSwaggerUrlDTO select(String id);
|
||||
|
||||
int updateNameByResourceID(@Param("resourceId") String resourceId, @Param("name") String name);
|
||||
|
||||
}
|
|
@ -61,35 +61,34 @@
|
|||
AND create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="findRunningTaskInfoByProjectID" resultType="io.metersphere.api.dto.datacount.response.TaskInfoResult">
|
||||
SELECT apiScene.id AS scenarioId,
|
||||
apiScene.`name` AS `name`,
|
||||
SELECT sch.id AS taskID,
|
||||
sch.`name` AS `name`,
|
||||
sch.`value` AS rule,
|
||||
sch.`enable` AS `taskStatus`,
|
||||
sch.update_time AS updateTime,
|
||||
sch.id AS taskID,
|
||||
sch.`value` AS rule,
|
||||
sch.`enable` AS `taskStatus`,
|
||||
u.`name` AS creator,
|
||||
sch.update_time AS updateTime,
|
||||
'scenario' AS taskType
|
||||
FROM api_scenario apiScene
|
||||
INNER JOIN `schedule` sch ON apiScene.id = sch.resource_id
|
||||
INNER JOIN `user` u ON u.id = sch.user_id
|
||||
sch.type AS taskType,
|
||||
sch.`group` AS taskGroup,
|
||||
sch.resource_id AS scenarioId
|
||||
FROM (
|
||||
schedule sch left join user u
|
||||
ON sch.user_id = u.id
|
||||
)
|
||||
WHERE sch.`enable` = true
|
||||
AND apiScene.project_id = #{0,jdbcType=VARCHAR}
|
||||
UNION
|
||||
SELECT testPlan.id AS scenarioId,
|
||||
testPlan.`name` AS `name`,
|
||||
sch.id AS taskID,
|
||||
sch.`value` AS rule,
|
||||
sch.`enable` AS `taskStatus`,
|
||||
u.`name` AS creator,
|
||||
sch.update_time AS updateTime,
|
||||
'testPlan' AS taskType
|
||||
FROM test_plan testPlan
|
||||
INNER JOIN `schedule` sch ON testPlan.id = sch.resource_id
|
||||
INNER JOIN `user` u ON u.id = sch.user_id
|
||||
WHERE sch.`enable` = true
|
||||
AND testPlan.project_id = #{0,jdbcType=VARCHAR}
|
||||
AND sch.project_id = #{projectId,jdbcType=VARCHAR}
|
||||
and sch.`group` in
|
||||
<foreach collection="types" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="select" resultType="io.metersphere.api.dto.definition.ApiSwaggerUrlDTO">
|
||||
select * from swagger_url_project where id=#{id}
|
||||
</select>
|
||||
<update id="updateNameByResourceID">
|
||||
update schedule set name = #{name} where resource_id = #{resourceId}
|
||||
</update>
|
||||
</mapper>
|
|
@ -71,5 +71,10 @@ public interface ExtTestCaseMapper {
|
|||
|
||||
List<TrackCountResult> countRelevanceMaintainer(@Param("projectId") String projectId);
|
||||
|
||||
int getTestPlanBug(@Param("planId") String planId);
|
||||
int getTestPlanCase(@Param("planId") String planId);
|
||||
int getTestPlanPassCase(@Param("planId") String planId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -306,6 +306,9 @@
|
|||
or test_case.num like CONCAT('%', #{request.name},'%')
|
||||
or test_case.tags like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.createTime >0">
|
||||
AND test_case.create_time >= #{request.createTime}
|
||||
</if>
|
||||
<if test="request.nodeIds != null and request.nodeIds.size() > 0">
|
||||
and test_case.node_id in
|
||||
<foreach collection="request.nodeIds" item="nodeId" separator="," open="(" close=")">
|
||||
|
@ -316,6 +319,12 @@
|
|||
and test_case.project_id = #{request.projectId}
|
||||
</if>
|
||||
<include refid="filters"/>
|
||||
<if test="request.caseCoverage == 'uncoverage' ">
|
||||
and test_case.test_id is null and test_case.type != 'functional'
|
||||
</if>
|
||||
<if test="request.caseCoverage == 'coverage' ">
|
||||
and test_case.test_id is not null and test_case.type != 'functional'
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
@ -342,8 +351,9 @@
|
|||
</select>
|
||||
|
||||
<select id="countCoverage" resultType="io.metersphere.track.response.TrackCountResult">
|
||||
SELECT count(test_case.id) AS countNumber, if(test_case.test_id is null,"uncoverage","coverage") AS groupField
|
||||
FROM test_case WHERE test_case.project_id=#{projectId} GROUP BY groupField
|
||||
SELECT count(test_case.id) AS countNumber,
|
||||
if(test_case.test_id is null,"uncoverage","coverage") AS groupField
|
||||
FROM test_case WHERE test_case.project_id=#{projectId} and test_case.type != 'functional' GROUP BY groupField
|
||||
</select>
|
||||
<select id="countFuncMaintainer" resultType="io.metersphere.track.response.TrackCountResult">
|
||||
select count(tc.id) as countNumber, user.name as groupField from test_case tc right join user on tc.maintainer = user.id
|
||||
|
@ -355,6 +365,50 @@
|
|||
where tc.project_id = #{projectId} and tc.test_id is not null
|
||||
group by tc.maintainer
|
||||
</select>
|
||||
<select id="getTestPlanBug" resultType="int">
|
||||
select count(tci.issues_id) from test_plan_test_case tptc join test_case_issues tci on tptc.case_id = tci.test_case_id
|
||||
where tptc.plan_id = #{planId};
|
||||
</select>
|
||||
<select id="getTestPlanCase" resultType="int">
|
||||
select count(s)
|
||||
from (
|
||||
select id as s
|
||||
from test_plan_test_case tptc
|
||||
where tptc.plan_id = #{planId}
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_api_scenario tpas
|
||||
where tpas.test_plan_id = #{planId}
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_api_case tpac
|
||||
where tpac.test_plan_id = #{planId}
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_load_case tplc
|
||||
where tplc.test_plan_id = #{planId}
|
||||
) as temp
|
||||
</select>
|
||||
<select id="getTestPlanPassCase" resultType="int">
|
||||
select count(s)
|
||||
from (
|
||||
select id as s
|
||||
from test_plan_test_case tptc
|
||||
where tptc.plan_id = #{planId} and tptc.status = 'Pass'
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_api_scenario tpas
|
||||
where tpas.test_plan_id = #{planId} and tpas.last_result = 'Success'
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_api_case tpac
|
||||
where tpac.test_plan_id = #{planId} and tpac.status = 'success'
|
||||
union all
|
||||
select id as s
|
||||
from test_plan_load_case tplc
|
||||
where tplc.test_plan_id = #{planId} and tplc.status = 'success'
|
||||
) as temp
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,20 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.TestPlanApiCaseDTO;
|
||||
import io.metersphere.base.domain.TestCaseReviewApiCase;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExtTestCaseReviewApiCaseMapper {
|
||||
void insertIfNotExists(@Param("request")TestCaseReviewApiCase testCaseReviewApiCase);
|
||||
List<TestPlanApiCaseDTO> list(@Param("request") ApiTestCaseRequest request);
|
||||
List<String> getExecResultByReviewId(String reviewId);
|
||||
|
||||
List<String> getIdsByReviewId(String reviewId);
|
||||
|
||||
List<String> getNotRelevanceCaseIds(@Param("reviewId")String reviewId, @Param("relevanceProjectIds")List<String> relevanceProjectIds);
|
||||
|
||||
List<String> getStatusByTestReviewId(String id);
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.ext.ExtTestCaseReviewApiCaseMapper">
|
||||
<insert id="insertIfNotExists" parameterType="io.metersphere.base.domain.TestCaseReviewApiCase">
|
||||
-- 查询没有数据再插入
|
||||
INSERT INTO test_case_review_api_case(id, test_case_review_id, api_case_id, environment_id, create_time, update_time)
|
||||
SELECT #{request.id}, #{request.testCaseReviewId}, #{request.apiCaseId}, #{request.environmentId}, #{request.createTime}, #{request.updateTime}
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS(
|
||||
SELECT id FROM
|
||||
test_case_review_api_case
|
||||
WHERE test_case_review_id = #{request.testCaseReviewId} and api_case_id = #{request.apiCaseId}
|
||||
)
|
||||
</insert>
|
||||
<select id="list" resultType="io.metersphere.api.dto.definition.TestPlanApiCaseDTO">
|
||||
select
|
||||
t.id, t.environment_id, t.create_time, t.update_time,
|
||||
c.id as case_id, c.project_id, c.name, c.api_definition_id, c.priority, c.description, c.create_user_id, c.update_user_id, c.num, c.tags,
|
||||
a.module_id, a.path, a.protocol, t.status execResult
|
||||
from
|
||||
test_case_review_api_case t
|
||||
inner join
|
||||
api_test_case c
|
||||
on t.api_case_id = c.id
|
||||
<if test="request.reviewId != null and request.planId!=''">
|
||||
and t.test_case_review_id = #{request.reviewId}
|
||||
</if>
|
||||
inner join
|
||||
api_definition a
|
||||
on
|
||||
c.api_definition_id = a.id
|
||||
<if test="request.protocol != null and request.protocol!=''">
|
||||
and a.protocol = #{request.protocol}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="request.status == 'Trash'">
|
||||
and a.status = 'Trash'
|
||||
</when>
|
||||
<when test="request.status == null">
|
||||
and a.status != 'Trash'
|
||||
</when>
|
||||
<when test="request.status == ''">
|
||||
and a.status != 'Trash'
|
||||
</when>
|
||||
<when test="request.status == 'running'">
|
||||
and t.status IS NULL
|
||||
</when>
|
||||
<otherwise>
|
||||
and t.status = #{request.status}
|
||||
</otherwise>
|
||||
</choose>
|
||||
where 1
|
||||
<if test="request.ids != null and request.ids.size() > 0">
|
||||
<if test="request.projectId != null and request.projectId!=''">
|
||||
and
|
||||
</if>
|
||||
t.id in
|
||||
<foreach collection="request.ids" item="caseId" separator="," open="(" close=")">
|
||||
#{caseId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.name != null and request.name!=''">
|
||||
and (c.name like CONCAT('%', #{request.name},'%') or c.tags like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||
and a.module_id in
|
||||
<foreach collection="request.moduleIds" item="nodeId" separator="," open="(" close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key == 'priority'">
|
||||
and c.priority in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key == 'user_id'">
|
||||
and c.create_user_id in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
<choose>
|
||||
<when test="order.name == 'update_time'">
|
||||
t.${order.name} ${order.type}
|
||||
</when>
|
||||
<when test="order.name == 'create_user'">
|
||||
create_user_id ${order.type}
|
||||
</when>
|
||||
<otherwise>
|
||||
${order.name} ${order.type}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getExecResultByReviewId" resultType="java.lang.String">
|
||||
select status
|
||||
from
|
||||
test_case_review_api_case
|
||||
where test_case_review_id= #{reviewId}
|
||||
</select>
|
||||
<select id="getIdsByReviewId" resultType="java.lang.String">
|
||||
select id
|
||||
from test_case_review_api_case
|
||||
where id = #{reviewId}
|
||||
</select>
|
||||
<select id="getNotRelevanceCaseIds" resultType="java.lang.String">
|
||||
select t.id
|
||||
from test_case_review_api_case t
|
||||
inner join api_test_case c
|
||||
on c.id = t.api_case_id
|
||||
<if test="relevanceProjectIds != null and relevanceProjectIds.size() > 0">
|
||||
and c.project_id not in
|
||||
<foreach collection="relevanceProjectIds" item="projectId" separator="," open="(" close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
where t.test_case_review_id = #{reviewId}
|
||||
</select>
|
||||
<select id="getStatusByTestReviewId" resultType="java.lang.String">
|
||||
SELECT `status` FROM test_case_review_api_case WHERE test_case_review_id = #{0}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,15 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.dto.TestReviewLoadCaseDTO;
|
||||
import io.metersphere.track.request.testplan.LoadCaseRequest;
|
||||
import io.metersphere.track.request.testreview.TestReviewRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExtTestCaseReviewLoadMapper {
|
||||
List<String> selectIdsNotInPlan(@Param("projectId") String projectId, @Param("reviewId") String reviewId);
|
||||
List<TestReviewLoadCaseDTO> selectTestReviewLoadCaseList(@Param("request") TestReviewRequest request);
|
||||
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
||||
List<String> getStatusByreviewId(@Param("reviewId") String reviewId);
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="io.metersphere.base.mapper.ext.ExtTestCaseReviewLoadMapper">
|
||||
<update id="updateCaseStatus">
|
||||
update test_case_review_load tplc
|
||||
set status = #{status}
|
||||
where tplc.load_report_id = #{reportId}
|
||||
</update>
|
||||
|
||||
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
||||
select load_test.id
|
||||
from load_test
|
||||
where load_test.project_id = #{projectId}
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_case_review_load tplc where tplc.test_case_review_id = #{reviewId}
|
||||
)
|
||||
</select>
|
||||
<select id="selectTestReviewLoadCaseList" resultType="io.metersphere.dto.TestReviewLoadCaseDTO">
|
||||
select tplc.id,
|
||||
u.name as userName,
|
||||
tplc.create_time,
|
||||
tplc.update_time,
|
||||
tplc.test_case_review_id,
|
||||
tplc.load_case_id,
|
||||
lt.status,
|
||||
lt.num,
|
||||
tplc.status as caseStatus,
|
||||
lt.name as caseName,
|
||||
tplc.load_report_id,
|
||||
p.name as projectName
|
||||
from test_case_review_load tplc
|
||||
inner join load_test lt on tplc.load_case_id = lt.id
|
||||
inner join user u on lt.user_id = u.id
|
||||
inner join project p on lt.project_id = p.id
|
||||
<where>
|
||||
tplc.test_case_review_id = #{request.testCaseReviewId}
|
||||
<if test="request.projectId != null and request.projectId != ''">
|
||||
and lt.project_id = #{request.projectId}
|
||||
</if>
|
||||
<if test="request.name != null">
|
||||
and (lt.name like CONCAT('%', #{request.name},'%') or lt.num like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.status != null">
|
||||
and tplc.status like CONCAT('%', #{request.status},'%')
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key=='status'">
|
||||
and lt.status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
tplc.${order.name} ${order.type}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getStatusByreviewId" resultType="java.lang.String">
|
||||
select status from test_case_review_load tplc where tplc.test_case_review_id = #{reviewId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,21 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||
import io.metersphere.api.dto.automation.TestPlanScenarioRequest;
|
||||
import io.metersphere.base.domain.TestCaseReviewScenario;
|
||||
import io.metersphere.base.domain.TestPlanApiScenario;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExtTestCaseReviewScenarioCaseMapper {
|
||||
void insertIfNotExists(@Param("request") TestCaseReviewScenario request);
|
||||
|
||||
List<ApiScenarioDTO> list(@Param("request") TestPlanScenarioRequest request);
|
||||
|
||||
List<String> getExecResultByReviewId(String reviewId);
|
||||
|
||||
List<String> getIdsByReviewId(String reviewId);
|
||||
|
||||
List<String> getNotRelevanceCaseIds(String planId, List<String> relevanceProjectIds);
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.ext.ExtTestCaseReviewScenarioCaseMapper">
|
||||
<insert id="insertIfNotExists" parameterType="io.metersphere.base.domain.TestPlanApiScenario">
|
||||
-- 查询没有数据再插入
|
||||
INSERT INTO test_case_review_scenario(id, test_case_review_id, api_scenario_id, create_time, update_time, environment)
|
||||
SELECT #{request.id}, #{request.reviewId}, #{request.apiScenarioId}, #{request.createTime}, #{request.updateTime}, #{request.environment}
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS(
|
||||
SELECT id FROM
|
||||
test_case_review_scenario
|
||||
WHERE test_case_review_id = #{request.reviewId} and api_scenario_id = #{request.apiScenarioId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="list" resultType="io.metersphere.api.dto.automation.ApiScenarioDTO">
|
||||
select
|
||||
t.id, t.environment, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id, c.scenario_definition,
|
||||
c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level,
|
||||
c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, c.tags, c.num,
|
||||
p.name as project_name, p.id as project_id, u.name as user_name
|
||||
from
|
||||
test_case_review_scenario t
|
||||
inner join
|
||||
api_scenario c
|
||||
on t.api_scenario_id = c.id and c.status != 'Trash'
|
||||
<if test="request.reviewId != null and request.reviewId!=''">
|
||||
and t.test_case_review_id = #{request.reviewId}
|
||||
</if>
|
||||
left join project p
|
||||
on c.project_id = p.id
|
||||
left join user u
|
||||
on c.user_id = u.id
|
||||
where 1
|
||||
<if test="request.ids != null and request.ids.size() > 0">
|
||||
<if test="request.projectId != null and request.projectId!=''">
|
||||
and
|
||||
</if>
|
||||
t.id in
|
||||
<foreach collection="request.ids" item="caseId" separator="," open="(" close=")">
|
||||
#{caseId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.name != null and request.name!=''">
|
||||
and (c.name like CONCAT('%', #{request.name},'%')
|
||||
or c.num like CONCAT('%', #{request.name},'%')
|
||||
or c.tags like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.status != null and request.status!=''">
|
||||
and t.last_result like CONCAT('%', #{request.status},'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||
and c.api_scenario_module_id in
|
||||
<foreach collection="request.moduleIds" item="nodeId" separator="," open="(" close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key == 'priority'">
|
||||
and c.priority in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
<choose>
|
||||
<when test="order.name == 'update_time'">
|
||||
t.${order.name} ${order.type}
|
||||
</when>
|
||||
<otherwise>
|
||||
${order.name} ${order.type}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getExecResultByReviewId" resultType="java.lang.String">
|
||||
select last_result
|
||||
from
|
||||
test_case_review_scenario
|
||||
where test_case_review_id = #{reviewId}
|
||||
</select>
|
||||
<select id="getIdsByReviewId" resultType="java.lang.String">
|
||||
select id
|
||||
from test_case_review_scenario
|
||||
where test_case_review_id = #{reviewId}
|
||||
</select>
|
||||
|
||||
<select id="getNotRelevanceCaseIds" resultType="java.lang.String">
|
||||
select t.id
|
||||
from test_case_review_scenario t
|
||||
inner join api_scenario c
|
||||
on c.id = t.api_scenario_id
|
||||
<if test="relevanceProjectIds != null and relevanceProjectIds.size() > 0">
|
||||
and c.project_id not in
|
||||
<foreach collection="relevanceProjectIds" item="projectId" separator="," open="(" close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
where t.test_case_review_id = #{reviewId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -8,8 +8,9 @@ import java.util.List;
|
|||
|
||||
public interface ExtTestPlanLoadCaseMapper {
|
||||
|
||||
List<String> selectIdsNotInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
||||
List<String> selectIdsNotInPlan(@Param("request") LoadCaseRequest request);
|
||||
List<TestPlanLoadCaseDTO> selectTestPlanLoadCaseList(@Param("request") LoadCaseRequest request);
|
||||
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
||||
List<String> getStatusByTestPlanId(@Param("planId") String planId);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,12 @@
|
|||
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
||||
select load_test.id
|
||||
from load_test
|
||||
where load_test.project_id = #{projectId}
|
||||
where load_test.project_id = #{request.projectId}
|
||||
<if test="request.name != null and request.name != ''">
|
||||
and load_test.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{planId}
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{request.testPlanId}
|
||||
)
|
||||
</select>
|
||||
<select id="selectTestPlanLoadCaseList" resultType="io.metersphere.track.dto.TestPlanLoadCaseDTO">
|
||||
|
|
|
@ -45,4 +45,6 @@ public interface ExtTestPlanTestCaseMapper {
|
|||
void deleteByTestCaseID(String id);
|
||||
|
||||
List<String> getExecResultByPlanId(String planId);
|
||||
|
||||
List<TestPlanCaseDTO> listForMinder(@Param("planId") String planId);
|
||||
}
|
||||
|
|
|
@ -405,6 +405,23 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="listForMinder" resultType="io.metersphere.track.dto.TestPlanCaseDTO">
|
||||
select pc.id as id,
|
||||
pc.executor, pc.status,
|
||||
pc.update_time,
|
||||
pc.plan_id as planId,
|
||||
t.name, t.priority,
|
||||
t.type, t.node_id,
|
||||
t.steps, t.prerequisite,
|
||||
t.remark,
|
||||
t.node_path, t.method, t.num
|
||||
from test_plan_test_case pc
|
||||
inner join test_case t on pc.case_id = t.id
|
||||
<where>
|
||||
pc.plan_id = #{planId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateTestCaseStates" parameterType="java.lang.String">
|
||||
update test_plan_test_case
|
||||
<set>
|
||||
|
|
|
@ -97,10 +97,13 @@
|
|||
</sql>
|
||||
|
||||
<select id="list" resultType="io.metersphere.track.dto.TestReviewCaseDTO">
|
||||
select test_case_review_test_case.id as id, test_case.id as caseId, test_case.name, test_case.priority,
|
||||
test_case.type, test_case.node_path, test_case.method, test_case.num, test_case_review_test_case.reviewer,
|
||||
test_case.review_status, test_case_review_test_case.update_time, test_case_node.name as model,
|
||||
project.name as projectName, test_case_review_test_case.review_id as reviewId,test_case.test_id as testId
|
||||
select test_case_review_test_case.id as id, test_case_review_test_case.reviewer,
|
||||
test_case_review_test_case.update_time, test_case_review_test_case.review_id as reviewId,
|
||||
test_case.id as caseId, test_case.name, test_case.priority, test_case.test_id as testId,
|
||||
test_case.type, test_case.node_path, test_case.method, test_case.num, test_case.review_status,
|
||||
test_case.remark as remark, test_case.steps as steps, test_case.node_id as nodeId,
|
||||
test_case_node.name as model,
|
||||
project.name as projectName
|
||||
from test_case_review_test_case
|
||||
inner join test_case on test_case_review_test_case.case_id = test_case.id
|
||||
left join test_case_node on test_case_node.id=test_case.node_id
|
||||
|
@ -158,12 +161,12 @@
|
|||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and test_case_review_test_case.status in
|
||||
<when test="key=='status'">
|
||||
and test_case.review_status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</otherwise>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package io.metersphere.commons.constants;
|
||||
|
||||
public enum TestCaseStatus {
|
||||
performance,api,testcase,automation
|
||||
}
|
|
@ -16,6 +16,7 @@ public class ShiroUtils {
|
|||
filterChainDefinitionMap.put("/signin", "anon");
|
||||
filterChainDefinitionMap.put("/ldap/signin", "anon");
|
||||
filterChainDefinitionMap.put("/ldap/open", "anon");
|
||||
filterChainDefinitionMap.put("/signout", "anon");
|
||||
filterChainDefinitionMap.put("/isLogin", "anon");
|
||||
filterChainDefinitionMap.put("/css/**", "anon");
|
||||
filterChainDefinitionMap.put("/js/**", "anon");
|
||||
|
@ -42,10 +43,13 @@ public class ShiroUtils {
|
|||
//api-对外文档页面提供的查询接口
|
||||
filterChainDefinitionMap.put("/api/document/**", "anon");
|
||||
// filterChainDefinitionMap.put("/document/**", "anon");
|
||||
filterChainDefinitionMap.put("/system/theme", "anon");
|
||||
|
||||
}
|
||||
|
||||
public static void ignoreCsrfFilter(Map<String, String> filterChainDefinitionMap) {
|
||||
filterChainDefinitionMap.put("/", "apikey, authc"); // 跳转到 / 不用校验 csrf
|
||||
filterChainDefinitionMap.put("/language", "apikey, authc");// 跳转到 /language 不用校验 csrf
|
||||
filterChainDefinitionMap.put("/document", "apikey, authc"); // 跳转到 /document 不用校验 csrf
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import io.metersphere.security.ApiKeyFilter;
|
|||
import io.metersphere.security.CsrfFilter;
|
||||
import io.metersphere.security.UserModularRealmAuthenticator;
|
||||
import io.metersphere.security.realm.LdapRealm;
|
||||
import io.metersphere.security.realm.ShiroDBRealm;
|
||||
import io.metersphere.security.realm.LocalRealm;
|
||||
import org.apache.shiro.authc.pam.FirstSuccessfulStrategy;
|
||||
import org.apache.shiro.authc.pam.ModularRealmAuthenticator;
|
||||
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
|
||||
|
@ -70,7 +70,7 @@ public class ShiroConfig implements EnvironmentAware {
|
|||
}
|
||||
|
||||
/**
|
||||
* securityManager 不用直接注入shiroDBRealm,可能会导致事务失效
|
||||
* securityManager 不用直接注入 Realm,可能会导致事务失效
|
||||
* 解决方法见 handleContextRefresh
|
||||
* http://www.debugrun.com/a/NKS9EJQ.html
|
||||
*/
|
||||
|
@ -85,8 +85,8 @@ public class ShiroConfig implements EnvironmentAware {
|
|||
|
||||
@Bean
|
||||
@DependsOn("lifecycleBeanPostProcessor")
|
||||
public ShiroDBRealm shiroDBRealm() {
|
||||
return new ShiroDBRealm();
|
||||
public LocalRealm localRealm() {
|
||||
return new LocalRealm();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
@ -135,10 +135,10 @@ public class ShiroConfig implements EnvironmentAware {
|
|||
public void handleContextRefresh(ContextRefreshedEvent event) {
|
||||
ApplicationContext context = event.getApplicationContext();
|
||||
List<Realm> realmList = new ArrayList<>();
|
||||
ShiroDBRealm shiroDBRealm = context.getBean(ShiroDBRealm.class);
|
||||
LocalRealm localRealm = context.getBean(LocalRealm.class);
|
||||
LdapRealm ldapRealm = context.getBean(LdapRealm.class);
|
||||
// 基本realm
|
||||
realmList.add(shiroDBRealm);
|
||||
realmList.add(localRealm);
|
||||
realmList.add(ldapRealm);
|
||||
context.getBean(DefaultWebSecurityManager.class).setRealms(realmList);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import io.metersphere.service.ProjectService;
|
|||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
@ -84,4 +85,13 @@ public class ProjectController {
|
|||
projectService.updateProject(Project);
|
||||
}
|
||||
|
||||
@PostMapping(value = "upload/files/{projectId}", consumes = {"multipart/form-data"})
|
||||
public void uploadFiles(@PathVariable String projectId, @RequestPart(value = "file") List<MultipartFile> files) {
|
||||
projectService.uploadFiles(projectId, files);
|
||||
}
|
||||
|
||||
@GetMapping(value = "delete/file/{fileId}")
|
||||
public void deleteFile(@PathVariable String fileId) {
|
||||
projectService.deleteFile(fileId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.controller.handler;
|
|||
|
||||
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.controller.ResultHolder;
|
||||
import org.apache.shiro.ShiroException;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
|
@ -32,8 +33,9 @@ public class RestControllerExceptionHandler {
|
|||
|
||||
|
||||
@ExceptionHandler(SQLException.class)
|
||||
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
|
||||
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, SQLException e) {
|
||||
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
return ResultHolder.error("SQL error happened, please check logs.");
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class LoginRequest {
|
|||
try {
|
||||
RsaKey rsaKey = CommonBeanFactory.getBean(RsaKey.class);
|
||||
return RsaUtil.privateDecrypt(username, rsaKey.getPrivateKey());
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (Exception e) {
|
||||
return username;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class LoginRequest {
|
|||
try {
|
||||
RsaKey rsaKey = CommonBeanFactory.getBean(RsaKey.class);
|
||||
return RsaUtil.privateDecrypt(password, rsaKey.getPrivateKey());
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (Exception e) {
|
||||
return password;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package io.metersphere.dto;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReviewLoad;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TestReviewLoadCaseDTO extends TestCaseReviewLoad {
|
||||
private String userName;
|
||||
private String caseName;
|
||||
private String projectName;
|
||||
private String caseStatus;
|
||||
private String num;
|
||||
}
|
|
@ -14,7 +14,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.ldap.core.DirContextOperations;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
|
@ -69,7 +68,7 @@ public class LdapController {
|
|||
userService.addLdapUser(user);
|
||||
}
|
||||
|
||||
// 执行 ShiroDBRealm 中 LDAP 登录逻辑
|
||||
// 执行 LocalRealm 中 LDAP 登录逻辑
|
||||
LoginRequest loginRequest = new LoginRequest();
|
||||
loginRequest.setUsername(userId);
|
||||
return userService.login(loginRequest);
|
||||
|
|
|
@ -15,7 +15,6 @@ import io.metersphere.dto.DashboardTestDTO;
|
|||
import io.metersphere.dto.LoadTestDTO;
|
||||
import io.metersphere.dto.ScheduleDao;
|
||||
import io.metersphere.performance.dto.LoadTestExportJmx;
|
||||
import io.metersphere.performance.dto.LoadTestFileDTO;
|
||||
import io.metersphere.performance.request.*;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.service.CheckPermissionService;
|
||||
|
@ -122,7 +121,7 @@ public class PerformanceTestController {
|
|||
}
|
||||
|
||||
@GetMapping("/project/{loadType}/{projectId}/{goPage}/{pageSize}")
|
||||
public Pager<List<LoadTestFileDTO>> getProjectFiles(@PathVariable String projectId, @PathVariable String loadType,
|
||||
public Pager<List<FileMetadata>> getProjectFiles(@PathVariable String projectId, @PathVariable String loadType,
|
||||
@PathVariable int goPage, @PathVariable int pageSize) {
|
||||
checkPermissionService.checkProjectOwner(projectId);
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
|
@ -148,7 +147,7 @@ public class PerformanceTestController {
|
|||
@GetMapping("/file/metadata/{testId}")
|
||||
public List<FileMetadata> getFileMetadata(@PathVariable String testId) {
|
||||
checkPermissionService.checkPerformanceTestOwner(testId);
|
||||
return fileService.getFileMetadataByTestId(testId);
|
||||
return performanceTestService.getFileMetadataByTestId(testId);
|
||||
}
|
||||
|
||||
@GetMapping("/file/getMetadataById/{metadataId}")
|
||||
|
@ -156,6 +155,11 @@ public class PerformanceTestController {
|
|||
return fileService.getFileMetadataById(metadataId);
|
||||
}
|
||||
|
||||
@PostMapping("/file/{projectId}/getMetadataByName")
|
||||
public List<FileMetadata> getProjectMetadataByName(@PathVariable String projectId, @RequestBody QueryProjectFileRequest request) {
|
||||
return fileService.getProjectFiles(projectId, request);
|
||||
}
|
||||
|
||||
@PostMapping("/file/download")
|
||||
public ResponseEntity<byte[]> downloadJmx(@RequestBody FileOperationRequest fileOperationRequest) {
|
||||
byte[] bytes = fileService.loadFileAsBytes(fileOperationRequest.getId());
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package io.metersphere.performance.dto;
|
||||
|
||||
import io.metersphere.base.domain.FileMetadata;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoadTestFileDTO extends FileMetadata {
|
||||
private String testId;
|
||||
private String testName;
|
||||
}
|
|
@ -15,6 +15,7 @@ import io.metersphere.i18n.Translator;
|
|||
import io.metersphere.performance.engine.docker.DockerTestEngine;
|
||||
import io.metersphere.performance.parse.EngineSourceParser;
|
||||
import io.metersphere.performance.parse.EngineSourceParserFactory;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.service.FileService;
|
||||
import io.metersphere.service.KubernetesTestEngine;
|
||||
import io.metersphere.service.TestResourcePoolService;
|
||||
|
@ -46,6 +47,7 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
public class EngineFactory {
|
||||
private static FileService fileService;
|
||||
private static PerformanceTestService performanceTestService;
|
||||
private static TestResourcePoolService testResourcePoolService;
|
||||
private static Class<? extends KubernetesTestEngine> kubernetesTestEngineClass;
|
||||
|
||||
|
@ -87,7 +89,7 @@ public class EngineFactory {
|
|||
}
|
||||
|
||||
public static EngineContext createContext(LoadTestWithBLOBs loadTest, String resourceId, double ratio, long startTime, String reportId, int resourceIndex) {
|
||||
final List<FileMetadata> fileMetadataList = fileService.getFileMetadataByTestId(loadTest.getId());
|
||||
final List<FileMetadata> fileMetadataList = performanceTestService.getFileMetadataByTestId(loadTest.getId());
|
||||
if (org.springframework.util.CollectionUtils.isEmpty(fileMetadataList)) {
|
||||
MSException.throwException(Translator.get("run_load_test_file_not_found") + loadTest.getId());
|
||||
}
|
||||
|
@ -235,4 +237,9 @@ public class EngineFactory {
|
|||
public void setTestResourcePoolService(TestResourcePoolService testResourcePoolService) {
|
||||
EngineFactory.testResourcePoolService = testResourcePoolService;
|
||||
}
|
||||
|
||||
@Resource
|
||||
public void setPerformanceTestService(PerformanceTestService performanceTestService) {
|
||||
EngineFactory.performanceTestService = performanceTestService;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -676,6 +676,13 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
((List<?>) durations).remove(0);
|
||||
duration = o.toString();
|
||||
}
|
||||
Object units = context.getProperty("unit");
|
||||
String unit = "S";
|
||||
if (units instanceof List) {
|
||||
Object o = ((List<?>) units).get(0);
|
||||
((List<?>) units).remove(0);
|
||||
unit = o.toString();
|
||||
}
|
||||
Object deleteds = context.getProperty("deleted");
|
||||
String deleted = "false";
|
||||
if (deleteds instanceof List) {
|
||||
|
@ -691,6 +698,17 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
enabled = o.toString();
|
||||
}
|
||||
|
||||
switch (unit) {
|
||||
case "M":
|
||||
duration = String.valueOf(Long.parseLong(duration) * 60);
|
||||
break;
|
||||
case "H":
|
||||
duration = String.valueOf(Long.parseLong(duration) * 60 * 60);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
threadGroup.setAttribute("enabled", enabled);
|
||||
if (BooleanUtils.toBoolean(deleted)) {
|
||||
threadGroup.setAttribute("enabled", "false");
|
||||
|
@ -761,6 +779,13 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
((List<?>) holds).remove(0);
|
||||
hold = o.toString();
|
||||
}
|
||||
Object units = context.getProperty("unit");
|
||||
String unit = "S";
|
||||
if (units instanceof List) {
|
||||
Object o = ((List<?>) units).get(0);
|
||||
((List<?>) units).remove(0);
|
||||
unit = o.toString();
|
||||
}
|
||||
Object deleteds = context.getProperty("deleted");
|
||||
String deleted = "false";
|
||||
if (deleteds instanceof List) {
|
||||
|
@ -776,6 +801,17 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
enabled = o.toString();
|
||||
}
|
||||
|
||||
switch (unit) {
|
||||
case "M":
|
||||
hold = String.valueOf(Long.parseLong(hold) * 60);
|
||||
break;
|
||||
case "H":
|
||||
hold = String.valueOf(Long.parseLong(hold) * 60 * 60);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
threadGroup.setAttribute("enabled", enabled);
|
||||
if (BooleanUtils.toBoolean(deleted)) {
|
||||
threadGroup.setAttribute("enabled", "false");
|
||||
|
@ -928,10 +964,10 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
}
|
||||
|
||||
private Element createStringProp(Document document, String name, String value) {
|
||||
Element unit = document.createElement(STRING_PROP);
|
||||
unit.setAttribute("name", name);
|
||||
unit.appendChild(document.createTextNode(value));
|
||||
return unit;
|
||||
Element element = document.createElement(STRING_PROP);
|
||||
element.setAttribute("name", name);
|
||||
element.appendChild(document.createTextNode(value));
|
||||
return element;
|
||||
}
|
||||
|
||||
private void processThreadGroupName(Element threadGroup) {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package io.metersphere.performance.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryProjectFileRequest {
|
||||
private String filename;
|
||||
}
|
|
@ -21,7 +21,6 @@ import io.metersphere.dto.ScheduleDao;
|
|||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.job.sechedule.PerformanceTestJob;
|
||||
import io.metersphere.performance.dto.LoadTestExportJmx;
|
||||
import io.metersphere.performance.dto.LoadTestFileDTO;
|
||||
import io.metersphere.performance.engine.Engine;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.performance.engine.producer.LoadTestProducer;
|
||||
|
@ -124,8 +123,10 @@ public class PerformanceTestService {
|
|||
loadTestFileMapper.deleteByExample(loadTestFileExample);
|
||||
|
||||
if (!CollectionUtils.isEmpty(loadTestFiles)) {
|
||||
final List<String> fileIds = loadTestFiles.stream().map(LoadTestFile::getFileId).collect(Collectors.toList());
|
||||
fileService.deleteFileByIds(fileIds);
|
||||
List<String> fileIds = loadTestFiles.stream().map(LoadTestFile::getFileId).collect(Collectors.toList());
|
||||
LoadTestFileExample example3 = new LoadTestFileExample();
|
||||
example3.createCriteria().andFileIdIn(fileIds);
|
||||
loadTestFileMapper.deleteByExample(example3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +139,7 @@ public class PerformanceTestService {
|
|||
// 导入项目里其他的文件
|
||||
this.importFiles(importFileIds, loadTest.getId(), request.getFileSorts());
|
||||
// 保存上传的文件
|
||||
this.saveUploadFiles(files, loadTest.getId(), request.getFileSorts());
|
||||
this.saveUploadFiles(files, loadTest, request.getFileSorts());
|
||||
//关联转化的文件
|
||||
this.conversionFiles(loadTest.getId(), request.getConversionFileIdList());
|
||||
return loadTest.getId();
|
||||
|
@ -168,14 +169,15 @@ public class PerformanceTestService {
|
|||
}
|
||||
}
|
||||
|
||||
private void saveUploadFiles(List<MultipartFile> files, String testId, Map<String, Integer> fileSorts) {
|
||||
private void saveUploadFiles(List<MultipartFile> files, LoadTest loadTest, Map<String, Integer> fileSorts) {
|
||||
if (files != null) {
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
MultipartFile file = files.get(i);
|
||||
final FileMetadata fileMetadata = fileService.saveFile(file, fileSorts.getOrDefault(file.getOriginalFilename(), i));
|
||||
FileMetadata fileMetadata = fileService.saveFile(file, loadTest.getProjectId());
|
||||
LoadTestFile loadTestFile = new LoadTestFile();
|
||||
loadTestFile.setTestId(testId);
|
||||
loadTestFile.setTestId(loadTest.getId());
|
||||
loadTestFile.setFileId(fileMetadata.getId());
|
||||
loadTestFile.setSort(fileSorts.getOrDefault(file.getOriginalFilename(), i));
|
||||
loadTestFileMapper.insert(loadTestFile);
|
||||
}
|
||||
}
|
||||
|
@ -184,12 +186,11 @@ public class PerformanceTestService {
|
|||
private void importFiles(List<String> importFileIds, String testId, Map<String, Integer> fileSorts) {
|
||||
for (int i = 0; i < importFileIds.size(); i++) {
|
||||
String fileId = importFileIds.get(i);
|
||||
FileMetadata fileMetadata = fileService.copyFile(fileId);
|
||||
fileMetadata.setSort(fileSorts.getOrDefault(fileMetadata.getName(), i));
|
||||
fileService.updateFileMetadata(fileMetadata);
|
||||
FileMetadata fileMetadata = fileService.getFileMetadataById(fileId);
|
||||
LoadTestFile loadTestFile = new LoadTestFile();
|
||||
loadTestFile.setTestId(testId);
|
||||
loadTestFile.setFileId(fileMetadata.getId());
|
||||
loadTestFile.setFileId(fileId);
|
||||
loadTestFile.setSort(fileSorts.getOrDefault(fileMetadata.getName(), i));
|
||||
loadTestFileMapper.insert(loadTestFile);
|
||||
}
|
||||
}
|
||||
|
@ -230,16 +231,25 @@ public class PerformanceTestService {
|
|||
}
|
||||
// 新选择了一个文件,删除原来的文件
|
||||
List<FileMetadata> updatedFiles = request.getUpdatedFileList();
|
||||
List<FileMetadata> originFiles = fileService.getFileMetadataByTestId(request.getId());
|
||||
List<FileMetadata> originFiles = getFileMetadataByTestId(request.getId());
|
||||
List<String> updatedFileIds = updatedFiles.stream().map(FileMetadata::getId).collect(Collectors.toList());
|
||||
List<String> originFileIds = originFiles.stream().map(FileMetadata::getId).collect(Collectors.toList());
|
||||
|
||||
// 相减
|
||||
List<String> deleteFileIds = ListUtils.subtract(originFileIds, updatedFileIds);
|
||||
fileService.deleteFileByIds(deleteFileIds);
|
||||
// 删除已经不相关的文件
|
||||
if (!CollectionUtils.isEmpty(deleteFileIds)) {
|
||||
LoadTestFileExample example3 = new LoadTestFileExample();
|
||||
example3.createCriteria().andFileIdIn(deleteFileIds);
|
||||
loadTestFileMapper.deleteByExample(example3);
|
||||
}
|
||||
|
||||
// 导入项目里其他的文件
|
||||
List<String> addFileIds = ListUtils.subtract(updatedFileIds, originFileIds);
|
||||
this.importFiles(addFileIds, request.getId(), request.getFileSorts());
|
||||
this.saveUploadFiles(files, request.getId(), request.getFileSorts());
|
||||
|
||||
// 处理新上传的文件
|
||||
this.saveUploadFiles(files, loadTest, request.getFileSorts());
|
||||
|
||||
loadTest.setName(request.getName());
|
||||
loadTest.setProjectId(request.getProjectId());
|
||||
|
@ -400,7 +410,7 @@ public class PerformanceTestService {
|
|||
}
|
||||
|
||||
public List<LoadTestExportJmx> getJmxContent(String testId) {
|
||||
List<FileMetadata> fileMetadataList = fileService.getFileMetadataByTestId(testId);
|
||||
List<FileMetadata> fileMetadataList = getFileMetadataByTestId(testId);
|
||||
List<LoadTestExportJmx> results = new ArrayList<>();
|
||||
for (FileMetadata metadata : fileMetadataList) {
|
||||
if (FileType.JMX.name().equals(metadata.getType())) {
|
||||
|
@ -449,13 +459,7 @@ public class PerformanceTestService {
|
|||
List<LoadTestFile> loadTestFiles = loadTestFileMapper.selectByExample(loadTestFileExample);
|
||||
if (!CollectionUtils.isEmpty(loadTestFiles)) {
|
||||
loadTestFiles.forEach(loadTestFile -> {
|
||||
FileMetadata fileMetadata = fileService.copyFile(loadTestFile.getFileId());
|
||||
if (fileMetadata == null) {
|
||||
// 如果性能测试出现文件变更,这里会有 null
|
||||
return;
|
||||
}
|
||||
loadTestFile.setTestId(copy.getId());
|
||||
loadTestFile.setFileId(fileMetadata.getId());
|
||||
loadTestFileMapper.insert(loadTestFile);
|
||||
});
|
||||
}
|
||||
|
@ -557,13 +561,18 @@ public class PerformanceTestService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<LoadTestFileDTO> getProjectFiles(String projectId, String loadType) {
|
||||
public List<FileMetadata> getProjectFiles(String projectId, String loadType) {
|
||||
List<String> loadTypes = new ArrayList<>();
|
||||
loadTypes.add(StringUtils.upperCase(loadType));
|
||||
if (StringUtils.equalsIgnoreCase(loadType, "resource")) {
|
||||
loadTypes.add(FileType.CSV.name());
|
||||
loadTypes.add(FileType.JAR.name());
|
||||
}
|
||||
if (StringUtils.equalsIgnoreCase(loadType, "all")) {
|
||||
loadTypes.add(FileType.CSV.name());
|
||||
loadTypes.add(FileType.JAR.name());
|
||||
loadTypes.add(FileType.JMX.name());
|
||||
}
|
||||
return extLoadTestMapper.getProjectFiles(projectId, loadTypes);
|
||||
}
|
||||
|
||||
|
@ -580,4 +589,16 @@ public class PerformanceTestService {
|
|||
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<FileMetadata> getFileMetadataByTestId(String testId) {
|
||||
LoadTestFileExample loadTestFileExample = new LoadTestFileExample();
|
||||
loadTestFileExample.createCriteria().andTestIdEqualTo(testId);
|
||||
loadTestFileExample.setOrderByClause("sort asc");
|
||||
List<LoadTestFile> loadTestFiles = loadTestFileMapper.selectByExample(loadTestFileExample);
|
||||
|
||||
List<String> fileIds = loadTestFiles.stream().map(LoadTestFile::getFileId).collect(Collectors.toList());
|
||||
FileMetadataExample example = new FileMetadataExample();
|
||||
example.createCriteria().andIdIn(fileIds);
|
||||
return fileService.getFileMetadataByIds(fileIds);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ import java.util.stream.Collectors;
|
|||
* set realm
|
||||
* </p>
|
||||
*/
|
||||
public class ShiroDBRealm extends AuthorizingRealm {
|
||||
public class LocalRealm extends AuthorizingRealm {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(ShiroDBRealm.class);
|
||||
private Logger logger = LoggerFactory.getLogger(LocalRealm.class);
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
|
@ -7,8 +7,10 @@ import io.metersphere.base.mapper.LoadTestFileMapper;
|
|||
import io.metersphere.base.mapper.TestCaseFileMapper;
|
||||
import io.metersphere.commons.constants.FileType;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.performance.request.QueryProjectFileRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -37,21 +39,6 @@ public class FileService {
|
|||
return fileContent.getFile();
|
||||
}
|
||||
|
||||
public List<FileMetadata> getFileMetadataByTestId(String testId) {
|
||||
LoadTestFileExample loadTestFileExample = new LoadTestFileExample();
|
||||
loadTestFileExample.createCriteria().andTestIdEqualTo(testId);
|
||||
final List<LoadTestFile> loadTestFiles = loadTestFileMapper.selectByExample(loadTestFileExample);
|
||||
|
||||
if (CollectionUtils.isEmpty(loadTestFiles)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<String> fileIds = loadTestFiles.stream().map(LoadTestFile::getFileId).collect(Collectors.toList());
|
||||
FileMetadataExample example = new FileMetadataExample();
|
||||
example.createCriteria().andIdIn(fileIds);
|
||||
example.setOrderByClause("sort asc"); // 安装顺序排序
|
||||
return fileMetadataMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public FileContent getFileContent(String fileId) {
|
||||
return fileContentMapper.selectByPrimaryKey(fileId);
|
||||
}
|
||||
|
@ -86,20 +73,16 @@ public class FileService {
|
|||
fileContentMapper.deleteByExample(example2);
|
||||
}
|
||||
|
||||
public FileMetadata saveFile(MultipartFile file) {
|
||||
return saveFile(file, 0);
|
||||
}
|
||||
|
||||
public FileMetadata saveFile(MultipartFile file, Integer sort) {
|
||||
public FileMetadata saveFile(MultipartFile file, String projectId) {
|
||||
final FileMetadata fileMetadata = new FileMetadata();
|
||||
fileMetadata.setId(UUID.randomUUID().toString());
|
||||
fileMetadata.setName(file.getOriginalFilename());
|
||||
fileMetadata.setSize(file.getSize());
|
||||
fileMetadata.setProjectId(projectId);
|
||||
fileMetadata.setCreateTime(System.currentTimeMillis());
|
||||
fileMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
FileType fileType = getFileType(fileMetadata.getName());
|
||||
fileMetadata.setType(fileType.name());
|
||||
fileMetadata.setSort(sort);
|
||||
fileMetadataMapper.insert(fileMetadata);
|
||||
|
||||
FileContent fileContent = new FileContent();
|
||||
|
@ -114,7 +97,11 @@ public class FileService {
|
|||
return fileMetadata;
|
||||
}
|
||||
|
||||
public FileMetadata saveFile(File file, byte[] fileByte, Integer sort) {
|
||||
public FileMetadata saveFile(MultipartFile file) {
|
||||
return saveFile(file, null);
|
||||
}
|
||||
|
||||
public FileMetadata saveFile(File file, byte[] fileByte) {
|
||||
final FileMetadata fileMetadata = new FileMetadata();
|
||||
fileMetadata.setId(UUID.randomUUID().toString());
|
||||
fileMetadata.setName(file.getName());
|
||||
|
@ -123,7 +110,6 @@ public class FileService {
|
|||
fileMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
FileType fileType = getFileType(fileMetadata.getName());
|
||||
fileMetadata.setType(fileType.name());
|
||||
fileMetadata.setSort(sort);
|
||||
fileMetadataMapper.insert(fileMetadata);
|
||||
|
||||
FileContent fileContent = new FileContent();
|
||||
|
@ -197,12 +183,6 @@ public class FileService {
|
|||
return fileMetadataMapper.selectByPrimaryKey(fileId);
|
||||
}
|
||||
|
||||
public List<FileMetadata> getProjectJMXs(String projectId) {
|
||||
FileMetadataExample example = new FileMetadataExample();
|
||||
fileMetadataMapper.selectByExample(example);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void updateFileMetadata(FileMetadata fileMetadata) {
|
||||
fileMetadataMapper.updateByPrimaryKeySelective(fileMetadata);
|
||||
}
|
||||
|
@ -217,4 +197,23 @@ public class FileService {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public List<FileMetadata> getProjectFiles(String projectId, QueryProjectFileRequest request) {
|
||||
FileMetadataExample example = new FileMetadataExample();
|
||||
FileMetadataExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andProjectIdEqualTo(projectId);
|
||||
if (!StringUtils.isEmpty(request.getFilename())) {
|
||||
criteria.andNameEqualTo(request.getFilename());
|
||||
}
|
||||
return fileMetadataMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<FileMetadata> getFileMetadataByIds(List<String> fileIds) {
|
||||
if (CollectionUtils.isEmpty(fileIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
FileMetadataExample example = new FileMetadataExample();
|
||||
example.createCriteria().andIdIn(fileIds);
|
||||
return fileMetadataMapper.selectByExample(example);
|
||||
}
|
||||
}
|
|
@ -3,13 +3,12 @@ package io.metersphere.service;
|
|||
import io.metersphere.api.dto.DeleteAPITestRequest;
|
||||
import io.metersphere.api.dto.QueryAPITestRequest;
|
||||
import io.metersphere.api.service.APITestService;
|
||||
import io.metersphere.base.domain.LoadTest;
|
||||
import io.metersphere.base.domain.LoadTestExample;
|
||||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.base.domain.ProjectExample;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ApiTestFileMapper;
|
||||
import io.metersphere.base.mapper.LoadTestFileMapper;
|
||||
import io.metersphere.base.mapper.LoadTestMapper;
|
||||
import io.metersphere.base.mapper.ProjectMapper;
|
||||
import io.metersphere.base.mapper.ext.*;
|
||||
import io.metersphere.base.mapper.ext.ExtProjectMapper;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.ServiceUtils;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
|
@ -17,6 +16,7 @@ import io.metersphere.controller.request.ProjectRequest;
|
|||
import io.metersphere.dto.ProjectDTO;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.request.DeleteTestPlanRequest;
|
||||
import io.metersphere.performance.request.QueryProjectFileRequest;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.track.service.TestCaseService;
|
||||
import io.metersphere.track.service.TestPlanProjectService;
|
||||
|
@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
@ -43,14 +44,6 @@ public class ProjectService {
|
|||
@Resource
|
||||
private LoadTestMapper loadTestMapper;
|
||||
@Resource
|
||||
private ExtTestCaseMapper extTestCaseMapper;
|
||||
@Resource
|
||||
private ExtTestPlanMapper extTestPlanMapper;
|
||||
@Resource
|
||||
private ExtLoadTestMapper extLoadTestMapperMapper;
|
||||
@Resource
|
||||
private ExtApiTestMapper extApiTestMapper;
|
||||
@Resource
|
||||
private TestPlanService testPlanService;
|
||||
@Resource
|
||||
private TestCaseService testCaseService;
|
||||
|
@ -58,6 +51,12 @@ public class ProjectService {
|
|||
private APITestService apiTestService;
|
||||
@Resource
|
||||
private TestPlanProjectService testPlanProjectService;
|
||||
@Resource
|
||||
private FileService fileService;
|
||||
@Resource
|
||||
private LoadTestFileMapper loadTestFileMapper;
|
||||
@Resource
|
||||
private ApiTestFileMapper apiTestFileMapper;
|
||||
|
||||
public Project addProject(Project project) {
|
||||
if (StringUtils.isBlank(project.getName())) {
|
||||
|
@ -169,4 +168,49 @@ public class ProjectService {
|
|||
public Project getProjectById(String id) {
|
||||
return projectMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void uploadFiles(String projectId, List<MultipartFile> files) {
|
||||
if (files != null) {
|
||||
for (MultipartFile file : files) {
|
||||
QueryProjectFileRequest request = new QueryProjectFileRequest();
|
||||
request.setFilename(file.getOriginalFilename());
|
||||
if (CollectionUtils.isEmpty(fileService.getProjectFiles(projectId, request))) {
|
||||
fileService.saveFile(file, projectId);
|
||||
} else {
|
||||
MSException.throwException(Translator.get("project_file_already_exists"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteFile(String fileId) {
|
||||
LoadTestFileExample example1 = new LoadTestFileExample();
|
||||
example1.createCriteria().andFileIdEqualTo(fileId);
|
||||
List<LoadTestFile> loadTestFiles = loadTestFileMapper.selectByExample(example1);
|
||||
String errorMessage = "";
|
||||
if (loadTestFiles.size() > 0) {
|
||||
List<String> testIds = loadTestFiles.stream().map(LoadTestFile::getTestId).distinct().collect(Collectors.toList());
|
||||
LoadTestExample example = new LoadTestExample();
|
||||
example.createCriteria().andIdIn(testIds);
|
||||
List<LoadTest> loadTests = loadTestMapper.selectByExample(example);
|
||||
errorMessage += Translator.get("load_test") + ": " + StringUtils.join(loadTests.stream().map(LoadTest::getName).toArray(), ",");
|
||||
errorMessage += "\n";
|
||||
}
|
||||
ApiTestFileExample example2 = new ApiTestFileExample();
|
||||
example2.createCriteria().andFileIdEqualTo(fileId);
|
||||
List<ApiTestFile> apiTestFiles = apiTestFileMapper.selectByExample(example2);
|
||||
if (apiTestFiles.size() > 0) {
|
||||
List<String> testIds = apiTestFiles.stream().map(ApiTestFile::getTestId).distinct().collect(Collectors.toList());
|
||||
LoadTestExample example = new LoadTestExample();
|
||||
example.createCriteria().andIdIn(testIds);
|
||||
QueryAPITestRequest request = new QueryAPITestRequest();
|
||||
request.setIds(testIds);
|
||||
List<ApiTest> apiTests = apiTestService.listByIds(request);
|
||||
errorMessage += Translator.get("api_test") + ": " + StringUtils.join(apiTests.stream().map(ApiTest::getName).toArray(), ",");
|
||||
}
|
||||
if (StringUtils.isNotBlank(errorMessage)) {
|
||||
MSException.throwException(errorMessage + Translator.get("project_file_in_use"));
|
||||
}
|
||||
fileService.deleteFileById(fileId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||
import io.metersphere.api.dto.definition.ApiSwaggerUrlDTO;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ScheduleMapper;
|
||||
import io.metersphere.base.mapper.SwaggerUrlProjectMapper;
|
||||
import io.metersphere.base.mapper.UserMapper;
|
||||
import io.metersphere.base.mapper.*;
|
||||
import io.metersphere.base.mapper.ext.ExtScheduleMapper;
|
||||
import io.metersphere.commons.constants.ScheduleGroup;
|
||||
import io.metersphere.commons.constants.ScheduleType;
|
||||
|
@ -38,6 +36,10 @@ import java.util.stream.Collectors;
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ScheduleService {
|
||||
|
||||
@Resource
|
||||
private TestPlanMapper testPlanMapper;
|
||||
@Resource
|
||||
private ApiScenarioMapper apiScenarioMapper;
|
||||
@Resource
|
||||
private ScheduleMapper scheduleMapper;
|
||||
@Resource
|
||||
|
@ -214,8 +216,8 @@ public class ScheduleService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<TaskInfoResult> findRunningTaskInfoByProjectID(String projectID) {
|
||||
List<TaskInfoResult> runningTaskInfoList = extScheduleMapper.findRunningTaskInfoByProjectID(projectID);
|
||||
public List<TaskInfoResult> findRunningTaskInfoByProjectID(String projectID, List<String> typeFilter) {
|
||||
List<TaskInfoResult> runningTaskInfoList = extScheduleMapper.findRunningTaskInfoByProjectID(projectID, typeFilter);
|
||||
return runningTaskInfoList;
|
||||
}
|
||||
|
||||
|
@ -227,13 +229,19 @@ public class ScheduleService {
|
|||
TriggerKey triggerKey = null;
|
||||
Class clazz = null;
|
||||
if("testPlan".equals(request.getScheduleFrom())){
|
||||
TestPlan testPlan = testPlanMapper.selectByPrimaryKey(request.getResourceId());
|
||||
schedule.setName(testPlan.getName());
|
||||
schedule.setProjectId(testPlan.getProjectId());
|
||||
schedule.setGroup(ScheduleGroup.TEST_PLAN_TEST.name());
|
||||
schedule.setType(ScheduleType.CRON.name());
|
||||
jobKey = TestPlanTestJob.getJobKey(request.getResourceId());
|
||||
triggerKey = TestPlanTestJob.getTriggerKey(request.getResourceId());
|
||||
clazz = TestPlanTestJob.class;
|
||||
}else {
|
||||
}else { // 实际上在场景中添加定时任务并不会执行到这里?
|
||||
//默认为情景
|
||||
ApiScenarioWithBLOBs apiScene = apiScenarioMapper.selectByPrimaryKey(request.getResourceId());
|
||||
schedule.setName(apiScene.getName());
|
||||
schedule.setProjectId(apiScene.getProjectId());
|
||||
schedule.setGroup(ScheduleGroup.API_SCENARIO_TEST.name());
|
||||
schedule.setType(ScheduleType.CRON.name());
|
||||
jobKey = ApiScenarioTestJob.getJobKey(request.getResourceId());
|
||||
|
|
|
@ -27,7 +27,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import javax.annotation.Resource;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Service
|
||||
|
@ -205,8 +208,8 @@ public class SystemParameterService {
|
|||
|
||||
public String getValue(String key) {
|
||||
SystemParameter param = systemParameterMapper.selectByPrimaryKey(key);
|
||||
if (param == null) {
|
||||
return null;
|
||||
if (param == null || StringUtils.isBlank(param.getParamValue())) {
|
||||
return "";
|
||||
}
|
||||
return param.getParamValue();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import io.metersphere.track.dto.TestPlanCaseDTO;
|
|||
import io.metersphere.track.request.testcase.EditTestCaseRequest;
|
||||
import io.metersphere.track.request.testcase.QueryTestCaseRequest;
|
||||
import io.metersphere.track.request.testcase.TestCaseBatchRequest;
|
||||
import io.metersphere.track.request.testcase.TestCaseMinderEditRequest;
|
||||
import io.metersphere.track.request.testplan.FileOperationRequest;
|
||||
import io.metersphere.track.request.testplancase.QueryTestPlanCaseRequest;
|
||||
import io.metersphere.track.service.TestCaseService;
|
||||
|
@ -59,6 +60,12 @@ public class TestCaseController {
|
|||
return testCaseService.listTestCase(request);
|
||||
}
|
||||
|
||||
@GetMapping("/list/detail/{projectId}")
|
||||
public List<TestCaseWithBLOBs> listDetail(@PathVariable String projectId) {
|
||||
checkPermissionService.checkProjectOwner(projectId);
|
||||
return testCaseService.listTestCaseDetail(projectId);
|
||||
}
|
||||
|
||||
/*jenkins项目下所有接口和性能测试用例*/
|
||||
@GetMapping("/list/method/{projectId}")
|
||||
public List<TestCaseDTO> listByMethod(@PathVariable String projectId) {
|
||||
|
@ -195,4 +202,11 @@ public class TestCaseController {
|
|||
return testCaseService.addTestCase(testCaseWithBLOBs);
|
||||
}
|
||||
|
||||
@PostMapping("/minder/edit")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void minderEdit(@RequestBody TestCaseMinderEditRequest request) {
|
||||
testCaseService.minderEdit(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@ public class TestCaseIssuesController {
|
|||
issuesService.closeLocalIssue(id);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
public void deleteIssue(@PathVariable String id) {
|
||||
issuesService.deleteIssue(id);
|
||||
@PostMapping("/delete")
|
||||
public void deleteIssue(@RequestBody IssuesRequest request) {
|
||||
issuesService.deleteIssue(request);
|
||||
}
|
||||
|
||||
@GetMapping("/tapd/user/{caseId}")
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
package io.metersphere.track.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.TestPlanApiCaseDTO;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest;
|
||||
import io.metersphere.track.request.testreview.TestReviewApiCaseBatchRequest;
|
||||
import io.metersphere.track.service.TestCaseReviewApiCaseService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test/case/review/api/case")
|
||||
public class TestCaseReviewApiCaseController {
|
||||
@Resource
|
||||
private TestCaseReviewApiCaseService testCaseReviewApiCaseService;
|
||||
@PostMapping("/list/{goPage}/{pageSize}")
|
||||
public Pager<List<TestPlanApiCaseDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, testCaseReviewApiCaseService.list(request));
|
||||
}
|
||||
@PostMapping("/relevance/list/{goPage}/{pageSize}")
|
||||
public Pager<List<ApiTestCaseDTO>> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return PageUtils.setPageInfo(page, testCaseReviewApiCaseService.relevanceList(request));
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
return testCaseReviewApiCaseService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void deleteApiCaseBath(@RequestBody TestReviewApiCaseBatchRequest request) {
|
||||
testCaseReviewApiCaseService.deleteApiCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/update/env")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void batchUpdateEnv(@RequestBody TestPlanApiCaseBatchRequest request) {
|
||||
testCaseReviewApiCaseService.batchUpdateEnv(request);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package io.metersphere.track.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.automation.*;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.track.dto.RelevanceScenarioRequest;
|
||||
import io.metersphere.track.request.testcase.TestPlanApiCaseBatchRequest;
|
||||
import io.metersphere.track.service.TestCaseReviewScenarioCaseService;
|
||||
import io.metersphere.track.service.TestPlanScenarioCaseService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test/case/review/scenario/case")
|
||||
public class TestCaseReviewScenarioCaseController {
|
||||
@Resource
|
||||
TestCaseReviewScenarioCaseService testCaseReviewScenarioCaseService;
|
||||
|
||||
@PostMapping("/list/{goPage}/{pageSize}")
|
||||
public Pager<List<ApiScenarioDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestPlanScenarioRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, testCaseReviewScenarioCaseService.list(request));
|
||||
}
|
||||
|
||||
@PostMapping("/relevance/list/{goPage}/{pageSize}")
|
||||
public Pager<List<ApiScenarioDTO>> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiScenarioRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return PageUtils.setPageInfo(page, testCaseReviewScenarioCaseService.relevanceList(request));
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
return testCaseReviewScenarioCaseService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void deleteApiCaseBath(@RequestBody TestPlanApiCaseBatchRequest request) {
|
||||
testCaseReviewScenarioCaseService.deleteApiCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run")
|
||||
public String run(@RequestBody RunScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Completed.name());
|
||||
return testCaseReviewScenarioCaseService.run(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/update/env")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void batchUpdateEnv(@RequestBody RelevanceScenarioRequest request) {
|
||||
testCaseReviewScenarioCaseService.batchUpdateEnv(request);
|
||||
}
|
||||
}
|
|
@ -79,8 +79,9 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/add")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void addTestPlan(@RequestBody AddTestPlanRequest testPlan) {
|
||||
testPlanService.addTestPlan(testPlan);
|
||||
public String addTestPlan(@RequestBody AddTestPlanRequest testPlan) {
|
||||
return testPlanService.addTestPlan(testPlan);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
|
|
|
@ -39,6 +39,13 @@ public class TestPlanTestCaseController {
|
|||
return testPlanTestCaseService.listByPlanId(request);
|
||||
}
|
||||
|
||||
@GetMapping("/list/minder/{planId}")
|
||||
public List<TestPlanCaseDTO> listForMinder(@PathVariable String planId) {
|
||||
QueryTestPlanCaseRequest request = new QueryTestPlanCaseRequest();
|
||||
request.setPlanId(planId);
|
||||
return testPlanTestCaseService.listForMinder(planId);
|
||||
}
|
||||
|
||||
@GetMapping("/list/node/{planId}/{nodePaths}")
|
||||
public List<TestPlanCaseDTO> getTestPlanCasesByNodePath(@PathVariable String planId, @PathVariable String nodePaths) {
|
||||
String nodePath = nodePaths.replace("f", "/");
|
||||
|
@ -94,6 +101,12 @@ public class TestPlanTestCaseController {
|
|||
testPlanTestCaseService.editTestCase(testPlanTestCase);
|
||||
}
|
||||
|
||||
@PostMapping("/minder/edit")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void editTestCaseForMinder(@RequestBody List<TestPlanTestCaseWithBLOBs> testPlanTestCases) {
|
||||
testPlanTestCaseService.editTestCaseForMinder(testPlanTestCases);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/edit")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void editTestCaseBath(@RequestBody TestPlanCaseBatchRequest request) {
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
package io.metersphere.track.controller;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.LoadTest;
|
||||
import io.metersphere.base.domain.TestCaseReviewLoad;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.dto.TestReviewLoadCaseDTO;
|
||||
import io.metersphere.performance.request.RunTestPlanRequest;
|
||||
import io.metersphere.track.request.testplan.LoadCaseReportRequest;
|
||||
import io.metersphere.track.request.testplan.LoadCaseRequest;
|
||||
import io.metersphere.track.request.testreview.TestReviewRequest;
|
||||
import io.metersphere.track.service.TestCaseReviewLoadService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test/review/load/case")
|
||||
public class TestReviewLoadCaseController {
|
||||
@Resource
|
||||
private TestCaseReviewLoadService testCaseReviewLoadService;
|
||||
|
||||
@PostMapping("/relevance/list/{goPage}/{pageSize}")
|
||||
public Pager<List<LoadTest>> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestReviewRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, testCaseReviewLoadService.relevanceList(request));
|
||||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
public void relevanceCase(@RequestBody TestReviewRequest request) {
|
||||
testCaseReviewLoadService.relevanceCase(request);
|
||||
}
|
||||
|
||||
@PostMapping("/list/{goPage}/{pageSize}")
|
||||
public Pager<List<TestReviewLoadCaseDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody TestReviewRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, testCaseReviewLoadService.list(request));
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
public void delete(@PathVariable String id) {
|
||||
testCaseReviewLoadService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/run")
|
||||
public String run(@RequestBody RunTestPlanRequest request) {
|
||||
return testCaseReviewLoadService.run(request);
|
||||
}
|
||||
|
||||
@PostMapping("/report/exist")
|
||||
public Boolean isExistReport(@RequestBody LoadCaseReportRequest request) {
|
||||
return testCaseReviewLoadService.isExistReport(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
public void batchDelete(@RequestBody List<String> ids) {
|
||||
testCaseReviewLoadService.batchDelete(ids);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public void update(@RequestBody TestCaseReviewLoad testCaseReviewLoad) {
|
||||
testCaseReviewLoadService.update(testCaseReviewLoad);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue