From 9a009dbf2875af0c08041bb0fae9167303bbc15e Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 20 Oct 2020 12:53:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0jar=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/jmeter/NewDriverManager.java | 4 + .../base/domain/ApiTestJarConfig.java | 27 - .../base/domain/ApiTestJarConfigExample.java | 810 ------------------ .../base/mapper/ApiTestJarConfigMapper.java | 30 - .../base/mapper/ApiTestJarConfigMapper.xml | 275 ------ .../JarConfigController.java} | 28 +- .../JarConfigService.java} | 0 .../settings/system/JarConfigSetting.vue | 306 +++++++ .../settings/system/edit/JarConfigEdit.vue | 13 + 9 files changed, 337 insertions(+), 1156 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/api/jmeter/NewDriverManager.java delete mode 100644 backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfig.java delete mode 100644 backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfigExample.java delete mode 100644 backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.java delete mode 100644 backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.xml rename backend/src/main/java/io/metersphere/{api/controller/ApiTestJarConfigController.java => controller/JarConfigController.java} (56%) rename backend/src/main/java/io/metersphere/{api/service/ApiTestJarConfigService.java => service/JarConfigService.java} (100%) create mode 100644 frontend/src/business/components/settings/system/JarConfigSetting.vue create mode 100644 frontend/src/business/components/settings/system/edit/JarConfigEdit.vue diff --git a/backend/src/main/java/io/metersphere/api/jmeter/NewDriverManager.java b/backend/src/main/java/io/metersphere/api/jmeter/NewDriverManager.java new file mode 100644 index 0000000000..2a2428aac2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/jmeter/NewDriverManager.java @@ -0,0 +1,4 @@ +package io.metersphere.api.jmeter; + +public class NewDriverManager { +} diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfig.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfig.java deleted file mode 100644 index 00a315b3c3..0000000000 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -package io.metersphere.base.domain; - -import java.io.Serializable; -import lombok.Data; - -@Data -public class ApiTestJarConfig implements Serializable { - private String id; - - private String name; - - private String fileName; - - private String owner; - - private String path; - - private String projectId; - - private String description; - - private Long createTime; - - private Long updateTime; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfigExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfigExample.java deleted file mode 100644 index 3c150cb696..0000000000 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestJarConfigExample.java +++ /dev/null @@ -1,810 +0,0 @@ -package io.metersphere.base.domain; - -import java.util.ArrayList; -import java.util.List; - -public class ApiTestJarConfigExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ApiTestJarConfigExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(String value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(String value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(String value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(String value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(String value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(String value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(String value1, String value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(String value1, String value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("`name` is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("`name` is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("`name` =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("`name` <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("`name` >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("`name` >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("`name` <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("`name` <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("`name` like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("`name` not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("`name` in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("`name` not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("`name` between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("`name` not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andFileNameIsNull() { - addCriterion("file_name is null"); - return (Criteria) this; - } - - public Criteria andFileNameIsNotNull() { - addCriterion("file_name is not null"); - return (Criteria) this; - } - - public Criteria andFileNameEqualTo(String value) { - addCriterion("file_name =", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameNotEqualTo(String value) { - addCriterion("file_name <>", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameGreaterThan(String value) { - addCriterion("file_name >", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameGreaterThanOrEqualTo(String value) { - addCriterion("file_name >=", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameLessThan(String value) { - addCriterion("file_name <", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameLessThanOrEqualTo(String value) { - addCriterion("file_name <=", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameLike(String value) { - addCriterion("file_name like", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameNotLike(String value) { - addCriterion("file_name not like", value, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameIn(List values) { - addCriterion("file_name in", values, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameNotIn(List values) { - addCriterion("file_name not in", values, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameBetween(String value1, String value2) { - addCriterion("file_name between", value1, value2, "fileName"); - return (Criteria) this; - } - - public Criteria andFileNameNotBetween(String value1, String value2) { - addCriterion("file_name not between", value1, value2, "fileName"); - return (Criteria) this; - } - - public Criteria andOwnerIsNull() { - addCriterion("`owner` is null"); - return (Criteria) this; - } - - public Criteria andOwnerIsNotNull() { - addCriterion("`owner` is not null"); - return (Criteria) this; - } - - public Criteria andOwnerEqualTo(String value) { - addCriterion("`owner` =", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerNotEqualTo(String value) { - addCriterion("`owner` <>", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerGreaterThan(String value) { - addCriterion("`owner` >", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerGreaterThanOrEqualTo(String value) { - addCriterion("`owner` >=", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerLessThan(String value) { - addCriterion("`owner` <", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerLessThanOrEqualTo(String value) { - addCriterion("`owner` <=", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerLike(String value) { - addCriterion("`owner` like", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerNotLike(String value) { - addCriterion("`owner` not like", value, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerIn(List values) { - addCriterion("`owner` in", values, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerNotIn(List values) { - addCriterion("`owner` not in", values, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerBetween(String value1, String value2) { - addCriterion("`owner` between", value1, value2, "owner"); - return (Criteria) this; - } - - public Criteria andOwnerNotBetween(String value1, String value2) { - addCriterion("`owner` not between", value1, value2, "owner"); - 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 values) { - addCriterion("`path` in", values, "path"); - return (Criteria) this; - } - - public Criteria andPathNotIn(List 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 andProjectIdIsNull() { - addCriterion("project_id is null"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdEqualTo(String value) { - addCriterion("project_id =", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(String value) { - addCriterion("project_id <>", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThan(String value) { - addCriterion("project_id >", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThanOrEqualTo(String value) { - addCriterion("project_id >=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThan(String value) { - addCriterion("project_id <", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThanOrEqualTo(String value) { - addCriterion("project_id <=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLike(String value) { - addCriterion("project_id like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotLike(String value) { - addCriterion("project_id not like", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdBetween(String value1, String value2) { - addCriterion("project_id between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotBetween(String value1, String value2) { - addCriterion("project_id not between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Long value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Long value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Long value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Long value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Long value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Long value1, Long value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Long value1, Long value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("update_time is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("update_time is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Long value) { - addCriterion("update_time =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Long value) { - addCriterion("update_time <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Long value) { - addCriterion("update_time >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("update_time >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Long value) { - addCriterion("update_time <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { - addCriterion("update_time <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("update_time in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("update_time not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Long value1, Long value2) { - addCriterion("update_time between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { - addCriterion("update_time not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.java deleted file mode 100644 index d5f294805a..0000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.base.mapper; - -import io.metersphere.base.domain.ApiTestJarConfig; -import io.metersphere.base.domain.ApiTestJarConfigExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ApiTestJarConfigMapper { - long countByExample(ApiTestJarConfigExample example); - - int deleteByExample(ApiTestJarConfigExample example); - - int deleteByPrimaryKey(String id); - - int insert(ApiTestJarConfig record); - - int insertSelective(ApiTestJarConfig record); - - List selectByExample(ApiTestJarConfigExample example); - - ApiTestJarConfig selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ApiTestJarConfig record, @Param("example") ApiTestJarConfigExample example); - - int updateByExample(@Param("record") ApiTestJarConfig record, @Param("example") ApiTestJarConfigExample example); - - int updateByPrimaryKeySelective(ApiTestJarConfig record); - - int updateByPrimaryKey(ApiTestJarConfig record); -} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.xml deleted file mode 100644 index fdb59c3665..0000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiTestJarConfigMapper.xml +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, `name`, file_name, `owner`, `path`, project_id, description, create_time, update_time - - - - - delete from api_test_jar_config - where id = #{id,jdbcType=VARCHAR} - - - delete from api_test_jar_config - - - - - - insert into api_test_jar_config (id, `name`, file_name, - `owner`, `path`, project_id, - description, create_time, update_time - ) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, - #{owner,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT} - ) - - - insert into api_test_jar_config - - - id, - - - `name`, - - - file_name, - - - `owner`, - - - `path`, - - - project_id, - - - description, - - - create_time, - - - update_time, - - - - - #{id,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{fileName,jdbcType=VARCHAR}, - - - #{owner,jdbcType=VARCHAR}, - - - #{path,jdbcType=VARCHAR}, - - - #{projectId,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - #{updateTime,jdbcType=BIGINT}, - - - - - - update api_test_jar_config - - - id = #{record.id,jdbcType=VARCHAR}, - - - `name` = #{record.name,jdbcType=VARCHAR}, - - - file_name = #{record.fileName,jdbcType=VARCHAR}, - - - `owner` = #{record.owner,jdbcType=VARCHAR}, - - - `path` = #{record.path,jdbcType=VARCHAR}, - - - project_id = #{record.projectId,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - update_time = #{record.updateTime,jdbcType=BIGINT}, - - - - - - - - update api_test_jar_config - set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - file_name = #{record.fileName,jdbcType=VARCHAR}, - `owner` = #{record.owner,jdbcType=VARCHAR}, - `path` = #{record.path,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT} - - - - - - update api_test_jar_config - - - `name` = #{name,jdbcType=VARCHAR}, - - - file_name = #{fileName,jdbcType=VARCHAR}, - - - `owner` = #{owner,jdbcType=VARCHAR}, - - - `path` = #{path,jdbcType=VARCHAR}, - - - project_id = #{projectId,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - update_time = #{updateTime,jdbcType=BIGINT}, - - - where id = #{id,jdbcType=VARCHAR} - - - update api_test_jar_config - set `name` = #{name,jdbcType=VARCHAR}, - file_name = #{fileName,jdbcType=VARCHAR}, - `owner` = #{owner,jdbcType=VARCHAR}, - `path` = #{path,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT} - where id = #{id,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiTestJarConfigController.java b/backend/src/main/java/io/metersphere/controller/JarConfigController.java similarity index 56% rename from backend/src/main/java/io/metersphere/api/controller/ApiTestJarConfigController.java rename to backend/src/main/java/io/metersphere/controller/JarConfigController.java index b6aaf79dd0..9ecee4bb48 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiTestJarConfigController.java +++ b/backend/src/main/java/io/metersphere/controller/JarConfigController.java @@ -1,7 +1,7 @@ -package io.metersphere.api.controller; +package io.metersphere.controller; -import io.metersphere.api.service.ApiTestJarConfigService; -import io.metersphere.base.domain.ApiTestJarConfig; +import io.metersphere.api.service.JarConfigService; +import io.metersphere.base.domain.JarConfig; import io.metersphere.commons.constants.RoleConstants; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresRoles; @@ -14,37 +14,37 @@ import java.util.List; @RestController @RequestMapping(value = "/api/jar") @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) -public class ApiTestJarConfigController { +public class JarConfigController { @Resource - ApiTestJarConfigService apiTestJarConfigService; + Jarc JarConfigService; @GetMapping("/list/{projectId}") - public List list(@PathVariable String projectId) { - return apiTestJarConfigService.list(projectId); + public List list(@PathVariable String projectId) { + return JarConfigService.list(projectId); } @GetMapping("/get/{id}") - public ApiTestJarConfig get(@PathVariable String id) { - return apiTestJarConfigService.get(id); + public JarConfig get(@PathVariable String id) { + return JarConfigService.get(id); } @PostMapping(value = "/add", consumes = {"multipart/form-data"}) @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER,}, logical = Logical.OR) - public String add(@RequestPart("request") ApiTestJarConfig request, @RequestPart(value = "file") MultipartFile file) { - return apiTestJarConfigService.add(request, file); + public String add(@RequestPart("request") JarConfig request, @RequestPart(value = "file") MultipartFile file) { + return JarConfigService.add(request, file); } @PostMapping(value = "/update", consumes = {"multipart/form-data"}) @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER,}, logical = Logical.OR) - public void update(@RequestPart("request") ApiTestJarConfig request, @RequestPart(value = "file", required = false) MultipartFile file) { - apiTestJarConfigService.update(request, file); + public void update(@RequestPart("request") JarConfig request, @RequestPart(value = "file", required = false) MultipartFile file) { + JarConfigService.update(request, file); } @GetMapping("/delete/{id}") @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER,}, logical = Logical.OR) public void delete(@PathVariable String id) { - apiTestJarConfigService.delete(id); + JarConfigService.delete(id); } } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestJarConfigService.java b/backend/src/main/java/io/metersphere/service/JarConfigService.java similarity index 100% rename from backend/src/main/java/io/metersphere/api/service/ApiTestJarConfigService.java rename to backend/src/main/java/io/metersphere/service/JarConfigService.java diff --git a/frontend/src/business/components/settings/system/JarConfigSetting.vue b/frontend/src/business/components/settings/system/JarConfigSetting.vue new file mode 100644 index 0000000000..c8d469b2da --- /dev/null +++ b/frontend/src/business/components/settings/system/JarConfigSetting.vue @@ -0,0 +1,306 @@ + + + + + + diff --git a/frontend/src/business/components/settings/system/edit/JarConfigEdit.vue b/frontend/src/business/components/settings/system/edit/JarConfigEdit.vue new file mode 100644 index 0000000000..0b42cda26a --- /dev/null +++ b/frontend/src/business/components/settings/system/edit/JarConfigEdit.vue @@ -0,0 +1,13 @@ + + + + +