feat(接口测试): 接口自动化场景步骤天添加csv场景变量入参数据的版本化控制
(cherry picked from commit f494c3e3b9
)
This commit is contained in:
parent
3d5ef126ef
commit
5534fd9253
|
@ -327,6 +327,12 @@
|
|||
<groupId>com.google.guava</groupId>
|
||||
<version>31.0.1-jre</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jgit</groupId>
|
||||
<artifactId>org.eclipse.jgit</artifactId>
|
||||
<version>5.13.0.202109080827-r</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -65,4 +65,6 @@ public class SaveApiScenarioRequest {
|
|||
private String environmentGroupId;
|
||||
|
||||
private String versionId;
|
||||
|
||||
private List<String> repositoryFileIds;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,15 @@ public class ScenarioVariable {
|
|||
*/
|
||||
private String minNumber;
|
||||
private String maxNumber;
|
||||
/**
|
||||
* repository csv
|
||||
*/
|
||||
private String fileResource;
|
||||
private String repositoryId;
|
||||
private String repositoryBranch;
|
||||
private String repositoryFilePath;
|
||||
|
||||
|
||||
|
||||
public ScenarioVariable() {
|
||||
|
||||
|
|
|
@ -31,11 +31,13 @@ import io.metersphere.commons.utils.CommonBeanFactory;
|
|||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.plugin.core.MsTestElement;
|
||||
import io.metersphere.service.EnvironmentGroupProjectService;
|
||||
import io.metersphere.utils.LoggerUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -235,6 +237,16 @@ public class ApiScenarioEnvService {
|
|||
String definition = apiScenarioWithBLOBs.getScenarioDefinition();
|
||||
MsScenario scenario = JSONObject.parseObject(definition, MsScenario.class);
|
||||
GenerateHashTreeUtil.parse(definition, scenario);
|
||||
// 添加csv版本控制台打印信息
|
||||
try {
|
||||
if (Class.forName("io.metersphere.xpack.repository.service.GitRepositoryService") != null) {
|
||||
Class clazz = Class.forName("io.metersphere.xpack.repository.service.GitRepositoryService");
|
||||
Method method = clazz.getMethod("getCsvVersionScriptProcess", String.class, MsTestElement.class);
|
||||
method.invoke(CommonBeanFactory.getBean("gitRepositoryService"), apiScenarioWithBLOBs.getId(), scenario);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
LoggerUtil.error("不存在GitRepositoryService类");
|
||||
}
|
||||
if (StringUtils.equals(environmentType, EnvironmentType.JSON.toString())) {
|
||||
scenario.setEnvironmentMap(JSON.parseObject(environmentJson, Map.class));
|
||||
} else if (StringUtils.equals(environmentType, EnvironmentType.GROUP.toString())) {
|
||||
|
|
|
@ -11,10 +11,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig;
|
|||
import io.metersphere.api.exec.queue.DBTestQueue;
|
||||
import io.metersphere.api.exec.utils.GenerateHashTreeUtil;
|
||||
import io.metersphere.api.jmeter.JMeterService;
|
||||
import io.metersphere.api.service.ApiExecutionQueueService;
|
||||
import io.metersphere.api.service.ApiScenarioReportService;
|
||||
import io.metersphere.api.service.ApiScenarioReportStructureService;
|
||||
import io.metersphere.api.service.TcpApiParamService;
|
||||
import io.metersphere.api.service.*;
|
||||
import io.metersphere.base.domain.ApiScenarioExample;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import io.metersphere.base.domain.TestPlanApiScenario;
|
||||
|
@ -27,10 +24,7 @@ import io.metersphere.commons.constants.ApiRunMode;
|
|||
import io.metersphere.commons.constants.ReportTriggerMode;
|
||||
import io.metersphere.commons.constants.ReportTypeConstants;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.FileUtils;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.commons.utils.ServiceUtils;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.commons.utils.*;
|
||||
import io.metersphere.constants.RunModeConstants;
|
||||
import io.metersphere.dto.JmeterRunRequestDTO;
|
||||
import io.metersphere.dto.MsExecResponseDTO;
|
||||
|
@ -51,6 +45,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -308,6 +303,17 @@ public class ApiScenarioExecuteService {
|
|||
|
||||
public void testElement(RunDefinitionRequest request) {
|
||||
if (request.getTestElement() != null) {
|
||||
// 添加csv版本控制台打印信息
|
||||
try {
|
||||
if (Class.forName("io.metersphere.xpack.repository.service.GitRepositoryService") != null) {
|
||||
Class clazz = Class.forName("io.metersphere.xpack.repository.service.GitRepositoryService");
|
||||
Method method = clazz.getMethod("getCsvVersionScriptProcess",String.class, MsTestElement.class);
|
||||
method.invoke(CommonBeanFactory.getBean("gitRepositoryService"),request.getScenarioId(), request.getTestElement());
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
LoggerUtil.error("不存在GitRepositoryService类");
|
||||
}
|
||||
|
||||
tcpApiParamService.checkTestElement(request.getTestElement());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkspaceRepository implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String repositoryName;
|
||||
|
||||
private String repositoryUrl;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String workspaceId;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private String description;
|
||||
|
||||
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 WorkspaceRepositoryExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public WorkspaceRepositoryExample() {
|
||||
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 andRepositoryNameIsNull() {
|
||||
addCriterion("repository_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameIsNotNull() {
|
||||
addCriterion("repository_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameEqualTo(String value) {
|
||||
addCriterion("repository_name =", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameNotEqualTo(String value) {
|
||||
addCriterion("repository_name <>", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameGreaterThan(String value) {
|
||||
addCriterion("repository_name >", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("repository_name >=", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameLessThan(String value) {
|
||||
addCriterion("repository_name <", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("repository_name <=", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameLike(String value) {
|
||||
addCriterion("repository_name like", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameNotLike(String value) {
|
||||
addCriterion("repository_name not like", value, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameIn(List<String> values) {
|
||||
addCriterion("repository_name in", values, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameNotIn(List<String> values) {
|
||||
addCriterion("repository_name not in", values, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameBetween(String value1, String value2) {
|
||||
addCriterion("repository_name between", value1, value2, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryNameNotBetween(String value1, String value2) {
|
||||
addCriterion("repository_name not between", value1, value2, "repositoryName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlIsNull() {
|
||||
addCriterion("repository_url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlIsNotNull() {
|
||||
addCriterion("repository_url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlEqualTo(String value) {
|
||||
addCriterion("repository_url =", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlNotEqualTo(String value) {
|
||||
addCriterion("repository_url <>", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlGreaterThan(String value) {
|
||||
addCriterion("repository_url >", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("repository_url >=", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlLessThan(String value) {
|
||||
addCriterion("repository_url <", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("repository_url <=", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlLike(String value) {
|
||||
addCriterion("repository_url like", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlNotLike(String value) {
|
||||
addCriterion("repository_url not like", value, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlIn(List<String> values) {
|
||||
addCriterion("repository_url in", values, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlNotIn(List<String> values) {
|
||||
addCriterion("repository_url not in", values, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlBetween(String value1, String value2) {
|
||||
addCriterion("repository_url between", value1, value2, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("repository_url not between", value1, value2, "repositoryUrl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIsNull() {
|
||||
addCriterion("username is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIsNotNull() {
|
||||
addCriterion("username is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameEqualTo(String value) {
|
||||
addCriterion("username =", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotEqualTo(String value) {
|
||||
addCriterion("username <>", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameGreaterThan(String value) {
|
||||
addCriterion("username >", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("username >=", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLessThan(String value) {
|
||||
addCriterion("username <", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLessThanOrEqualTo(String value) {
|
||||
addCriterion("username <=", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLike(String value) {
|
||||
addCriterion("username like", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotLike(String value) {
|
||||
addCriterion("username not like", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIn(List<String> values) {
|
||||
addCriterion("username in", values, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotIn(List<String> values) {
|
||||
addCriterion("username not in", values, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameBetween(String value1, String value2) {
|
||||
addCriterion("username between", value1, value2, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotBetween(String value1, String value2) {
|
||||
addCriterion("username not between", value1, value2, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNull() {
|
||||
addCriterion("`password` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNotNull() {
|
||||
addCriterion("`password` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordEqualTo(String value) {
|
||||
addCriterion("`password` =", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotEqualTo(String value) {
|
||||
addCriterion("`password` <>", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThan(String value) {
|
||||
addCriterion("`password` >", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`password` >=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThan(String value) {
|
||||
addCriterion("`password` <", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThanOrEqualTo(String value) {
|
||||
addCriterion("`password` <=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLike(String value) {
|
||||
addCriterion("`password` like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotLike(String value) {
|
||||
addCriterion("`password` not like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIn(List<String> values) {
|
||||
addCriterion("`password` in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotIn(List<String> values) {
|
||||
addCriterion("`password` not in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordBetween(String value1, String value2) {
|
||||
addCriterion("`password` between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotBetween(String value1, String value2) {
|
||||
addCriterion("`password` not between", value1, value2, "password");
|
||||
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 andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
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,27 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkspaceRepositoryFileVersion implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String repositoryId;
|
||||
|
||||
private String branch;
|
||||
|
||||
private String path;
|
||||
|
||||
private String scenarioId;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private String commitId;
|
||||
|
||||
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 WorkspaceRepositoryFileVersionExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public WorkspaceRepositoryFileVersionExample() {
|
||||
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 andRepositoryIdIsNull() {
|
||||
addCriterion("repository_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdIsNotNull() {
|
||||
addCriterion("repository_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdEqualTo(String value) {
|
||||
addCriterion("repository_id =", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdNotEqualTo(String value) {
|
||||
addCriterion("repository_id <>", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdGreaterThan(String value) {
|
||||
addCriterion("repository_id >", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("repository_id >=", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdLessThan(String value) {
|
||||
addCriterion("repository_id <", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("repository_id <=", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdLike(String value) {
|
||||
addCriterion("repository_id like", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdNotLike(String value) {
|
||||
addCriterion("repository_id not like", value, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdIn(List<String> values) {
|
||||
addCriterion("repository_id in", values, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdNotIn(List<String> values) {
|
||||
addCriterion("repository_id not in", values, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdBetween(String value1, String value2) {
|
||||
addCriterion("repository_id between", value1, value2, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRepositoryIdNotBetween(String value1, String value2) {
|
||||
addCriterion("repository_id not between", value1, value2, "repositoryId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchIsNull() {
|
||||
addCriterion("branch is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchIsNotNull() {
|
||||
addCriterion("branch is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchEqualTo(String value) {
|
||||
addCriterion("branch =", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchNotEqualTo(String value) {
|
||||
addCriterion("branch <>", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchGreaterThan(String value) {
|
||||
addCriterion("branch >", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("branch >=", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchLessThan(String value) {
|
||||
addCriterion("branch <", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchLessThanOrEqualTo(String value) {
|
||||
addCriterion("branch <=", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchLike(String value) {
|
||||
addCriterion("branch like", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchNotLike(String value) {
|
||||
addCriterion("branch not like", value, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchIn(List<String> values) {
|
||||
addCriterion("branch in", values, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchNotIn(List<String> values) {
|
||||
addCriterion("branch not in", values, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchBetween(String value1, String value2) {
|
||||
addCriterion("branch between", value1, value2, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBranchNotBetween(String value1, String value2) {
|
||||
addCriterion("branch not between", value1, value2, "branch");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathIsNull() {
|
||||
addCriterion("`path` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathIsNotNull() {
|
||||
addCriterion("`path` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathEqualTo(String value) {
|
||||
addCriterion("`path` =", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathNotEqualTo(String value) {
|
||||
addCriterion("`path` <>", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathGreaterThan(String value) {
|
||||
addCriterion("`path` >", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`path` >=", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathLessThan(String value) {
|
||||
addCriterion("`path` <", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathLessThanOrEqualTo(String value) {
|
||||
addCriterion("`path` <=", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathLike(String value) {
|
||||
addCriterion("`path` like", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathNotLike(String value) {
|
||||
addCriterion("`path` not like", value, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathIn(List<String> values) {
|
||||
addCriterion("`path` in", values, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathNotIn(List<String> values) {
|
||||
addCriterion("`path` not in", values, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathBetween(String value1, String value2) {
|
||||
addCriterion("`path` between", value1, value2, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPathNotBetween(String value1, String value2) {
|
||||
addCriterion("`path` not between", value1, value2, "path");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdIsNull() {
|
||||
addCriterion("scenario_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdIsNotNull() {
|
||||
addCriterion("scenario_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdEqualTo(String value) {
|
||||
addCriterion("scenario_id =", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdNotEqualTo(String value) {
|
||||
addCriterion("scenario_id <>", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdGreaterThan(String value) {
|
||||
addCriterion("scenario_id >", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("scenario_id >=", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdLessThan(String value) {
|
||||
addCriterion("scenario_id <", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("scenario_id <=", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdLike(String value) {
|
||||
addCriterion("scenario_id like", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdNotLike(String value) {
|
||||
addCriterion("scenario_id not like", value, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdIn(List<String> values) {
|
||||
addCriterion("scenario_id in", values, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdNotIn(List<String> values) {
|
||||
addCriterion("scenario_id not in", values, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdBetween(String value1, String value2) {
|
||||
addCriterion("scenario_id between", value1, value2, "scenarioId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andScenarioIdNotBetween(String value1, String value2) {
|
||||
addCriterion("scenario_id not between", value1, value2, "scenarioId");
|
||||
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 andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdIsNull() {
|
||||
addCriterion("commit_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdIsNotNull() {
|
||||
addCriterion("commit_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdEqualTo(String value) {
|
||||
addCriterion("commit_id =", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdNotEqualTo(String value) {
|
||||
addCriterion("commit_id <>", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdGreaterThan(String value) {
|
||||
addCriterion("commit_id >", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("commit_id >=", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdLessThan(String value) {
|
||||
addCriterion("commit_id <", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("commit_id <=", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdLike(String value) {
|
||||
addCriterion("commit_id like", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdNotLike(String value) {
|
||||
addCriterion("commit_id not like", value, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdIn(List<String> values) {
|
||||
addCriterion("commit_id in", values, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdNotIn(List<String> values) {
|
||||
addCriterion("commit_id not in", values, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdBetween(String value1, String value2) {
|
||||
addCriterion("commit_id between", value1, value2, "commitId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCommitIdNotBetween(String value1, String value2) {
|
||||
addCriterion("commit_id not between", value1, value2, "commitId");
|
||||
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.mapper;
|
||||
|
||||
import io.metersphere.base.domain.WorkspaceRepositoryFileVersion;
|
||||
import io.metersphere.base.domain.WorkspaceRepositoryFileVersionExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface WorkspaceRepositoryFileVersionMapper {
|
||||
long countByExample(WorkspaceRepositoryFileVersionExample example);
|
||||
|
||||
int deleteByExample(WorkspaceRepositoryFileVersionExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(WorkspaceRepositoryFileVersion record);
|
||||
|
||||
int insertSelective(WorkspaceRepositoryFileVersion record);
|
||||
|
||||
List<WorkspaceRepositoryFileVersion> selectByExample(WorkspaceRepositoryFileVersionExample example);
|
||||
|
||||
WorkspaceRepositoryFileVersion selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") WorkspaceRepositoryFileVersion record, @Param("example") WorkspaceRepositoryFileVersionExample example);
|
||||
|
||||
int updateByExample(@Param("record") WorkspaceRepositoryFileVersion record, @Param("example") WorkspaceRepositoryFileVersionExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(WorkspaceRepositoryFileVersion record);
|
||||
|
||||
int updateByPrimaryKey(WorkspaceRepositoryFileVersion record);
|
||||
}
|
|
@ -0,0 +1,276 @@
|
|||
<?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.WorkspaceRepositoryFileVersionMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.WorkspaceRepositoryFileVersion">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="repository_id" jdbcType="VARCHAR" property="repositoryId" />
|
||||
<result column="branch" jdbcType="VARCHAR" property="branch" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="commit_id" jdbcType="VARCHAR" property="commitId" />
|
||||
</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, repository_id, branch, `path`, scenario_id, create_time, update_time, create_user,
|
||||
commit_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from workspace_repository_file_version
|
||||
<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 workspace_repository_file_version
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from workspace_repository_file_version
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersionExample">
|
||||
delete from workspace_repository_file_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersion">
|
||||
insert into workspace_repository_file_version (id, repository_id, branch,
|
||||
`path`, scenario_id, create_time,
|
||||
update_time, create_user, commit_id
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{repositoryId,jdbcType=VARCHAR}, #{branch,jdbcType=VARCHAR},
|
||||
#{path,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{commitId,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersion">
|
||||
insert into workspace_repository_file_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="repositoryId != null">
|
||||
repository_id,
|
||||
</if>
|
||||
<if test="branch != null">
|
||||
branch,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
<if test="scenarioId != null">
|
||||
scenario_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="commitId != null">
|
||||
commit_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="repositoryId != null">
|
||||
#{repositoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="branch != null">
|
||||
#{branch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="scenarioId != null">
|
||||
#{scenarioId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commitId != null">
|
||||
#{commitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersionExample" resultType="java.lang.Long">
|
||||
select count(*) from workspace_repository_file_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update workspace_repository_file_version
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.repositoryId != null">
|
||||
repository_id = #{record.repositoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.branch != null">
|
||||
branch = #{record.branch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.scenarioId != null">
|
||||
scenario_id = #{record.scenarioId,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.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.commitId != null">
|
||||
commit_id = #{record.commitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update workspace_repository_file_version
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
repository_id = #{record.repositoryId,jdbcType=VARCHAR},
|
||||
branch = #{record.branch,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
commit_id = #{record.commitId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersion">
|
||||
update workspace_repository_file_version
|
||||
<set>
|
||||
<if test="repositoryId != null">
|
||||
repository_id = #{repositoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="branch != null">
|
||||
branch = #{branch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="scenarioId != null">
|
||||
scenario_id = #{scenarioId,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="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commitId != null">
|
||||
commit_id = #{commitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.WorkspaceRepositoryFileVersion">
|
||||
update workspace_repository_file_version
|
||||
set repository_id = #{repositoryId,jdbcType=VARCHAR},
|
||||
branch = #{branch,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
commit_id = #{commitId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,36 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.WorkspaceRepository;
|
||||
import io.metersphere.base.domain.WorkspaceRepositoryExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface WorkspaceRepositoryMapper {
|
||||
long countByExample(WorkspaceRepositoryExample example);
|
||||
|
||||
int deleteByExample(WorkspaceRepositoryExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(WorkspaceRepository record);
|
||||
|
||||
int insertSelective(WorkspaceRepository record);
|
||||
|
||||
List<WorkspaceRepository> selectByExampleWithBLOBs(WorkspaceRepositoryExample example);
|
||||
|
||||
List<WorkspaceRepository> selectByExample(WorkspaceRepositoryExample example);
|
||||
|
||||
WorkspaceRepository selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") WorkspaceRepository record, @Param("example") WorkspaceRepositoryExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") WorkspaceRepository record, @Param("example") WorkspaceRepositoryExample example);
|
||||
|
||||
int updateByExample(@Param("record") WorkspaceRepository record, @Param("example") WorkspaceRepositoryExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(WorkspaceRepository record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(WorkspaceRepository record);
|
||||
|
||||
int updateByPrimaryKey(WorkspaceRepository record);
|
||||
}
|
|
@ -0,0 +1,341 @@
|
|||
<?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.WorkspaceRepositoryMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.WorkspaceRepository">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="repository_name" jdbcType="VARCHAR" property="repositoryName" />
|
||||
<result column="repository_url" jdbcType="VARCHAR" property="repositoryUrl" />
|
||||
<result column="username" jdbcType="VARCHAR" property="username" />
|
||||
<result column="password" jdbcType="VARCHAR" property="password" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.WorkspaceRepository">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
</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, repository_name, repository_url, username, `password`, create_time, update_time,
|
||||
workspace_id, create_user
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.WorkspaceRepositoryExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from workspace_repository
|
||||
<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.WorkspaceRepositoryExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from workspace_repository
|
||||
<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 workspace_repository
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from workspace_repository
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.WorkspaceRepositoryExample">
|
||||
delete from workspace_repository
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.WorkspaceRepository">
|
||||
insert into workspace_repository (id, repository_name, repository_url,
|
||||
username, `password`, create_time,
|
||||
update_time, workspace_id, create_user,
|
||||
description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{repositoryName,jdbcType=VARCHAR}, #{repositoryUrl,jdbcType=VARCHAR},
|
||||
#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{workspaceId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.WorkspaceRepository">
|
||||
insert into workspace_repository
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="repositoryName != null">
|
||||
repository_name,
|
||||
</if>
|
||||
<if test="repositoryUrl != null">
|
||||
repository_url,
|
||||
</if>
|
||||
<if test="username != null">
|
||||
username,
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password`,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="repositoryName != null">
|
||||
#{repositoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="repositoryUrl != null">
|
||||
#{repositoryUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="username != null">
|
||||
#{username,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
#{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.WorkspaceRepositoryExample" resultType="java.lang.Long">
|
||||
select count(*) from workspace_repository
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update workspace_repository
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.repositoryName != null">
|
||||
repository_name = #{record.repositoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.repositoryUrl != null">
|
||||
repository_url = #{record.repositoryUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.username != null">
|
||||
username = #{record.username,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.password != null">
|
||||
`password` = #{record.password,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.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update workspace_repository
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
repository_name = #{record.repositoryName,jdbcType=VARCHAR},
|
||||
repository_url = #{record.repositoryUrl,jdbcType=VARCHAR},
|
||||
username = #{record.username,jdbcType=VARCHAR},
|
||||
`password` = #{record.password,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update workspace_repository
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
repository_name = #{record.repositoryName,jdbcType=VARCHAR},
|
||||
repository_url = #{record.repositoryUrl,jdbcType=VARCHAR},
|
||||
username = #{record.username,jdbcType=VARCHAR},
|
||||
`password` = #{record.password,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.WorkspaceRepository">
|
||||
update workspace_repository
|
||||
<set>
|
||||
<if test="repositoryName != null">
|
||||
repository_name = #{repositoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="repositoryUrl != null">
|
||||
repository_url = #{repositoryUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="username != null">
|
||||
username = #{username,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password` = #{password,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="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.WorkspaceRepository">
|
||||
update workspace_repository
|
||||
set repository_name = #{repositoryName,jdbcType=VARCHAR},
|
||||
repository_url = #{repositoryUrl,jdbcType=VARCHAR},
|
||||
username = #{username,jdbcType=VARCHAR},
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.WorkspaceRepository">
|
||||
update workspace_repository
|
||||
set repository_name = #{repositoryName,jdbcType=VARCHAR},
|
||||
repository_url = #{repositoryUrl,jdbcType=VARCHAR},
|
||||
username = #{username,jdbcType=VARCHAR},
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -75,6 +75,34 @@ public class FileUtils {
|
|||
}
|
||||
}
|
||||
|
||||
private static void copyFile(List<String> bodyUploadIds, List<String> existfilePaths, String path) {
|
||||
String filePath = BODY_FILE_DIR;
|
||||
if (StringUtils.isNotEmpty(path)) {
|
||||
filePath = path;
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(bodyUploadIds) && CollectionUtils.isNotEmpty(existfilePaths)) {
|
||||
File testDir = new File(filePath);
|
||||
if (!testDir.exists()) {
|
||||
testDir.mkdirs();
|
||||
}
|
||||
for (int i = 0; i < bodyUploadIds.size(); i++) {
|
||||
String oldFilePath = existfilePaths.get(i);
|
||||
String[] oldFilePathSplits = oldFilePath.split("/");
|
||||
String newFilePath = filePath + "/" + bodyUploadIds.get(i) + "_" + oldFilePathSplits[oldFilePathSplits.length-1];
|
||||
File existfile = new File(oldFilePath);
|
||||
if (existfile.exists()) {
|
||||
try {
|
||||
FileUtil.copyFile(existfile, new File(newFilePath));
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
// 将旧的文件 item 复制到新的文件路径 filePath 下
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String create(String id, MultipartFile item) {
|
||||
String filePath = BODY_FILE_DIR + "/plugin";
|
||||
if (item != null) {
|
||||
|
@ -200,6 +228,10 @@ public class FileUtils {
|
|||
FileUtils.create(bodyUploadIds, bodyFiles, null);
|
||||
}
|
||||
|
||||
public static void createBodyFileByCopy(List<String> bodyUploadIds, List<String> existfilePaths) {
|
||||
FileUtils.copyFile(bodyUploadIds, existfilePaths, null);
|
||||
}
|
||||
|
||||
public static void createFiles(List<String> bodyUploadIds, List<MultipartFile> bodyFiles, String path) {
|
||||
FileUtils.create(bodyUploadIds, bodyFiles, path);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class SystemReference {
|
|||
public static Map<String, String> baseColumns = new LinkedHashMap<>();
|
||||
public static Map<String, String> groupColumns = new LinkedHashMap<>();
|
||||
public static Map<String, String> projectApplicationColumns = new LinkedHashMap<>();
|
||||
public static Map<String, String> workspaceRepositoryColumns = new LinkedHashMap<>();
|
||||
|
||||
static {
|
||||
|
||||
|
@ -44,6 +45,7 @@ public class SystemReference {
|
|||
mailColumns.clear();
|
||||
groupColumns.clear();
|
||||
projectApplicationColumns.clear();
|
||||
workspaceRepositoryColumns.clear();
|
||||
|
||||
userColumns.put("name", "用户名称");
|
||||
userColumns.put("createUser", "创建人");
|
||||
|
@ -159,5 +161,9 @@ public class SystemReference {
|
|||
groupColumns.put("description", "描述");
|
||||
groupColumns.put("type", "所属类型");
|
||||
groupColumns.put("scopeId", "全局用户组");
|
||||
|
||||
workspaceRepositoryColumns.put("repositoryName", "存储库名称");
|
||||
workspaceRepositoryColumns.put("repositoryUrl", "存储库地址");
|
||||
workspaceRepositoryColumns.put("workspaceId", "工作空间");
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 65db21ce81f9056eb0a60b567799854786e329d6
|
||||
Subproject commit faa4ee93137988ff135d2496648ceb74f5753b06
|
|
@ -666,4 +666,51 @@ from api_scenario_report where execute_type = 'Saved' and report_type = 'API_INT
|
|||
|
||||
delete from api_scenario_report where report_type = 'API_INTEGRATED';
|
||||
|
||||
ALTER TABLE api_definition MODIFY COLUMN path varchar(1000);
|
||||
ALTER TABLE api_definition MODIFY COLUMN path varchar(1000);
|
||||
|
||||
-- csv版本git管理
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'ws_admin', 'WORKSPACE_REPOSITORY:READ', 'WORKSPACE_USER');
|
||||
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'ws_member', 'WORKSPACE_REPOSITORY:READ', 'WORKSPACE_USER');
|
||||
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'ws_admin', 'WORKSPACE_REPOSITORY:READ+CREATE', 'WORKSPACE_USER');
|
||||
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'ws_admin', 'WORKSPACE_REPOSITORY:READ+EDIT', 'WORKSPACE_USER');
|
||||
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'ws_admin', 'WORKSPACE_REPOSITORY:READ+DELETE', 'WORKSPACE_USER');
|
||||
|
||||
DROP TABLE IF EXISTS `workspace_repository`;
|
||||
CREATE TABLE IF NOT EXISTS `workspace_repository`
|
||||
(
|
||||
`id` varchar(50) NOT NULL COMMENT 'Repository ID',
|
||||
`repository_name` varchar(100) NOT NULL COMMENT '存储库名称',
|
||||
`repository_url` varchar(300) NOT NULL COMMENT '存储库地址',
|
||||
`username` varchar(256) NOT NULL COMMENT 'UserName',
|
||||
`password` varchar(256) NOT NULL COMMENT 'Password',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`workspace_id` varchar(50) DEFAULT NULL COMMENT '工作空间ID',
|
||||
`create_user` varchar(100) DEFAULT NULL COMMENT '创建人',
|
||||
`description` longtext COMMENT '仓库描述信息',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `workspace_repository_file_version`;
|
||||
CREATE TABLE `workspace_repository_file_version` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'ID',
|
||||
`repository_id` varchar(50) NOT NULL COMMENT '存储库ID',
|
||||
`branch` varchar(100) NOT NULL COMMENT '存储库分支',
|
||||
`path` varchar(500) NOT NULL COMMENT '文件路径',
|
||||
`scenario_id` varchar(100) NOT NULL COMMENT '场景ID',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`create_user` varchar(100) DEFAULT NULL COMMENT '创建人',
|
||||
`commit_id` varchar(100) NOT NULL COMMENT '文件commentId',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
|
|
@ -305,6 +305,7 @@ environment_group_has_duplicate_project=Environment group has duplicate project
|
|||
error_report_library=Error report
|
||||
issue_jira_info_error=Check the service integration information or Jira project ID
|
||||
error_code_is_unique=Error code is not unique
|
||||
|
||||
no_version_exists=version not exists
|
||||
jira_auth_error=Account name or password (Token) is wrong
|
||||
#workspace repository
|
||||
workspace_repository_required_is_null=存储库必填信息为空
|
||||
|
|
|
@ -306,3 +306,5 @@ issue_jira_info_error=请检查服务集成信息或Jira项目ID
|
|||
error_code_is_unique=错误代码不可重复
|
||||
no_version_exists=不存在版本!请先创建项目的版本
|
||||
jira_auth_error=账号名或密码(Token)错误
|
||||
#workspace repository
|
||||
workspace_repository_required_is_null=存储库必填信息为空
|
||||
|
|
|
@ -307,3 +307,5 @@ error_code_is_unique=錯誤代碼不可重複
|
|||
|
||||
no_version_exists=不存在版本!請先創建項目的版本
|
||||
jira_auth_error=賬號名或密碼(Token)錯誤
|
||||
#workspace repository
|
||||
workspace_repository_required_is_null=存储库必填信息为空
|
||||
|
|
|
@ -160,6 +160,26 @@
|
|||
"name": "permission.workspace_user.delete",
|
||||
"resourceId": "WORKSPACE_USER"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_REPOSITORY:READ",
|
||||
"name": "permission.workspace_repository.read",
|
||||
"resourceId": "WORKSPACE_REPOSITORY"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_REPOSITORY:READ+CREATE",
|
||||
"name": "permission.workspace_repository.create",
|
||||
"resourceId": "WORKSPACE_REPOSITORY"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_REPOSITORY:READ+EDIT",
|
||||
"name": "permission.workspace_repository.edit",
|
||||
"resourceId": "WORKSPACE_REPOSITORY"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_REPOSITORY:READ+DELETE",
|
||||
"name": "permission.workspace_repository.delete",
|
||||
"resourceId": "WORKSPACE_REPOSITORY"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_PROJECT_MANAGER:READ",
|
||||
"name": "permission.workspace_project_manager.read",
|
||||
|
@ -1124,6 +1144,10 @@
|
|||
{
|
||||
"id": "PERSONAL_INFORMATION",
|
||||
"name": "permission.personal_information.name"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_REPOSITORY",
|
||||
"name": "permission.workspace_repository.name"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -70,6 +70,34 @@ function getScenarioFiles(obj) {
|
|||
return scenarioFiles;
|
||||
}
|
||||
|
||||
function getRepositoryFiles(obj) {
|
||||
let repositoryFiles = [];
|
||||
obj.repositoryFileIds = [];
|
||||
// 场景变量csv 文件
|
||||
if (obj.variables) {
|
||||
obj.variables.forEach(param => {
|
||||
if (param.type === 'CSV' && param.fileResource === 'repository') {
|
||||
param.files = [];
|
||||
let fileId = getUUID().substring(0, 12);
|
||||
let fileSplits = param.repositoryFilePath.split('/');
|
||||
let fileName = fileSplits[fileSplits.length-1];
|
||||
param.files.push({
|
||||
id: fileId,
|
||||
name: fileName
|
||||
});
|
||||
obj.repositoryFileIds.push(fileId);
|
||||
let repositoryFile = {
|
||||
repositoryId: param.repositoryId,
|
||||
repositoryBranch: param.repositoryBranch,
|
||||
repositoryFilePath: param.repositoryFilePath,
|
||||
};
|
||||
repositoryFiles.push(repositoryFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
return repositoryFiles;
|
||||
}
|
||||
|
||||
export function saveScenario(url, scenario, scenarioDefinition, _this, success) {
|
||||
let bodyFiles = getBodyUploadFiles(scenario, scenarioDefinition);
|
||||
if (_this && _this.$store && _this.$store.state && _this.$store.state.pluginFiles && _this.$store.state.pluginFiles.length > 0) {
|
||||
|
@ -92,6 +120,10 @@ export function saveScenario(url, scenario, scenarioDefinition, _this, success)
|
|||
formData.append("scenarioFiles", f);
|
||||
})
|
||||
}
|
||||
if (_this.showXpackCompnent) {
|
||||
let repositoryFiles = getRepositoryFiles(scenario);
|
||||
formData.append('repositoryFiles', new Blob([JSON.stringify(repositoryFiles)], {type: "application/json"}));
|
||||
}
|
||||
formData.append('request', new Blob([JSON.stringify(scenario)], {type: "application/json"}));
|
||||
let axiosRequestConfig = getUploadConfig(url, formData);
|
||||
request(axiosRequestConfig, (response) => {
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
@setProjectEnvMap="setProjectEnvMap" @setEnvGroup="setEnvGroup"
|
||||
@showPopover="showPopover" :has-option-group="true"
|
||||
ref="envPopover" class="ms-message-right"/>
|
||||
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
|
||||
<el-tooltip v-if="!debugLoading && showDebug" content="Ctrl + R" placement="top">
|
||||
<el-dropdown split-button type="primary" @click="runDebug" class="ms-message-right" size="mini" @command="handleCommand" v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE']">
|
||||
{{ $t('api_test.request.debug') }}
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
|
@ -105,7 +105,7 @@
|
|||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-tooltip>
|
||||
<el-button size="mini" type="primary" v-else @click="stop">{{ $t('report.stop_btn') }}</el-button>
|
||||
<el-button size="mini" type="primary" v-else-if="showDebug" @click="stop">{{ $t('report.stop_btn') }}</el-button>
|
||||
|
||||
<el-button id="inputDelay" type="primary" size="mini" v-prevent-re-click @click="editScenario"
|
||||
title="ctrl + s" v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE', 'PROJECT_API_SCENARIO:READ+COPY']">
|
||||
|
@ -371,6 +371,7 @@ import {ENV_TYPE} from "@/common/js/constants";
|
|||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const versionHistory = requireComponent.keys().length > 0 ? requireComponent("./version/VersionHistory.vue") : {};
|
||||
const workspaceRepository = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./repository/WorkspaceRepository.vue") : {};
|
||||
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
|
@ -457,6 +458,8 @@ export default {
|
|||
expandedNode: [],
|
||||
scenarioDefinition: [],
|
||||
path: "/api/automation/create",
|
||||
repositoryCreatePath: "/repository/api/automation/create",
|
||||
repositoryUpdatePath: "/repository/api/automation/update",
|
||||
debugData: {},
|
||||
reportId: "",
|
||||
enableCookieShare: false,
|
||||
|
@ -503,6 +506,8 @@ export default {
|
|||
pluginDelStep: false,
|
||||
isBatchProcess: false,
|
||||
isCheckedAll: false,
|
||||
showXpackCompnent: false,
|
||||
showDebug: true,
|
||||
selectDataCounts: 0,
|
||||
dffScenarioId: "",
|
||||
scenarioRefId: "",
|
||||
|
@ -555,6 +560,9 @@ export default {
|
|||
if (hasLicense()) {
|
||||
this.getVersionHistory();
|
||||
}
|
||||
if (requireComponent !== null && JSON.stringify(workspaceRepository) !== '{}') {
|
||||
this.showXpackCompnent = true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
|
@ -1061,11 +1069,16 @@ export default {
|
|||
return index - 0.33
|
||||
},
|
||||
setVariables(v, headers) {
|
||||
if (this.showXpackCompnent) {
|
||||
this.showDebug = false;
|
||||
}
|
||||
this.currentScenario.variables = v;
|
||||
this.currentScenario.headers = headers;
|
||||
if (this.path.endsWith("/update")) {
|
||||
// 直接更新场景防止编辑内容丢失
|
||||
this.editScenario();
|
||||
} else {
|
||||
this.showDebug = true;
|
||||
}
|
||||
if (this.$refs.maximizeHeader) {
|
||||
this.$refs.maximizeHeader.getVariableSize();
|
||||
|
@ -1469,9 +1482,19 @@ export default {
|
|||
this.currentScenario.versionId = this.$refs.versionHistory.currentVersion.id;
|
||||
}
|
||||
}
|
||||
if (this.path.endsWith("/update") && this.showXpackCompnent) {
|
||||
this.path = this.repositoryUpdatePath;
|
||||
}
|
||||
if (this.path.endsWith("/create") && this.showXpackCompnent) {
|
||||
this.path = this.repositoryCreatePath;
|
||||
}
|
||||
saveScenario(this.path, this.currentScenario, this.scenarioDefinition, this, (response) => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.path = "/api/automation/update";
|
||||
if (this.showXpackCompnent) {
|
||||
this.path = this.repositoryUpdatePath;
|
||||
} else {
|
||||
this.path = "/api/automation/update";
|
||||
}
|
||||
this.$store.state.pluginFiles = [];
|
||||
if (response.data) {
|
||||
this.currentScenario.id = response.data.id;
|
||||
|
|
|
@ -15,7 +15,49 @@
|
|||
</el-form-item>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 40px">
|
||||
<el-tab-pane :label="$t('variables.config')" name="config">
|
||||
<el-row>
|
||||
<el-row style="margin-top: 10px" v-xpack v-if="showXpackCompnent">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.file_resource')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-radio v-model="editData.fileResource" label="local">{{$t('variables.local_file')}}</el-radio>
|
||||
<el-radio v-model="editData.fileResource" label="repository">{{$t('variables.git_repository')}}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px" v-xpack v-if="showXpackCompnent && editData.fileResource == 'repository'">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.git_repository')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-select v-model="editData.repositoryId"
|
||||
:placeholder="$t('variables.choose_git_repository')" filterable size="small"
|
||||
class="ms-scenario-input">
|
||||
<el-option
|
||||
v-for="item in repositoryOptions"
|
||||
:key="item.repositoryName"
|
||||
:label="item.repositoryName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px" v-xpack v-if="showXpackCompnent && editData.fileResource == 'repository'">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.git_branch')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input v-model="editData.repositoryBranch" size="small" :placeholder="$t('variables.git_branch_placeholder')"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px" v-xpack v-if="showXpackCompnent && editData.fileResource == 'repository'">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.git_file_path')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input v-model="editData.repositoryFilePath" size="small" :placeholder="$t('variables.git_file_path_placeholder')"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px" v-if="!editData.fileResource || editData.fileResource === 'local'">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.add_file')}}</span>
|
||||
</el-col>
|
||||
|
@ -80,6 +122,10 @@
|
|||
|
||||
<script>
|
||||
import MsCsvFileUpload from "./CsvFileUpload";
|
||||
import {getCurrentWorkspaceId, hasLicense} from "@/common/js/utils";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const workspaceRepository = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./repository/WorkspaceRepository.vue") : {};
|
||||
|
||||
export default {
|
||||
name: "MsEditCsv",
|
||||
|
@ -104,6 +150,9 @@
|
|||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
||||
],
|
||||
},
|
||||
repositoryOptions: [],
|
||||
queryRepositoryPath: "/repository/list",
|
||||
showXpackCompnent: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -127,13 +176,17 @@
|
|||
step(results, parser) {
|
||||
if(this.allData.length < 500) {
|
||||
this.allData.push(results.data);
|
||||
}else{
|
||||
} else {
|
||||
this.showMessage = true;
|
||||
}
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
let config = {complete: this.complete, step: this.step, delimiter: this.editData.delimiter ? this.editData.delimiter : ","};
|
||||
let config = {
|
||||
complete: this.complete,
|
||||
step: this.step,
|
||||
delimiter: this.editData.delimiter ? this.editData.delimiter : ","
|
||||
};
|
||||
this.allData = [];
|
||||
// 本地文件
|
||||
if (this.editData.files && this.editData.files.length > 0 && this.editData.files[0].file) {
|
||||
|
@ -164,12 +217,35 @@
|
|||
},
|
||||
|
||||
querySearch(queryString, cb) {
|
||||
let restaurants = [{value: "UTF-8"}, {value: "UTF-16"},{value: "GB2312"}, {value: "ISO-8859-15"}, {value: "US-ASCll"}];
|
||||
let restaurants = [{value: "UTF-8"}, {value: "UTF-16"}, {value: "GB2312"}, {value: "ISO-8859-15"}, {value: "US-ASCll"}];
|
||||
let results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
||||
// 调用 callback 返回建议列表的数据
|
||||
cb(results);
|
||||
},
|
||||
|
||||
loadWorkspaceReposiroty() {
|
||||
if (getCurrentWorkspaceId() === null) {
|
||||
this.repositoryOptions = [];
|
||||
return;
|
||||
}
|
||||
let param = {
|
||||
workspaceId: getCurrentWorkspaceId()
|
||||
};
|
||||
this.$post(this.queryRepositoryPath, param, response => {
|
||||
this.repositoryOptions = response.data;
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.showXpackCompnent) {
|
||||
// 查询当前工作空间下的存储库信息
|
||||
this.loadWorkspaceReposiroty();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (requireComponent !== null && JSON.stringify(workspaceRepository) !== '{}') {
|
||||
this.showXpackCompnent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -163,6 +163,9 @@
|
|||
getCustomTableHeader
|
||||
} from "@/common/js/tableUtils";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const workspaceRepository = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./repository/WorkspaceRepository.vue") : {};
|
||||
|
||||
export default {
|
||||
name: "MsVariableList",
|
||||
components: {
|
||||
|
@ -198,7 +201,9 @@
|
|||
selection: [],
|
||||
loading: false,
|
||||
currentPage: 1,
|
||||
editData: {},
|
||||
editData: {
|
||||
fileResource: "local"
|
||||
},
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
headerSuggestions: REQUEST_HEADERS,
|
||||
|
@ -215,6 +220,8 @@
|
|||
handleClick: this.handleDeleteBatch,
|
||||
},
|
||||
],
|
||||
validateRepositoryPath: "/repository/validate/exist",
|
||||
showXpackCompnent: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -310,7 +317,7 @@
|
|||
this.updateFiles();
|
||||
let datas = [];
|
||||
this.variables.forEach(item => {
|
||||
if(item.id === v.id){
|
||||
if (item.id === v.id) {
|
||||
item = v;
|
||||
}
|
||||
datas.push(item);
|
||||
|
@ -347,7 +354,7 @@
|
|||
this.$emit('setVariables', saveVariables, this.headers);
|
||||
},
|
||||
addVariable() {
|
||||
this.editData = {delimiter: ",", quotedData: 'false',files:[]};
|
||||
this.editData = {delimiter: ",", quotedData: 'false', files: [], fileResource: 'local', repositoryBranch: 'master'};
|
||||
this.editData.type = this.selectType;
|
||||
this.showDelete = false;
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
|
@ -357,16 +364,53 @@
|
|||
this.$warning("变量名不能为空");
|
||||
return;
|
||||
}
|
||||
// 更新场景,修改左边数据
|
||||
if(this.showDelete){
|
||||
this.updateParameters(this.editData);
|
||||
}else{
|
||||
// 新增场景,往左边新加
|
||||
this.addParameters(this.editData);
|
||||
this.addVariable();
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
if (this.showXpackCompnent) {
|
||||
this.validateRepository(res => {
|
||||
if (res) {
|
||||
// 更新场景,修改左边数据
|
||||
if (this.showDelete) {
|
||||
this.updateParameters(this.editData);
|
||||
} else {
|
||||
// 新增场景,往左边新加
|
||||
this.addParameters(this.editData);
|
||||
this.addVariable();
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
}
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 更新场景,修改左边数据
|
||||
if (this.showDelete) {
|
||||
this.updateParameters(this.editData);
|
||||
} else {
|
||||
// 新增场景,往左边新加
|
||||
this.addParameters(this.editData);
|
||||
this.addVariable();
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
}
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
}
|
||||
},
|
||||
validateRepository(callback) {
|
||||
// 校验所选的Git仓库、Git分支下有没有对应的文件
|
||||
if (this.editData.type === 'CSV' && this.editData.fileResource && this.editData.fileResource === 'repository') {
|
||||
let param = {
|
||||
repositoryId: this.editData.repositoryId,
|
||||
repositoryBranch: this.editData.repositoryBranch,
|
||||
repositoryFilePath: this.editData.repositoryFilePath,
|
||||
};
|
||||
this.$post(this.validateRepositoryPath, param, response => {
|
||||
if (!response.data.success) {
|
||||
this.$error(response.data.message);
|
||||
callback(false);
|
||||
} else {
|
||||
callback(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback(true);
|
||||
}
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
},
|
||||
cancelVariable() {
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
|
@ -454,7 +498,7 @@
|
|||
} else {
|
||||
item.hidden = undefined;
|
||||
}
|
||||
if(this.searchType === 'ALL' && !((this.selectVariable && this.selectVariable != ""))){
|
||||
if (this.searchType === 'ALL' && !((this.selectVariable && this.selectVariable != ""))) {
|
||||
item.hidden = undefined;
|
||||
}
|
||||
datas.push(item);
|
||||
|
@ -472,13 +516,18 @@
|
|||
this.updateFiles();
|
||||
this.showDelete = true;
|
||||
},
|
||||
updateFiles(){
|
||||
updateFiles() {
|
||||
this.variables.forEach(item => {
|
||||
if(item.id === this.editData.id){
|
||||
if (item.id === this.editData.id) {
|
||||
this.editData.files = item.files
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (requireComponent !== null && JSON.stringify(workspaceRepository) !== '{}') {
|
||||
this.showXpackCompnent = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<el-menu-item index="/setting" onselectstart="return false"
|
||||
v-permission="['SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ', 'SYSTEM_QUOTA:READ','SYSTEM_OPERATING_LOG:READ',
|
||||
'WORKSPACE_SERVICE:READ', 'PROJECT_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ']">
|
||||
'WORKSPACE_SERVICE:READ', 'PROJECT_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_REPOSITORY:READ']">
|
||||
{{ $t('commons.system_setting') }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
|
|
@ -59,7 +59,7 @@ export default {
|
|||
],
|
||||
workspacePermission: ['WORKSPACE_USER:READ', 'WORKSPACE_SERVICE:READ',
|
||||
'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ',
|
||||
'WORKSPACE_OPERATING_LOG:READ']
|
||||
'WORKSPACE_OPERATING_LOG:READ','WORKSPACE_REPOSITORY:READ']
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -92,5 +92,6 @@ export default {
|
|||
component: () => import('@/business/components/settings/plugin/PluginConfig'),
|
||||
meta: {system: true, title: 'plugin.title', permissions: ['SYSTEM_PLUGIN:READ']}
|
||||
},
|
||||
...requireContext.keys().map(key => requireContext(key).repository),
|
||||
]
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8add0b0a2cc869390734c0a04590f6a945e61cda
|
||||
Subproject commit 825408ce94058dab7d1e24a273b49643bceac408
|
|
@ -439,7 +439,11 @@ export default {
|
|||
sync_other_info: "Copy other config",
|
||||
delete_current_version: 'Current version',
|
||||
delete_all_version: 'All versions',
|
||||
change_password_tips: 'Your password is the initial system password, please change it as soon as possible'
|
||||
change_password_tips: 'Your password is the initial system password, please change it as soon as possible',
|
||||
git_repository: 'Git Repository',
|
||||
repositoryUrl: 'Git Repository Url',
|
||||
repositoryName: 'Git Repository Name',
|
||||
repositoryUsername: 'User name'
|
||||
},
|
||||
login: {
|
||||
normal_Login: "Normal Login",
|
||||
|
@ -563,6 +567,7 @@ export default {
|
|||
template_manage: "Template Manage",
|
||||
case_template_manage: "Case Template",
|
||||
issue_template_manage: "Issue Template",
|
||||
system_setting_git_repository: 'MS sets up git repositories at the system level',
|
||||
custom_filed: {
|
||||
input: 'Input',
|
||||
textarea: 'Textarea',
|
||||
|
@ -831,6 +836,19 @@ export default {
|
|||
input_id_or_email: 'Please enter user ID, or user Email',
|
||||
no_such_user: 'Without this user information, please enter the correct user ID or user Email!',
|
||||
},
|
||||
repository: {
|
||||
create: 'Add the repository',
|
||||
modify: 'Modifying the repository',
|
||||
delete_confirm: 'Are you sure you want to delete this repository?',
|
||||
please_choose_repository: 'Select the repository',
|
||||
search_by_name: 'Search by name',
|
||||
modify_repository_info: 'Modify repository information',
|
||||
input_repository_name: 'Please enter a repository name',
|
||||
special_characters_are_not_supported: 'Special characters are not supported',
|
||||
input_repository_url: 'Please enter the repository address',
|
||||
input_username: 'Please enter a user name',
|
||||
input_password: 'Please enter your password',
|
||||
},
|
||||
user: {
|
||||
id: 'User ID',
|
||||
create: 'Create',
|
||||
|
@ -2633,6 +2651,14 @@ export default {
|
|||
delimiter: "Delimiter",
|
||||
format: "Output format",
|
||||
quoted_data: "Whether to allow quotes",
|
||||
file_resource: "Source file",
|
||||
local_file: "The local file",
|
||||
git_repository: "Git repository",
|
||||
git_branch: "Git branch",
|
||||
git_branch_placeholder: "Git branch name, case sensitive",
|
||||
git_file_path: "The file path",
|
||||
git_file_path_placeholder: "Path to the CSV file in the repository",
|
||||
choose_git_repository: "Select the Git repository"
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: 'This operation will delete the authentication source, do you want to continue? ',
|
||||
|
@ -3068,7 +3094,14 @@ export default {
|
|||
performance: "Performance",
|
||||
project: "Project",
|
||||
report: "Report Statistics"
|
||||
}
|
||||
},
|
||||
workspace_repository: {
|
||||
name: "Git repository",
|
||||
read: "Querying the repository",
|
||||
create: "Adding a repository",
|
||||
edit: "Edit repository",
|
||||
delete: "Deleting a repository",
|
||||
},
|
||||
},
|
||||
env_options: {
|
||||
all_assertions: "Assertions"
|
||||
|
|
|
@ -442,6 +442,10 @@ export default {
|
|||
delete_current_version: '列表版本',
|
||||
delete_all_version: '全部版本',
|
||||
change_password_tips: '您的密码是系统初始密码,请尽快修改密码',
|
||||
git_repository: 'Git存储库',
|
||||
repositoryUrl: 'Git存储库地址',
|
||||
repositoryName: 'Git存储库名称',
|
||||
repositoryUsername: '用户名'
|
||||
},
|
||||
login: {
|
||||
normal_Login: "普通登录",
|
||||
|
@ -565,6 +569,7 @@ export default {
|
|||
template_manage: "模版管理",
|
||||
case_template_manage: "用例模版",
|
||||
issue_template_manage: "缺陷模版",
|
||||
system_setting_git_repository: 'MS在系统级别设置git仓库',
|
||||
custom_filed: {
|
||||
input: '输入框',
|
||||
textarea: '文本框',
|
||||
|
@ -835,6 +840,19 @@ export default {
|
|||
input_id_or_email: '请输入用户 ID, 或者 用户邮箱',
|
||||
no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!',
|
||||
},
|
||||
repository: {
|
||||
create: '添加存储库',
|
||||
modify: '修改存储库',
|
||||
delete_confirm: '确定要删除这个存储库吗?',
|
||||
please_choose_repository: '请选择存储库',
|
||||
search_by_name: '根据名称搜索',
|
||||
modify_repository_info: '修改存储库信息',
|
||||
input_repository_name: '请输入存储库名称',
|
||||
special_characters_are_not_supported: '不支持特殊字符',
|
||||
input_repository_url: '请输入存储库地址',
|
||||
input_username: '请输入用户名',
|
||||
input_password: '请输入密码',
|
||||
},
|
||||
user: {
|
||||
id: '用户ID',
|
||||
create: '创建用户',
|
||||
|
@ -2636,6 +2654,14 @@ export default {
|
|||
delimiter: "分隔符",
|
||||
format: "输出格式",
|
||||
quoted_data: "是否允许带引号",
|
||||
file_resource: "文件来源",
|
||||
local_file: "本地文件",
|
||||
git_repository: "Git存储库",
|
||||
git_branch: "Git分支",
|
||||
git_branch_placeholder: "Git分支名,区分大小写",
|
||||
git_file_path: "文件路径",
|
||||
git_file_path_placeholder: "存储库中的CSV文件的所在路径",
|
||||
choose_git_repository: "请选择Git存储库"
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: '此操作会删除认证源,是否继续?',
|
||||
|
@ -3072,7 +3098,14 @@ export default {
|
|||
performance: "性能测试",
|
||||
project: "项目设置",
|
||||
report: "报表统计",
|
||||
}
|
||||
},
|
||||
workspace_repository: {
|
||||
name: "Git存储库",
|
||||
read: "查询存储库",
|
||||
create: "添加存储库",
|
||||
edit: "编辑存储库",
|
||||
delete: "删除存储库",
|
||||
},
|
||||
},
|
||||
env_options: {
|
||||
all_assertions: "全局断言"
|
||||
|
|
|
@ -442,6 +442,10 @@ export default {
|
|||
delete_current_version: '列表版本',
|
||||
delete_all_version: '全部版本',
|
||||
change_password_tips: '您的密碼是系統初始密碼,請盡快修改密碼',
|
||||
git_repository: 'Git存儲庫',
|
||||
repositoryUrl: 'Git存儲庫地址',
|
||||
repositoryName: 'Git存儲庫名稱',
|
||||
repositoryUsername: '用戶名'
|
||||
},
|
||||
login: {
|
||||
normal_Login: "普通登錄",
|
||||
|
@ -565,6 +569,7 @@ export default {
|
|||
template_manage: "模版管理",
|
||||
case_template_manage: "用例模版",
|
||||
issue_template_manage: "缺陷模版",
|
||||
system_setting_git_repository: 'MS在系統級別設置git倉庫',
|
||||
custom_filed: {
|
||||
input: '輸入框',
|
||||
textarea: '文本框',
|
||||
|
@ -835,6 +840,19 @@ export default {
|
|||
input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱',
|
||||
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
|
||||
},
|
||||
repository: {
|
||||
create: '添加存儲庫',
|
||||
modify: '修改存儲庫',
|
||||
delete_confirm: '確定要刪除這個存儲庫嗎?',
|
||||
please_choose_repository: '請選擇存儲庫',
|
||||
search_by_name: '根據名稱搜索',
|
||||
modify_repository_info: '修改存儲庫信息',
|
||||
input_repository_name: '請輸入存儲庫名稱',
|
||||
special_characters_are_not_supported: '不支持特殊字符',
|
||||
input_repository_url: '請輸入存儲庫地址',
|
||||
input_username: '請輸入用戶名',
|
||||
input_password: '請輸入密碼',
|
||||
},
|
||||
user: {
|
||||
id: '用戶ID',
|
||||
create: '創建用戶',
|
||||
|
@ -2635,6 +2653,14 @@ export default {
|
|||
delimiter: "分隔符",
|
||||
format: "輸出格式",
|
||||
quoted_data: "是否允許帶引號",
|
||||
file_resource: "文件來源",
|
||||
local_file: "本地文件",
|
||||
git_repository: "Git存儲庫",
|
||||
git_branch: "Git分支",
|
||||
git_branch_placeholder: "Git分支名,區分大小寫",
|
||||
git_file_path: "文件路徑",
|
||||
git_file_path_placeholder: "存儲庫中的CSV文件的所在路徑",
|
||||
choose_git_repository: "請選擇Git存儲庫"
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: '此操作會刪除認證源,是否繼續?',
|
||||
|
@ -3071,7 +3097,14 @@ export default {
|
|||
performance: "性能測試",
|
||||
project: "項目設置",
|
||||
report: "報表統計"
|
||||
}
|
||||
},
|
||||
workspace_repository: {
|
||||
name: "Git存儲庫",
|
||||
read: "查詢存儲庫",
|
||||
create: "添加存儲庫",
|
||||
edit: "編輯存儲庫",
|
||||
delete: "刪除存儲庫",
|
||||
},
|
||||
},
|
||||
env_options: {
|
||||
all_assertions: "全局斷言"
|
||||
|
|
|
@ -231,7 +231,7 @@ export default {
|
|||
let redirectUrl = '/';
|
||||
if (hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ', 'PROJECT_MESSAGE:READ', 'PROJECT_TEMPLATE:READ')) {
|
||||
redirectUrl = '/project/home';
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ')) {
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_REPOSITORY:READ')) {
|
||||
redirectUrl = '/setting/project/:type';
|
||||
} else if (hasPermissions('SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ', 'SYSTEM_QUOTA:READ', 'SYSTEM_OPERATING_LOG:READ')) {
|
||||
redirectUrl = '/setting';
|
||||
|
|
Loading…
Reference in New Issue