feat: 数据连接

This commit is contained in:
taojinlong 2021-02-22 15:30:15 +08:00
commit fa58f02611
48 changed files with 3549 additions and 326 deletions

View File

@ -0,0 +1,21 @@
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetGroup implements Serializable {
private String id;
private String name;
private String pid;
private Integer level;
private String createBy;
private Long createTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,600 @@
package io.dataease.base.domain;
import java.util.ArrayList;
import java.util.List;
public class DatasetGroupExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DatasetGroupExample() {
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 andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andPidIsNull() {
addCriterion("pid is null");
return (Criteria) this;
}
public Criteria andPidIsNotNull() {
addCriterion("pid is not null");
return (Criteria) this;
}
public Criteria andPidEqualTo(String value) {
addCriterion("pid =", value, "pid");
return (Criteria) this;
}
public Criteria andPidNotEqualTo(String value) {
addCriterion("pid <>", value, "pid");
return (Criteria) this;
}
public Criteria andPidGreaterThan(String value) {
addCriterion("pid >", value, "pid");
return (Criteria) this;
}
public Criteria andPidGreaterThanOrEqualTo(String value) {
addCriterion("pid >=", value, "pid");
return (Criteria) this;
}
public Criteria andPidLessThan(String value) {
addCriterion("pid <", value, "pid");
return (Criteria) this;
}
public Criteria andPidLessThanOrEqualTo(String value) {
addCriterion("pid <=", value, "pid");
return (Criteria) this;
}
public Criteria andPidLike(String value) {
addCriterion("pid like", value, "pid");
return (Criteria) this;
}
public Criteria andPidNotLike(String value) {
addCriterion("pid not like", value, "pid");
return (Criteria) this;
}
public Criteria andPidIn(List<String> values) {
addCriterion("pid in", values, "pid");
return (Criteria) this;
}
public Criteria andPidNotIn(List<String> values) {
addCriterion("pid not in", values, "pid");
return (Criteria) this;
}
public Criteria andPidBetween(String value1, String value2) {
addCriterion("pid between", value1, value2, "pid");
return (Criteria) this;
}
public Criteria andPidNotBetween(String value1, String value2) {
addCriterion("pid not between", value1, value2, "pid");
return (Criteria) this;
}
public Criteria andLevelIsNull() {
addCriterion("`level` is null");
return (Criteria) this;
}
public Criteria andLevelIsNotNull() {
addCriterion("`level` is not null");
return (Criteria) this;
}
public Criteria andLevelEqualTo(Integer value) {
addCriterion("`level` =", value, "level");
return (Criteria) this;
}
public Criteria andLevelNotEqualTo(Integer value) {
addCriterion("`level` <>", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThan(Integer value) {
addCriterion("`level` >", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThanOrEqualTo(Integer value) {
addCriterion("`level` >=", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThan(Integer value) {
addCriterion("`level` <", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThanOrEqualTo(Integer value) {
addCriterion("`level` <=", value, "level");
return (Criteria) this;
}
public Criteria andLevelIn(List<Integer> values) {
addCriterion("`level` in", values, "level");
return (Criteria) this;
}
public Criteria andLevelNotIn(List<Integer> values) {
addCriterion("`level` not in", values, "level");
return (Criteria) this;
}
public Criteria andLevelBetween(Integer value1, Integer value2) {
addCriterion("`level` between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andLevelNotBetween(Integer value1, Integer value2) {
addCriterion("`level` not between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
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 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);
}
}
}

View File

@ -0,0 +1,19 @@
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetScene implements Serializable {
private String id;
private String name;
private String groupId;
private String createBy;
private Long createTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,540 @@
package io.dataease.base.domain;
import java.util.ArrayList;
import java.util.List;
public class DatasetSceneExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DatasetSceneExample() {
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 andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andGroupIdIsNull() {
addCriterion("group_id is null");
return (Criteria) this;
}
public Criteria andGroupIdIsNotNull() {
addCriterion("group_id is not null");
return (Criteria) this;
}
public Criteria andGroupIdEqualTo(String value) {
addCriterion("group_id =", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotEqualTo(String value) {
addCriterion("group_id <>", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThan(String value) {
addCriterion("group_id >", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdGreaterThanOrEqualTo(String value) {
addCriterion("group_id >=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThan(String value) {
addCriterion("group_id <", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLessThanOrEqualTo(String value) {
addCriterion("group_id <=", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdLike(String value) {
addCriterion("group_id like", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotLike(String value) {
addCriterion("group_id not like", value, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdIn(List<String> values) {
addCriterion("group_id in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotIn(List<String> values) {
addCriterion("group_id not in", values, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdBetween(String value1, String value2) {
addCriterion("group_id between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andGroupIdNotBetween(String value1, String value2) {
addCriterion("group_id not between", value1, value2, "groupId");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
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 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);
}
}
}

View File

@ -0,0 +1,32 @@
package io.dataease.base.domain;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
@Data
public class SysDept implements Serializable {
private Long deptId;
private Long pid;
private Integer subCount;
private String name;
private Integer level;
private Integer deptSort;
private Boolean enabled;
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,891 @@
package io.dataease.base.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysDeptExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysDeptExample() {
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 andDeptIdIsNull() {
addCriterion("dept_id is null");
return (Criteria) this;
}
public Criteria andDeptIdIsNotNull() {
addCriterion("dept_id is not null");
return (Criteria) this;
}
public Criteria andDeptIdEqualTo(Long value) {
addCriterion("dept_id =", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdNotEqualTo(Long value) {
addCriterion("dept_id <>", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdGreaterThan(Long value) {
addCriterion("dept_id >", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
addCriterion("dept_id >=", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdLessThan(Long value) {
addCriterion("dept_id <", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdLessThanOrEqualTo(Long value) {
addCriterion("dept_id <=", value, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdIn(List<Long> values) {
addCriterion("dept_id in", values, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdNotIn(List<Long> values) {
addCriterion("dept_id not in", values, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdBetween(Long value1, Long value2) {
addCriterion("dept_id between", value1, value2, "deptId");
return (Criteria) this;
}
public Criteria andDeptIdNotBetween(Long value1, Long value2) {
addCriterion("dept_id not between", value1, value2, "deptId");
return (Criteria) this;
}
public Criteria andPidIsNull() {
addCriterion("pid is null");
return (Criteria) this;
}
public Criteria andPidIsNotNull() {
addCriterion("pid is not null");
return (Criteria) this;
}
public Criteria andPidEqualTo(Long value) {
addCriterion("pid =", value, "pid");
return (Criteria) this;
}
public Criteria andPidNotEqualTo(Long value) {
addCriterion("pid <>", value, "pid");
return (Criteria) this;
}
public Criteria andPidGreaterThan(Long value) {
addCriterion("pid >", value, "pid");
return (Criteria) this;
}
public Criteria andPidGreaterThanOrEqualTo(Long value) {
addCriterion("pid >=", value, "pid");
return (Criteria) this;
}
public Criteria andPidLessThan(Long value) {
addCriterion("pid <", value, "pid");
return (Criteria) this;
}
public Criteria andPidLessThanOrEqualTo(Long value) {
addCriterion("pid <=", value, "pid");
return (Criteria) this;
}
public Criteria andPidIn(List<Long> values) {
addCriterion("pid in", values, "pid");
return (Criteria) this;
}
public Criteria andPidNotIn(List<Long> values) {
addCriterion("pid not in", values, "pid");
return (Criteria) this;
}
public Criteria andPidBetween(Long value1, Long value2) {
addCriterion("pid between", value1, value2, "pid");
return (Criteria) this;
}
public Criteria andPidNotBetween(Long value1, Long value2) {
addCriterion("pid not between", value1, value2, "pid");
return (Criteria) this;
}
public Criteria andSubCountIsNull() {
addCriterion("sub_count is null");
return (Criteria) this;
}
public Criteria andSubCountIsNotNull() {
addCriterion("sub_count is not null");
return (Criteria) this;
}
public Criteria andSubCountEqualTo(Integer value) {
addCriterion("sub_count =", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountNotEqualTo(Integer value) {
addCriterion("sub_count <>", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountGreaterThan(Integer value) {
addCriterion("sub_count >", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountGreaterThanOrEqualTo(Integer value) {
addCriterion("sub_count >=", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountLessThan(Integer value) {
addCriterion("sub_count <", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountLessThanOrEqualTo(Integer value) {
addCriterion("sub_count <=", value, "subCount");
return (Criteria) this;
}
public Criteria andSubCountIn(List<Integer> values) {
addCriterion("sub_count in", values, "subCount");
return (Criteria) this;
}
public Criteria andSubCountNotIn(List<Integer> values) {
addCriterion("sub_count not in", values, "subCount");
return (Criteria) this;
}
public Criteria andSubCountBetween(Integer value1, Integer value2) {
addCriterion("sub_count between", value1, value2, "subCount");
return (Criteria) this;
}
public Criteria andSubCountNotBetween(Integer value1, Integer value2) {
addCriterion("sub_count not between", value1, value2, "subCount");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andLevelIsNull() {
addCriterion("`level` is null");
return (Criteria) this;
}
public Criteria andLevelIsNotNull() {
addCriterion("`level` is not null");
return (Criteria) this;
}
public Criteria andLevelEqualTo(Integer value) {
addCriterion("`level` =", value, "level");
return (Criteria) this;
}
public Criteria andLevelNotEqualTo(Integer value) {
addCriterion("`level` <>", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThan(Integer value) {
addCriterion("`level` >", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThanOrEqualTo(Integer value) {
addCriterion("`level` >=", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThan(Integer value) {
addCriterion("`level` <", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThanOrEqualTo(Integer value) {
addCriterion("`level` <=", value, "level");
return (Criteria) this;
}
public Criteria andLevelIn(List<Integer> values) {
addCriterion("`level` in", values, "level");
return (Criteria) this;
}
public Criteria andLevelNotIn(List<Integer> values) {
addCriterion("`level` not in", values, "level");
return (Criteria) this;
}
public Criteria andLevelBetween(Integer value1, Integer value2) {
addCriterion("`level` between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andLevelNotBetween(Integer value1, Integer value2) {
addCriterion("`level` not between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andDeptSortIsNull() {
addCriterion("dept_sort is null");
return (Criteria) this;
}
public Criteria andDeptSortIsNotNull() {
addCriterion("dept_sort is not null");
return (Criteria) this;
}
public Criteria andDeptSortEqualTo(Integer value) {
addCriterion("dept_sort =", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortNotEqualTo(Integer value) {
addCriterion("dept_sort <>", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortGreaterThan(Integer value) {
addCriterion("dept_sort >", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortGreaterThanOrEqualTo(Integer value) {
addCriterion("dept_sort >=", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortLessThan(Integer value) {
addCriterion("dept_sort <", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortLessThanOrEqualTo(Integer value) {
addCriterion("dept_sort <=", value, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortIn(List<Integer> values) {
addCriterion("dept_sort in", values, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortNotIn(List<Integer> values) {
addCriterion("dept_sort not in", values, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortBetween(Integer value1, Integer value2) {
addCriterion("dept_sort between", value1, value2, "deptSort");
return (Criteria) this;
}
public Criteria andDeptSortNotBetween(Integer value1, Integer value2) {
addCriterion("dept_sort not between", value1, value2, "deptSort");
return (Criteria) this;
}
public Criteria andEnabledIsNull() {
addCriterion("enabled is null");
return (Criteria) this;
}
public Criteria andEnabledIsNotNull() {
addCriterion("enabled is not null");
return (Criteria) this;
}
public Criteria andEnabledEqualTo(Boolean value) {
addCriterion("enabled =", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledNotEqualTo(Boolean value) {
addCriterion("enabled <>", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledGreaterThan(Boolean value) {
addCriterion("enabled >", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledGreaterThanOrEqualTo(Boolean value) {
addCriterion("enabled >=", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledLessThan(Boolean value) {
addCriterion("enabled <", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledLessThanOrEqualTo(Boolean value) {
addCriterion("enabled <=", value, "enabled");
return (Criteria) this;
}
public Criteria andEnabledIn(List<Boolean> values) {
addCriterion("enabled in", values, "enabled");
return (Criteria) this;
}
public Criteria andEnabledNotIn(List<Boolean> values) {
addCriterion("enabled not in", values, "enabled");
return (Criteria) this;
}
public Criteria andEnabledBetween(Boolean value1, Boolean value2) {
addCriterion("enabled between", value1, value2, "enabled");
return (Criteria) this;
}
public Criteria andEnabledNotBetween(Boolean value1, Boolean value2) {
addCriterion("enabled not between", value1, value2, "enabled");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
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(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date 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(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date 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);
}
}
}

View File

@ -0,0 +1,30 @@
package io.dataease.base.mapper;
import io.dataease.base.domain.DatasetGroup;
import io.dataease.base.domain.DatasetGroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetGroupMapper {
long countByExample(DatasetGroupExample example);
int deleteByExample(DatasetGroupExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetGroup record);
int insertSelective(DatasetGroup record);
List<DatasetGroup> selectByExample(DatasetGroupExample example);
DatasetGroup selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetGroup record, @Param("example") DatasetGroupExample example);
int updateByExample(@Param("record") DatasetGroup record, @Param("example") DatasetGroupExample example);
int updateByPrimaryKeySelective(DatasetGroup record);
int updateByPrimaryKey(DatasetGroup record);
}

View File

@ -0,0 +1,228 @@
<?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.dataease.base.mapper.DatasetGroupMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetGroup">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="pid" jdbcType="VARCHAR" property="pid" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
</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, `name`, pid, `level`, create_by, create_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetGroupExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dataset_group
<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 dataset_group
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dataset_group
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetGroupExample">
delete from dataset_group
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetGroup">
insert into dataset_group (id, `name`, pid,
`level`, create_by, create_time
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetGroup">
insert into dataset_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
`name`,
</if>
<if test="pid != null">
pid,
</if>
<if test="level != null">
`level`,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetGroupExample" resultType="java.lang.Long">
select count(*) from dataset_group
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update dataset_group
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=VARCHAR},
</if>
<if test="record.level != null">
`level` = #{record.level,jdbcType=INTEGER},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update dataset_group
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
pid = #{record.pid,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.DatasetGroup">
update dataset_group
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="pid != null">
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="level != null">
`level` = #{level,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.DatasetGroup">
update dataset_group
set `name` = #{name,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,30 @@
package io.dataease.base.mapper;
import io.dataease.base.domain.DatasetScene;
import io.dataease.base.domain.DatasetSceneExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetSceneMapper {
long countByExample(DatasetSceneExample example);
int deleteByExample(DatasetSceneExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetScene record);
int insertSelective(DatasetScene record);
List<DatasetScene> selectByExample(DatasetSceneExample example);
DatasetScene selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetScene record, @Param("example") DatasetSceneExample example);
int updateByExample(@Param("record") DatasetScene record, @Param("example") DatasetSceneExample example);
int updateByPrimaryKeySelective(DatasetScene record);
int updateByPrimaryKey(DatasetScene record);
}

View File

@ -0,0 +1,211 @@
<?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.dataease.base.mapper.DatasetSceneMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetScene">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="group_id" jdbcType="VARCHAR" property="groupId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
</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, `name`, group_id, create_by, create_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetSceneExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dataset_scene
<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 dataset_scene
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dataset_scene
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetSceneExample">
delete from dataset_scene
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetScene">
insert into dataset_scene (id, `name`, group_id,
create_by, create_time)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetScene">
insert into dataset_scene
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
`name`,
</if>
<if test="groupId != null">
group_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
#{groupId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetSceneExample" resultType="java.lang.Long">
select count(*) from dataset_scene
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update dataset_scene
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.groupId != null">
group_id = #{record.groupId,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update dataset_scene
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
group_id = #{record.groupId,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.DatasetScene">
update dataset_scene
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="groupId != null">
group_id = #{groupId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.DatasetScene">
update dataset_scene
set `name` = #{name,jdbcType=VARCHAR},
group_id = #{groupId,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,30 @@
package io.dataease.base.mapper;
import io.dataease.base.domain.SysDept;
import io.dataease.base.domain.SysDeptExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysDeptMapper {
long countByExample(SysDeptExample example);
int deleteByExample(SysDeptExample example);
int deleteByPrimaryKey(Long deptId);
int insert(SysDept record);
int insertSelective(SysDept record);
List<SysDept> selectByExample(SysDeptExample example);
SysDept selectByPrimaryKey(Long deptId);
int updateByExampleSelective(@Param("record") SysDept record, @Param("example") SysDeptExample example);
int updateByExample(@Param("record") SysDept record, @Param("example") SysDeptExample example);
int updateByPrimaryKeySelective(SysDept record);
int updateByPrimaryKey(SysDept record);
}

View File

@ -0,0 +1,306 @@
<?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.dataease.base.mapper.SysDeptMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.SysDept">
<id column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="pid" jdbcType="BIGINT" property="pid" />
<result column="sub_count" jdbcType="INTEGER" property="subCount" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="dept_sort" jdbcType="INTEGER" property="deptSort" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
dept_id, pid, sub_count, `name`, `level`, dept_sort, enabled, create_by, update_by,
create_time, update_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.SysDeptExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_dept
<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.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.SysDeptExample">
delete from sys_dept
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.SysDept">
insert into sys_dept (dept_id, pid, sub_count,
`name`, `level`, dept_sort,
enabled, create_by, update_by,
create_time, update_time)
values (#{deptId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{deptSort,jdbcType=INTEGER},
#{enabled,jdbcType=BIT}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.SysDept">
insert into sys_dept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">
dept_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="subCount != null">
sub_count,
</if>
<if test="name != null">
`name`,
</if>
<if test="level != null">
`level`,
</if>
<if test="deptSort != null">
dept_sort,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
<if test="pid != null">
#{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
#{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="deptSort != null">
#{deptSort,jdbcType=INTEGER},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.SysDeptExample" resultType="java.lang.Long">
select count(*) from sys_dept
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_dept
<set>
<if test="record.deptId != null">
dept_id = #{record.deptId,jdbcType=BIGINT},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=BIGINT},
</if>
<if test="record.subCount != null">
sub_count = #{record.subCount,jdbcType=INTEGER},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.level != null">
`level` = #{record.level,jdbcType=INTEGER},
</if>
<if test="record.deptSort != null">
dept_sort = #{record.deptSort,jdbcType=INTEGER},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_dept
set dept_id = #{record.deptId,jdbcType=BIGINT},
pid = #{record.pid,jdbcType=BIGINT},
sub_count = #{record.subCount,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
dept_sort = #{record.deptSort,jdbcType=INTEGER},
enabled = #{record.enabled,jdbcType=BIT},
create_by = #{record.createBy,jdbcType=VARCHAR},
update_by = #{record.updateBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.SysDept">
update sys_dept
<set>
<if test="pid != null">
pid = #{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
sub_count = #{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
`level` = #{level,jdbcType=INTEGER},
</if>
<if test="deptSort != null">
dept_sort = #{deptSort,jdbcType=INTEGER},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where dept_id = #{deptId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.SysDept">
update sys_dept
set pid = #{pid,jdbcType=BIGINT},
sub_count = #{subCount,jdbcType=INTEGER},
`name` = #{name,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
dept_sort = #{deptSort,jdbcType=INTEGER},
enabled = #{enabled,jdbcType=BIT},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where dept_id = #{deptId,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
package io.dataease.commons.exception;
public class DEException extends RuntimeException {
private DEException(String message) {
super(message);
}
private DEException(Throwable t) {
super(t);
}
public static void throwException(String message) {
throw new DEException(message);
}
public static DEException getException(String message) {
throw new DEException(message);
}
public static void throwException(Throwable t) {
throw new DEException(t);
}
}

View File

@ -1,24 +0,0 @@
package io.dataease.commons.exception;
public class MSException extends RuntimeException {
private MSException(String message) {
super(message);
}
private MSException(Throwable t) {
super(t);
}
public static void throwException(String message) {
throw new MSException(message);
}
public static MSException getException(String message) {
throw new MSException(message);
}
public static void throwException(Throwable t) {
throw new MSException(t);
}
}

View File

@ -1,6 +1,6 @@
package io.dataease.commons.utils;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.i18n.Translator;
import org.apache.commons.collections.CollectionUtils;
import org.aspectj.util.FileUtil;
@ -26,7 +26,7 @@ public class FileUtils {
FileUtil.copyStream(in, out);
} catch (IOException e) {
LogUtil.error(e);
MSException.throwException(Translator.get("upload_fail"));
DEException.throwException(Translator.get("upload_fail"));
}
}
}

View File

@ -1,6 +1,6 @@
package io.dataease.commons.utils;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.controller.request.BaseQueryRequest;
import io.dataease.controller.request.OrderRequest;
@ -44,7 +44,7 @@ public class ServiceUtils {
setIds.invoke(batchRequest, ids);
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
MSException.throwException("请求没有setIds方法");
DEException.throwException("请求没有setIds方法");
}
}
}

View File

@ -2,7 +2,7 @@ package io.dataease.controller;
import io.dataease.commons.constants.I18nConstants;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.LogUtil;
import io.dataease.i18n.Lang;
import io.dataease.i18n.Translator;
@ -37,7 +37,7 @@ public class I18nController {
if (targetLang == null) {
response.setStatus(HttpServletResponse.SC_NOT_ACCEPTABLE);
LogUtil.error("Invalid parameter: " + lang);
MSException.throwException(Translator.get("error_lang_invalid"));
DEException.throwException(Translator.get("error_lang_invalid"));
}
userService.setLanguage(targetLang.getDesc());
Cookie cookie = new Cookie(I18nConstants.LANG_COOKIE_NAME, targetLang.getDesc());

View File

@ -4,7 +4,7 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.dataease.base.domain.User;
import io.dataease.commons.constants.RoleConstants;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.user.SessionUser;
import io.dataease.commons.utils.PageUtils;
import io.dataease.commons.utils.Pager;
@ -138,7 +138,7 @@ public class UserController {
public UserDTO updateCurrentUser(@RequestBody User user) {
String currentUserId = SessionUtils.getUserId();
if (!StringUtils.equals(currentUserId, user.getId())) {
MSException.throwException(Translator.get("not_authorized"));
DEException.throwException(Translator.get("not_authorized"));
}
userService.updateUser(user);
UserDTO userDTO = userService.getUserDTO(user.getId());
@ -169,7 +169,7 @@ public class UserController {
@GetMapping("/info/{userId}")
public UserDTO getUserInfo(@PathVariable(value = "userId") String userId) {
if (!StringUtils.equals(userId, SessionUtils.getUserId())) {
MSException.throwException(Translator.get("not_authorized"));
DEException.throwException(Translator.get("not_authorized"));
}
return userService.getUserInfo(userId);
}
@ -215,7 +215,7 @@ public class UserController {
workspaceService.checkWorkspaceOwner(workspaceId);
String currentUserId = SessionUtils.getUser().getId();
if (StringUtils.equals(userId, currentUserId)) {
MSException.throwException(Translator.get("cannot_remove_current"));
DEException.throwException(Translator.get("cannot_remove_current"));
}
userService.deleteMember(workspaceId, userId);
}
@ -239,7 +239,7 @@ public class UserController {
organizationService.checkOrgOwner(organizationId);
String currentUserId = SessionUtils.getUser().getId();
if (StringUtils.equals(userId, currentUserId)) {
MSException.throwException(Translator.get("cannot_remove_current"));
DEException.throwException(Translator.get("cannot_remove_current"));
}
userService.delOrganizationMember(organizationId, userId);
}

View File

@ -1,7 +1,7 @@
package io.dataease.controller.handler;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.controller.ResultHolder;
import org.apache.shiro.ShiroException;
import org.apache.shiro.authz.UnauthorizedException;
@ -32,13 +32,13 @@ public class RestControllerExceptionHandler {
@ExceptionHandler(SQLException.class)
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, DEException e) {
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return ResultHolder.error("SQL error happened, please check logs.");
}
@ExceptionHandler(MSException.class)
public ResultHolder msExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
@ExceptionHandler(DEException.class)
public ResultHolder msExceptionHandler(HttpServletRequest request, HttpServletResponse response, DEException e) {
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return ResultHolder.error(e.getMessage());
}

View File

@ -0,0 +1,38 @@
package io.dataease.controller.sys;
import io.dataease.base.domain.SysDept;
import io.dataease.service.sys.DeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequiredArgsConstructor
@Api(tags = "系统:部门管理")
@RequestMapping("/api/dept")
public class SysDeptController {
@Resource
private DeptService deptService;
@ApiOperation("查询部门")
@PostMapping("/root")
public List<SysDept> rootData(){
List<SysDept> root = deptService.root();
return root;
}
@ApiOperation("新增部门")
@PostMapping("/create")
public void create(@RequestBody SysDept dept){
deptService.add(dept);
}
}

View File

@ -0,0 +1,6 @@
package io.dataease.controller.sys.request;
public class DeptCreateRequest {
}

View File

@ -19,13 +19,13 @@ public class DatasourceController {
private DatasourceService datasourceService;
@PostMapping("/add")
public Datasource addDatasource(@RequestBody Datasource Datasource) {
return datasourceService.addDatasource(Datasource);
public Datasource addDatasource(@RequestBody Datasource datasource) {
return datasourceService.addDatasource(datasource);
}
@PostMapping("/validate")
public void validate(@RequestBody Datasource Datasource) throws Exception{
datasourceService.validate(Datasource);
public void validate(@RequestBody Datasource datasource) throws Exception{
datasourceService.validate(datasource);
}
@GetMapping("/list")

View File

@ -1,11 +1,15 @@
package io.dataease.datasource.provider;
import io.dataease.base.domain.Datasource;
import java.util.List;
public abstract class DatasourceProvider {
protected String dataSourceConfigration;
protected String type;
protected String query;
private int resultLimit = 30000;
protected Datasource datasource;
public String getQuery() {
return query;
@ -15,27 +19,14 @@ public abstract class DatasourceProvider {
this.query = query;
}
protected String query;
private int resultLimit = 30000;
public String getDataSourceConfigration() {
return dataSourceConfigration;
public Datasource getDatasource() {
return datasource;
}
public void setDataSourceConfigration(String dataSourceConfigration) {
this.dataSourceConfigration = dataSourceConfigration;
public void setDatasource(Datasource datasource) {
this.datasource = datasource;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
abstract public List<String[]> getData() throws Exception;
abstract public List<String> getTables() throws Exception;

View File

@ -80,10 +80,10 @@ public class JdbcProvider extends DatasourceProvider{
String password = null;
String driver = null;
String jdbcurl = null;
DatasourceTypes datasourceType = DatasourceTypes.valueOf(getType());
DatasourceTypes datasourceType = DatasourceTypes.valueOf(getDatasource().getType());
switch (datasourceType){
case mysql:
MysqlConfigrationDTO mysqlConfigrationDTO = new Gson().fromJson(getDataSourceConfigration(), MysqlConfigrationDTO.class);
MysqlConfigrationDTO mysqlConfigrationDTO = new Gson().fromJson(getDatasource().getConfiguration(), MysqlConfigrationDTO.class);
username = mysqlConfigrationDTO.getUsername();
password = mysqlConfigrationDTO.getPassword();
driver = mysqlConfigrationDTO.getDriver();

View File

@ -19,7 +19,9 @@ public class ProviderFactory implements ApplicationContextAware {
}
public static DatasourceProvider getProvider(String type){
System.out.println(type);
DatasourceTypes datasourceType = DatasourceTypes.valueOf(type);
System.out.println(datasourceType.name());
switch (datasourceType){
case mysql:
return context.getBean("jdbc", DatasourceProvider.class);

View File

@ -3,10 +3,12 @@ package io.dataease.datasource.service;
import com.google.gson.Gson;
import io.dataease.base.domain.*;
import io.dataease.base.mapper.*;
import io.dataease.commons.exception.DEException;
import io.dataease.datasource.dto.MysqlConfigrationDTO;
import io.dataease.datasource.provider.DatasourceProvider;
import io.dataease.datasource.provider.JdbcProvider;
import io.dataease.datasource.provider.ProviderFactory;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -25,6 +27,11 @@ public class DatasourceService {
private DatasourceMapper datasourceMapper;
public Datasource addDatasource(Datasource datasource) {
DatasourceExample example = new DatasourceExample();
example.createCriteria().andNameEqualTo(datasource.getName());
if(CollectionUtils.isNotEmpty(datasourceMapper.selectByExample(example))){
DEException.throwException("Exist data connection with the same name ");
}
long currentTimeMillis = System.currentTimeMillis();
datasource.setId(UUID.randomUUID().toString());
datasource.setUpdateTime(currentTimeMillis);
@ -43,7 +50,7 @@ public class DatasourceService {
criteria.andTypeEqualTo(request.getType());
}
example.setOrderByClause("update_time desc");
return datasourceMapper.selectByExample(example);
return datasourceMapper.selectByExampleWithBLOBs(example);
}
public void deleteDatasource(String datasourceId) {
@ -58,7 +65,7 @@ public class DatasourceService {
public void validate(Datasource datasource)throws Exception {
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType());
datasourceProvider.setDataSourceConfigration(datasource.getConfiguration());
datasourceProvider.setDatasource(datasource);
datasourceProvider.test();
}

View File

@ -1,6 +1,6 @@
package io.dataease.security;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
@ -35,7 +35,7 @@ public class UserModularRealmAuthenticator extends ModularRealmAuthenticator {
}
if (typeRealms.size() == 0) {
MSException.throwException("No realm");
DEException.throwException("No realm");
}
// 判断是单Realm还是多Realm
if (typeRealms.size() == 1) {

View File

@ -6,7 +6,7 @@ import io.dataease.base.mapper.FileMetadataMapper;
import io.dataease.base.mapper.LoadTestFileMapper;
import io.dataease.base.mapper.TestCaseFileMapper;
import io.dataease.commons.constants.FileType;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
@ -100,7 +100,7 @@ public class FileService {
try {
fileContent.setFile(file.getBytes());
} catch (IOException e) {
MSException.throwException(e);
DEException.throwException(e);
}
fileContentMapper.insert(fileContent);

View File

@ -5,7 +5,7 @@ import io.dataease.base.domain.TestResource;
import io.dataease.base.domain.TestResourceExample;
import io.dataease.base.mapper.TestResourceMapper;
import io.dataease.commons.constants.ResourceStatusEnum;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.LogUtil;
import io.dataease.dto.NodeDTO;
import io.dataease.dto.TestResourcePoolDTO;
@ -36,7 +36,7 @@ public class NodeResourcePoolService {
public boolean validate(TestResourcePoolDTO testResourcePool) {
if (CollectionUtils.isEmpty(testResourcePool.getResources())) {
MSException.throwException(Translator.get("no_nodes_message"));
DEException.throwException(Translator.get("no_nodes_message"));
}
deleteTestResource(testResourcePool.getId());
@ -48,7 +48,7 @@ public class NodeResourcePoolService {
.distinct()
.collect(Collectors.toList());
if (Ip_Port.size() < testResourcePool.getResources().size()) {
MSException.throwException(Translator.get("duplicate_node_ip_port"));
DEException.throwException(Translator.get("duplicate_node_ip_port"));
}
testResourcePool.setStatus(VALID.name());
boolean isValid = true;

View File

@ -8,7 +8,7 @@ import io.dataease.base.mapper.WorkspaceMapper;
import io.dataease.base.mapper.ext.ExtOrganizationMapper;
import io.dataease.base.mapper.ext.ExtUserRoleMapper;
import io.dataease.commons.constants.RoleConstants;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.user.SessionUser;
import io.dataease.commons.utils.SessionUtils;
import io.dataease.controller.request.OrganizationRequest;
@ -69,7 +69,7 @@ public class OrganizationService {
private void checkOrganization(Organization organization) {
if (StringUtils.isBlank(organization.getName())) {
MSException.throwException(Translator.get("organization_name_is_null"));
DEException.throwException(Translator.get("organization_name_is_null"));
}
OrganizationExample example = new OrganizationExample();
@ -80,7 +80,7 @@ public class OrganizationService {
}
if (organizationMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("organization_name_already_exists"));
DEException.throwException(Translator.get("organization_name_already_exists"));
}
}
@ -175,7 +175,7 @@ public class OrganizationService {
.map(UserRole::getSourceId)
.collect(Collectors.toList());
if (!collect.contains(organizationId)) {
MSException.throwException(Translator.get("organization_does_not_belong_to_user"));
DEException.throwException(Translator.get("organization_does_not_belong_to_user"));
}
}
}

View File

@ -4,7 +4,7 @@ import io.dataease.base.domain.UserKey;
import io.dataease.base.domain.UserKeyExample;
import io.dataease.base.mapper.UserKeyMapper;
import io.dataease.commons.constants.ApiKeyConstants;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.i18n.Translator;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.stereotype.Service;
@ -32,14 +32,14 @@ public class UserKeyService {
public UserKey generateUserKey(String userId) {
if (userService.getUserDTO(userId) == null) {
MSException.throwException(Translator.get("user_not_exist") + userId);
DEException.throwException(Translator.get("user_not_exist") + userId);
}
UserKeyExample userKeysExample = new UserKeyExample();
userKeysExample.createCriteria().andUserIdEqualTo(userId);
List<UserKey> userKeysList = userKeyMapper.selectByExample(userKeysExample);
if (!CollectionUtils.isEmpty(userKeysList) && userKeysList.size() >= 5) {
MSException.throwException(Translator.get("user_apikey_limit"));
DEException.throwException(Translator.get("user_apikey_limit"));
}
UserKey userKeys = new UserKey();

View File

@ -7,7 +7,7 @@ import io.dataease.base.mapper.ext.ExtUserRoleMapper;
import io.dataease.commons.constants.RoleConstants;
import io.dataease.commons.constants.UserSource;
import io.dataease.commons.constants.UserStatus;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.user.SessionUser;
import io.dataease.commons.utils.CodingUtil;
import io.dataease.commons.utils.CommonBeanFactory;
@ -69,7 +69,7 @@ public class UserService {
String id = user.getId();
User user1 = userMapper.selectByPrimaryKey(id);
if (user1 != null) {
MSException.throwException(Translator.get("user_id_already_exists"));
DEException.throwException(Translator.get("user_id_already_exists"));
} else {
createUser(user);
}
@ -130,15 +130,15 @@ public class UserService {
private void checkUserParam(User user) {
if (StringUtils.isBlank(user.getId())) {
MSException.throwException(Translator.get("user_id_is_null"));
DEException.throwException(Translator.get("user_id_is_null"));
}
if (StringUtils.isBlank(user.getName())) {
MSException.throwException(Translator.get("user_name_is_null"));
DEException.throwException(Translator.get("user_name_is_null"));
}
if (StringUtils.isBlank(user.getEmail())) {
MSException.throwException(Translator.get("user_email_is_null"));
DEException.throwException(Translator.get("user_email_is_null"));
}
// password
}
@ -182,7 +182,7 @@ public class UserService {
criteria.andEmailEqualTo(email);
List<User> userList = userMapper.selectByExample(userExample);
if (!CollectionUtils.isEmpty(userList)) {
MSException.throwException(Translator.get("user_email_already_exists"));
DEException.throwException(Translator.get("user_email_already_exists"));
}
}
@ -267,7 +267,7 @@ public class UserService {
public void deleteUser(String userId) {
SessionUser user = SessionUtils.getUser();
if (StringUtils.equals(user.getId(), userId)) {
MSException.throwException(Translator.get("cannot_delete_current_user"));
DEException.throwException(Translator.get("cannot_delete_current_user"));
}
UserRoleExample example = new UserRoleExample();
@ -303,7 +303,7 @@ public class UserService {
criteria.andEmailEqualTo(user.getEmail());
criteria.andIdNotEqualTo(user.getId());
if (userMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("user_email_already_exists"));
DEException.throwException(Translator.get("user_email_already_exists"));
}
user.setUpdateTime(System.currentTimeMillis());
@ -318,7 +318,7 @@ public class UserService {
criteria.andEmailEqualTo(user.getEmail());
criteria.andIdNotEqualTo(user.getId());
if (userMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("user_email_already_exists"));
DEException.throwException(Translator.get("user_email_already_exists"));
}
}
user.setPassword(null);
@ -371,7 +371,7 @@ public class UserService {
userRoleExample.createCriteria().andUserIdEqualTo(userId).andSourceIdEqualTo(request.getWorkspaceId());
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
if (userRoles.size() > 0) {
MSException.throwException(Translator.get("user_already_exists"));
DEException.throwException(Translator.get("user_already_exists"));
} else {
for (String roleId : request.getRoleIds()) {
UserRole userRole = new UserRole();
@ -410,7 +410,7 @@ public class UserService {
userRoleExample.createCriteria().andUserIdEqualTo(userId).andSourceIdEqualTo(request.getOrganizationId());
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
if (userRoles.size() > 0) {
MSException.throwException(Translator.get("user_already_exists") + ": " + userId);
DEException.throwException(Translator.get("user_already_exists") + ": " + userId);
} else {
for (String roleId : request.getRoleIds()) {
UserRole userRole = new UserRole();
@ -451,10 +451,10 @@ public class UserService {
public boolean checkUserPassword(String userId, String password) {
if (StringUtils.isBlank(userId)) {
MSException.throwException(Translator.get("user_name_is_null"));
DEException.throwException(Translator.get("user_name_is_null"));
}
if (StringUtils.isBlank(password)) {
MSException.throwException(Translator.get("password_is_null"));
DEException.throwException(Translator.get("password_is_null"));
}
UserExample example = new UserExample();
example.createCriteria().andIdEqualTo(userId).andPasswordEqualTo(CodingUtil.md5(password));
@ -511,7 +511,7 @@ public class UserService {
user.setUpdateTime(System.currentTimeMillis());
return user;
}
MSException.throwException(Translator.get("password_modification_failed"));
DEException.throwException(Translator.get("password_modification_failed"));
return null;
}

View File

@ -9,7 +9,7 @@ import io.dataease.base.mapper.ext.ExtOrganizationMapper;
import io.dataease.base.mapper.ext.ExtUserRoleMapper;
import io.dataease.base.mapper.ext.ExtWorkspaceMapper;
import io.dataease.commons.constants.RoleConstants;
import io.dataease.commons.exception.MSException;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.user.SessionUser;
import io.dataease.commons.utils.SessionUtils;
import io.dataease.controller.request.WorkspaceRequest;
@ -51,7 +51,7 @@ public class WorkspaceService {
public Workspace saveWorkspace(Workspace workspace) {
if (StringUtils.isBlank(workspace.getName())) {
MSException.throwException(Translator.get("workspace_name_is_null"));
DEException.throwException(Translator.get("workspace_name_is_null"));
}
// set organization id
String currentOrgId = SessionUtils.getCurrentOrganizationId();
@ -128,7 +128,7 @@ public class WorkspaceService {
.andOrganizationIdIn(orgIds)
.andIdEqualTo(workspaceId);
if (workspaceMapper.countByExample(example) == 0) {
MSException.throwException(Translator.get("workspace_does_not_belong_to_user"));
DEException.throwException(Translator.get("workspace_does_not_belong_to_user"));
}
}
@ -154,7 +154,7 @@ public class WorkspaceService {
.collect(Collectors.toList());
boolean contains = wsIds.contains(workspaceId);
if (size == 0 && !contains) {
MSException.throwException(Translator.get("workspace_does_not_belong_to_user"));
DEException.throwException(Translator.get("workspace_does_not_belong_to_user"));
}
}
@ -162,7 +162,7 @@ public class WorkspaceService {
WorkspaceExample example = new WorkspaceExample();
example.createCriteria().andIdEqualTo(workspaceId);
if (workspaceMapper.countByExample(example) == 0) {
MSException.throwException(Translator.get("workspace_not_exists"));
DEException.throwException(Translator.get("workspace_not_exists"));
}
}
@ -257,10 +257,10 @@ public class WorkspaceService {
private void checkWorkspace(Workspace workspace) {
if (StringUtils.isBlank(workspace.getName())) {
MSException.throwException(Translator.get("workspace_name_is_null"));
DEException.throwException(Translator.get("workspace_name_is_null"));
}
if (StringUtils.isBlank(workspace.getOrganizationId())) {
MSException.throwException(Translator.get("organization_id_is_null"));
DEException.throwException(Translator.get("organization_id_is_null"));
}
WorkspaceExample example = new WorkspaceExample();
@ -272,7 +272,7 @@ public class WorkspaceService {
}
if (workspaceMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("workspace_name_already_exists"));
DEException.throwException(Translator.get("workspace_name_already_exists"));
}
}

View File

@ -0,0 +1,48 @@
package io.dataease.service.sys;
import io.dataease.base.domain.SysDept;
import io.dataease.base.domain.SysDeptExample;
import io.dataease.base.mapper.SysDeptMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
public class DeptService {
private final static Integer DEPT_ROOT_LEVEL = 0;
@Resource
private SysDeptMapper sysDeptMapper;
public List<SysDept> root(){
SysDeptExample example = new SysDeptExample();
example.createCriteria().andLevelEqualTo(DEPT_ROOT_LEVEL);
example.setOrderByClause("dept_sort");
List<SysDept> sysDepts = sysDeptMapper.selectByExample(example);
return sysDepts;
}
public boolean add(SysDept sysDept){
if (ObjectUtils.isEmpty(sysDept.getLevel())){
sysDept.setLevel(DEPT_ROOT_LEVEL);
}
Date now = new Date();
sysDept.setCreateTime(now);
sysDept.setUpdateTime(now);
sysDept.setCreateBy(null);
sysDept.setUpdateBy(null);
try {
int insert = sysDeptMapper.insert(sysDept);
if (insert == 1){
return true;
}
}catch (Exception e){
return false;
}
return false;
}
}

View File

@ -334,5 +334,25 @@ CREATE TABLE IF NOT EXISTS `test_case_report` (
-- track end
-- dataset start
CREATE TABLE IF NOT EXISTS `dataset_group` (
`id` varchar(50) NOT NULL COMMENT 'ID',
`name` varchar(64) NOT NULL COMMENT '名称',
`pid` varchar(50) COMMENT '父级ID',
`level` int(10) COMMENT '当前分组处于第几级',
`create_by` varchar(50) COMMENT '创建人ID',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `dataset_scene` (
`id` varchar(50) NOT NULL COMMENT 'ID',
`name` varchar(64) NOT NULL COMMENT '名称',
`group_id` varchar(50) COMMENT 'DataSet Group ID',
`create_by` varchar(50) COMMENT '创建人ID',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- dataset end

View File

@ -27,7 +27,7 @@
import MsTopMenus from "./components/common/head/HeaderTopMenus";
import MsView from "./components/common/router/View";
import MsUser from "./components/common/head/HeaderUser";
import MsHeaderOrgWs from "./components/common/head/HeaderOrgWs";
// import MsHeaderOrgWs from "./components/common/head/HeaderOrgWs";
import MsLanguageSwitch from "./components/common/head/LanguageSwitch";
import {saveLocalStorage} from "@/common/js/utils";
@ -80,7 +80,7 @@ export default {
MsUser,
MsView,
MsTopMenus,
MsHeaderOrgWs,
// MsHeaderOrgWs,
"LicenseMessage": header.default
}
}

View File

@ -2,7 +2,8 @@
<div class="dialog-footer">
<el-button @click="cancel">{{$t('commons.cancel')}}</el-button>
<el-button type="primary" @click="confirm" @keydown.enter.native.prevent>{{$t('commons.confirm')}}</el-button>
<el-button type="warning" v-if="isShowValidate" @click="validate" @keydown.enter.native.prevent>{{$t('commons.validate')}}</el-button>
<el-button type="primary" :disabled="disabled" @click="confirm" @keydown.enter.native.prevent>{{$t('commons.confirm')}}</el-button>
<el-button type="primary" v-if="isShow" @click="saveAsEdit" @keydown.enter.native.prevent>{{title}}</el-button>
</div>
@ -16,12 +17,23 @@
type: Boolean,
default: false,
},
isShowValidate: {
type: Boolean,
default: false,
},
disabled: {
type: Boolean,
default: false,
},
title:String,
},
methods: {
cancel() {
this.$emit("cancel");
},
validate() {
this.$emit("validate");
},
confirm() {
this.$emit("confirm");
},

View File

@ -57,9 +57,10 @@
this.dialogVisible = true;
},
getVersion() {
this.$get('/system/version', response => {
this.version = response.data;
});
// this.$get('/system/version', response => {
// this.version = response.data;
// });
this.version = "1.0"
}
}
}

View File

@ -14,9 +14,9 @@
<el-menu-item index="/api" @click="active()" v-permission="['test_manager','test_user','test_viewer']">
{{ $t('commons.api') }}
</el-menu-item>
<el-menu-item index="/performance" onselectstart="return false"
<el-menu-item index="/dataset" onselectstart="return false"
v-permission="['test_manager','test_user','test_viewer']">
{{ $t('commons.performance') }}
{{ $t('commons.dataset') }}
</el-menu-item>
<el-menu-item index="/setting" onselectstart="return false">
{{ $t('commons.system_setting') }}

View File

@ -3,7 +3,8 @@ import VueRouter from 'vue-router'
import RouterSidebar from "./RouterSidebar";
import Setting from "@/business/components/settings/router";
import API from "@/business/components/api/router";
import Performance from "@/business/components/performance/router";
// import Performance from "@/business/components/performance/router";
import DataSet from "@/business/components/dataset/router";
import Track from "@/business/components/track/router";
Vue.use(VueRouter);
@ -19,7 +20,8 @@ const router = new VueRouter({
},
Setting,
API,
Performance,
// Performance,
DataSet,
Track,
]
});

View File

@ -0,0 +1,45 @@
<template>
<ms-container>
<ms-aside-container>
<group/>
</ms-aside-container>
<ms-main-container>
<keep-alive>
<router-view/>
</keep-alive>
</ms-main-container>
</ms-container>
</template>
<script>
import MsMainContainer from "../common/components/MsMainContainer";
import MsContainer from "../common/components/MsContainer";
import MsAsideContainer from "../common/components/MsAsideContainer";
import MsSettingMenu from "../settings/SettingMenu";
import MsCurrentUser from "../settings/CurrentUser";
import Group from "./group/Group";
export default {
name: "DataSet",
components: {MsMainContainer, MsContainer, MsAsideContainer, MsSettingMenu, MsCurrentUser, Group},
data() {
return {}
}
}
</script>
<style scoped>
.ms-aside-container {
height: calc(100vh - 40px);
padding: 20px;
min-width: 260px;
max-width: 460px;
}
.ms-main-container {
height: calc(100vh - 40px);
}
</style>

View File

@ -0,0 +1,173 @@
<template xmlns:el-col="http://www.w3.org/1999/html">
<el-col>
<span>
{{ $t('dataset.datalist') }}
</span>
<el-divider/>
<el-row>
<el-button icon="el-icon-circle-plus" type="primary" size="mini" @click="addGroup">{{$t('dataset.add_group')}}
</el-button>
<el-button icon="el-icon-document" type="primary" size="mini" @click="addScene">{{$t('dataset.add_scene')}}
</el-button>
</el-row>
<el-row style="margin: 12px 0">
<el-input
size="mini"
placeholder="Search"
prefix-icon="el-icon-search"
v-model="search"
clearable>
</el-input>
</el-row>
<el-col class="custom-tree-container">
<div class="block">
<el-tree
:data="data"
node-key="id"
:expand-on-click-node="true"
@node-click="nodeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<span v-if="data.show">
<el-button
icon="el-icon-document"
type="text"
size="mini">
</el-button>
</span>
<span>{{ data.label }}</span>
</span>
<span>
<el-button
icon="el-icon-plus"
type="text"
size="mini"
@click.stop="() => append(data)">
</el-button>
<el-button
icon="el-icon-more"
type="text"
size="mini"
@click.stop="() => remove(node, data)">
</el-button>
</span>
</span>
</el-tree>
</div>
</el-col>
</el-col>
</template>
<script>
let id = 1000;
export default {
name: "Group",
data() {
const data = [{
id: 1,
label: '一级 1',
children: [{
id: 4,
label: '二级 1-1',
children: [{
id: 9,
label: '三级 1-1-1'
}, {
id: 10,
label: '三级 1-1-2'
}]
}]
}, {
id: 2,
label: '一级 2',
children: [{
id: 5,
label: '二级 2-1'
}, {
id: 6,
label: '二级 2-2'
}]
}, {
id: 3,
label: '一级 3',
children: [{
id: 7,
label: '二级 3-1'
}, {
id: 8,
label: '二级 3-2'
}]
}];
return {
search: '',
data: JSON.parse(JSON.stringify(data))
}
},
mounted() {
},
activated() {
},
methods: {
addGroup() {
this.$message(
{
message: '添加分组',
type: 'success'
}
);
},
addScene() {
this.$message(
{
message: '添加场景',
type: 'success'
}
)
},
nodeClick(data,node){
console.log(data);
console.log(node);
},
append(data) {
const newChild = {id: id++, label: 'testtest', children: [], show: true};
if (!data.children) {
this.$set(data, 'children', []);
}
data.children.push(newChild);
},
remove(node, data) {
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex(d => d.id === data.id);
children.splice(index, 1);
},
}
}
</script>
<style scoped>
.el-divider--horizontal {
margin: 12px 0
}
.search-input {
padding: 12px 0;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
</style>

View File

@ -0,0 +1,66 @@
const DataSet = () => import('@/business/components/dataset/DataSet');
// const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome')
// const EditPerformanceTest = () => import('@/business/components/performance/test/EditPerformanceTest')
// const PerformanceTestList = () => import('@/business/components/performance/test/PerformanceTestList')
// const PerformanceTestReport = () => import('@/business/components/performance/report/PerformanceTestReport')
// const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart')
// const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView')
export default {
path: "/dataset",
name: "dataset",
// redirect: "/dataset/home",
components: {
content: DataSet
},
children: [
// {
// path: 'home',
// name: 'datasetHome',
// component: PerformanceTestHome,
// },
// {
// path: 'test/create',
// name: "createPerTest",
// component: EditPerformanceTest,
// },
// {
// path: "test/edit/:testId",
// name: "editPerTest",
// component: EditPerformanceTest,
// props: {
// content: (route) => {
// return {
// ...route.params
// }
// }
// }
// },
// {
// path: "test/:projectId",
// name: "perPlan",
// component: PerformanceTestList
// },
// {
// path: "project/:type",
// name: "perProject",
// component: MsProject
// },
// {
// path: "report/:type",
// name: "perReport",
// component: PerformanceTestReport
// },
// {
// path: "chart",
// name: "perChart",
// component: PerformanceChart
// },
// {
// path: "report/view/:reportId",
// name: "perReportView",
// component: PerformanceReportView
// }
]
}

View File

@ -10,7 +10,7 @@
</el-menu-item>
</el-submenu>
<el-submenu index="2" v-permission="['org_admin']" v-if="isCurrentOrganizationAdmin">
<!-- <el-submenu index="2" v-permission="['org_admin']" v-if="isCurrentOrganizationAdmin">
<template v-slot:title>
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
<span>{{ $t('commons.organization') }}</span>
@ -36,7 +36,7 @@
<font-awesome-icon class="icon" :icon="['fa', 'bars']" size="lg"/>
<span>{{ $t(menu.title) }}</span>
</template>
</el-menu-item>
</el-menu-item> -->
<el-submenu index="4">
<template v-slot:title>

View File

@ -22,21 +22,21 @@ export default {
component: () => import('@/business/components/settings/system/Organization'),
meta: {system: true, title: 'commons.organization'}
},
{
path: 'systemworkspace',
component: () => import('@/business/components/settings/system/SystemWorkspace'),
meta: {system: true, title: 'commons.workspace'}
},
{
path: 'testresourcepool',
component: () => import('@/business/components/settings/system/TestResourcePool'),
meta: {system: true, title: 'commons.test_resource_pool'}
},
{
path: 'systemparametersetting',
component: () => import('@/business/components/settings/system/SystemParameterSetting'),
meta: {system: true, title: 'commons.system_parameter_setting'}
},
// {
// path: 'systemworkspace',
// component: () => import('@/business/components/settings/system/SystemWorkspace'),
// meta: {system: true, title: 'commons.workspace'}
// },
// {
// path: 'testresourcepool',
// component: () => import('@/business/components/settings/system/TestResourcePool'),
// meta: {system: true, title: 'commons.test_resource_pool'}
// },
// {
// path: 'systemparametersetting',
// component: () => import('@/business/components/settings/system/SystemParameterSetting'),
// meta: {system: true, title: 'commons.system_parameter_setting'}
// },
...requireContext.keys().map(key => requireContext(key).system),
...requireContext.keys().map(key => requireContext(key).license),
{

View File

@ -9,20 +9,13 @@
<!-- system menu datasource table-->
<el-table border class="adjust-table" :data="tableData" style="width: 100%">
<el-table-column prop="name" :label="$t('commons.name')"/>
<el-table-column prop="description" :label="$t('commons.description')"/>
<el-table-column prop="desc" :label="$t('commons.description')"/>
<el-table-column prop="type" :label="$t('datasource.type')"/>
<!-- <el-table-column :label="$t('commons.member')">-->
<!-- <template v-slot:default="scope">-->
<!-- <el-link type="primary" class="member-size" @click="cellClick(scope.row)">-->
<!-- {{ scope.row.memberSize }}-->
<!-- </el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column :label="$t('commons.operating')">-->
<!-- <template v-slot:default="scope">-->
<!-- <ms-table-operator @editClick="edit(scope.row)" @deleteClick="handleDelete(scope.row)"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column :label="$t('commons.operating')">
<template v-slot:default="scope">
<ms-table-operator @editClick="edit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
:total="total"/>
@ -97,108 +90,52 @@
</el-form>
<template v-slot:footer>
<ms-dialog-footer
<ms-dialog-footer is-show-validate="true"
@cancel="dialogDatasourceAddVisible = false"
@validate="validaDatasource('createDatasource')"
@confirm="createDatasource('createDatasource')"/>
</template>
</el-dialog>
<!-- update organization form -->
<el-dialog :close-on-click-modal="false" :title="$t('organization.modify')" :visible.sync="dialogDatasourceUpdateVisible" width="30%"
<!-- update datasource form -->
<el-dialog :close-on-click-modal="false" :title="$t('datasource.modify')" :visible.sync="dialogDatasourceUpdateVisible" width="30%"
:destroy-on-close="true"
@close="closeFunc">
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
ref="updateOrganizationForm">
<el-form-item :label="$t('commons.name')" prop="name">
ref="updateDatasourceForm">
<el-form-item :label="$t('commons.name')" prop="name" :rules="[{required: true, message: this.$t('datasource.input_name'), trigger: 'blur'},
{min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}]">
<el-input v-model="form.name" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('commons.description')" prop="description">
<el-input v-model="form.description" autocomplete="off"/>
<el-form-item :label="$t('commons.description')" prop="desc" :rules="[{required: true, message: this.$t('datasource.input_desc'), trigger: 'blur'},
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'}]">
<el-input v-model="form.desc" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('datasource.data_base')" prop="configuration.dataBase" :rules="{required: true, message: $t('datasource.please_input_data_base'), trigger: 'blur'}" v-show="form.type=='mysql'">
<el-input v-model="form.configuration.dataBase" autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('datasource.user_name')" prop="configuration.username" v-show="form.type=='mysql'">
<el-input v-model="form.configuration.username" autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('datasource.password')" prop="configuration.password" :rules="{required: true, message: $t('datasource.please_input_password'), trigger: 'change'}" v-show="form.type=='mysql'">
<el-input v-model="form.configuration.password" autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('datasource.host')" prop="configuration.host" :rules="{required: true, message: $t('datasource.please_input_host'), trigger: 'change'}" v-show="form.type=='mysql'">
<el-input v-model="form.configuration.host" autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('datasource.port')" prop="configuration.port" :rules="{required: true, message: $t('datasource.please_input_port'), trigger: 'change'}" v-show="form.type=='mysql'">
<el-input v-model="form.configuration.port" autocomplete="off" />
</el-form-item>
</el-form>
<template v-slot:footer>
<ms-dialog-footer
<ms-dialog-footer is-show-validate="true"
@cancel="dialogDatasourceUpdateVisible = false"
@confirm="updateOrganization('updateOrganizationForm')"/>
@validate="validaDatasource('updateDatasourceForm')"
@confirm="updateDatasource('updateDatasourceForm')"/>
</template>
</el-dialog>
<!-- add organization member form -->
<el-dialog :close-on-click-modal="false" :title="$t('member.create')" :visible.sync="dialogDatasourceMemberAddVisible" width="30%"
:destroy-on-close="true"
@close="closeFunc">
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px"
size="small">
<el-form-item :label="$t('commons.member')" prop="userIds">
<el-select filterable v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
class="select-width" :filter-method="dataFilter">
<el-option
v-for="item in memberForm.userList"
:key="item.id"
:label="item.name"
:value="item.id">
<span class="org-member-id">{{ item.id }}</span>
<span class="org-member-email">{{ item.email }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds">
<el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width">
<el-option
v-for="item in memberForm.roles"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<template v-slot:footer>
<ms-dialog-footer
@cancel="dialogDatasourceMemberAddVisible = false"
@confirm="submitForm('form')"/>
</template>
</el-dialog>
<!-- update organization member form -->
<el-dialog :close-on-click-modal="false" :title="$t('member.modify')" :visible.sync="dialogDatasourceMemberUpdateVisible" width="30%"
:destroy-on-close="true"
@close="closeFunc">
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
<el-form-item label="ID" prop="id">
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
</el-form-item>
<el-form-item :label="$t('commons.username')" prop="name">
<el-input v-model="memberForm.name" autocomplete="off" :disabled="true"/>
</el-form-item>
<el-form-item :label="$t('commons.email')" prop="email">
<el-input v-model="memberForm.email" autocomplete="off" :disabled="true"/>
</el-form-item>
<el-form-item :label="$t('commons.phone')" prop="phone">
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
</el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds"
:rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
<el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width">
<el-option
v-for="item in memberForm.allroles"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<template v-slot:footer>
<ms-dialog-footer
@cancel="dialogDatasourceMemberUpdateVisible = false"
@confirm="updateOrgMember('updateUserForm')"/>
</template>
</el-dialog>
<ms-delete-confirm :title="$t('organization.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
<ms-delete-confirm :title="$t('datasource.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
</div>
</template>
@ -212,7 +149,6 @@
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
import MsDialogFooter from "../../common/components/MsDialogFooter";
import {
getCurrentOrganizationId,
getCurrentUser,
listenGoBack,
refreshSessionAndCookies,
@ -222,7 +158,7 @@
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
export default {
name: "DeDatasource",
name: "DEDatasource",
components: {
MsDeleteConfirm,
MsCreateBox,
@ -239,6 +175,7 @@
deletePath: '/datasource/delete/',
createPath: '/datasource/add',
updatePath: '/datasource/update',
validatePath: '/datasource/validate',
result: {},
dialogDatasourceAddVisible: false,
dialogDatasourceUpdateVisible: false,
@ -288,17 +225,6 @@
this.dialogDatasourceAddVisible = true;
listenGoBack(this.closeFunc);
},
addMember() {
this.dialogDatasourceMemberAddVisible = true;
this.memberForm = {};
this.result = this.$get('/user/list/', response => {
this.$set(this.memberForm, "userList", response.data);
this.$set(this.memberForm, "copyUserList", response.data);
});
this.result = this.$get('/role/list/org', response => {
this.$set(this.memberForm, "roles", response.data);
})
},
dataFilter(val) {
if (val) {
this.memberForm.userList = this.memberForm.copyUserList.filter((item) => {
@ -313,17 +239,7 @@
edit(row) {
this.dialogDatasourceUpdateVisible = true;
this.form = Object.assign({}, row);
listenGoBack(this.closeFunc);
},
editMember(row) {
this.dialogDatasourceMemberUpdateVisible = true;
this.memberForm = Object.assign({}, row);
let roleIds = this.memberForm.roles.map(r => r.id);
this.result = this.$get('/role/list/org', response => {
this.$set(this.memberForm, "allroles", response.data);
})
//
this.$set(this.memberForm, 'roleIds', roleIds);
this.form.configuration = JSON.parse(this.form.configuration);
listenGoBack(this.closeFunc);
},
cellClick(row) {
@ -368,21 +284,16 @@
this.dialogTotal = data.itemCount;
});
},
handleDelete(organization) {
this.$refs.deleteConfirm.open(organization);
handleDelete(datasource) {
this.$refs.deleteConfirm.open(datasource);
},
_handleDelete(organization) {
this.$confirm(this.$t('organization.delete_confirm'), '', {
_handleDelete(datasource) {
this.$confirm(this.$t('datasource.delete_confirm'), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
this.result = this.$get(this.deletePath + organization.id, () => {
let lastOrganizationId = getCurrentOrganizationId();
let sourceId = organization.id;
if (lastOrganizationId === sourceId) {
refreshSessionAndCookies(DEFAULT, sourceId);
}
this.result = this.$get(this.deletePath + datasource.id, () => {
this.$success(this.$t('commons.delete_success'));
this.initTableData();
});
@ -393,46 +304,25 @@
});
});
},
delMember(row) {
this.$confirm(this.$t('member.remove_member'), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
this.result = this.$get('/user/special/org/member/delete/' + this.currentRow.id + '/' + encodeURIComponent(row.id), () => {
let sourceId = this.currentRow.id;
let currentUser = getCurrentUser();
let userId = row.id;
if (currentUser.id === userId) {
refreshSessionAndCookies(ORGANIZATION, sourceId);
}
this.$success(this.$t('commons.remove_success'))
this.cellClick(this.currentRow);
});
}).catch(() => {
this.$info(this.$t('commons.remove_cancel'));
});
},
createDatasource(createDatasourceForm) {
this.$refs[createDatasourceForm].validate(valid => {
if (valid) {
this.form.configuration = JSON.stringify(this.form.configuration);
this.result = this.$post(this.createPath, this.form, () => {
console.log('aaaaa');
this.$success(this.$t('commons.save_success'));
this.initTableData();
this.dialogDatasourceAddVisible = false;
}, ()=>{ console.log('bbbb');});
console.log(this.result);
this.dialogDatasourceAddVisible = false;
} else {
return false;
}
})
},
updateOrganization(updateOrganizationForm) {
this.$refs[updateOrganizationForm].validate(valid => {
updateDatasource(updateDatasourceForm) {
this.$refs[updateDatasourceForm].validate(valid => {
if (valid) {
this.form.configuration = JSON.stringify(this.form.configuration);
this.result = this.$post(this.updatePath, this.form, () => {
this.$success(this.$t('commons.modify_success'));
this.dialogDatasourceUpdateVisible = false;
@ -443,6 +333,19 @@
}
})
},
validaDatasource(datasourceForm) {
this.$refs[datasourceForm].validate(valid => {
if (valid) {
let data = JSON.parse(JSON.stringify(this.form));
data.configuration = JSON.stringify(data.configuration);
this.result = this.$post(this.validatePath, data, () => {
this.$success(this.$t('datasource.validate_success'));
});
} else {
return false;
}
})
},
initTableData() {
this.result = this.$post(this.queryPath + "/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
let data = response.data;
@ -464,45 +367,6 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let param = {
userIds: this.memberForm.userIds,
roleIds: this.memberForm.roleIds,
organizationId: this.currentRow.id
};
this.result = this.$post("user/special/org/member/add", param, () => {
let sign = "other";
let sourceId = this.currentRow.id;
refreshSessionAndCookies(sign, sourceId);
this.cellClick(this.currentRow);
this.dialogDatasourceMemberAddVisible = false;
})
} else {
return false;
}
});
},
updateOrgMember(formName) {
let param = {
id: this.memberForm.id,
name: this.memberForm.name,
email: this.memberForm.email,
phone: this.memberForm.phone,
roleIds: this.memberForm.roleIds,
organizationId: this.currentRow.id
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.result = this.$post("/organization/member/update", param, () => {
this.$success(this.$t('commons.modify_success'));
this.dialogDatasourceMemberUpdateVisible = false;
this.cellClick(this.currentRow);
});
}
});
},
}
}

View File

@ -60,7 +60,7 @@ export default {
test_resource_pool: 'Resource Pool',
system_setting: 'Settings',
api: 'API',
performance: 'Performance',
dataset: 'DataSet',
functional: 'Functional test',
input_content: 'Please enter content',
create: 'Create',
@ -1518,5 +1518,10 @@ export default {
delete_prompt: 'This operation will delete the authentication source, do you want to continue? ',
title: 'Auth Source',
auth_name_valid: 'Name does not support special characters',
},
dataset:{
datalist:'Data List',
add_group:'Add Group',
add_scene:'Add Scene'
}
};

View File

@ -61,7 +61,7 @@ export default {
test_resource_pool: '測試資源池',
system_setting: '系統設置',
api: '接口測試',
performance: '性能測試',
dataset: '數據',
functional: '功能測試',
input_content: '請輸入內容',
create: '新建',
@ -1519,5 +1519,10 @@ export default {
delete_prompt: '此操作會刪除認證源,是否繼續? ',
title: '認證設置',
auth_name_valid: '名稱不支持特殊字符',
},
dataset:{
datalist:'數據列表',
add_group:'添加分組',
add_scene:'添加場景'
}
};