feat(数据集): 数据集 定时任务

This commit is contained in:
junjie 2021-03-04 15:38:37 +08:00
parent 7254b65bd9
commit 3de8579e11
22 changed files with 2779 additions and 76 deletions

View File

@ -0,0 +1,29 @@
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetTableTask implements Serializable {
private String id;
private String tableId;
private String name;
private String type;
private Long startTime;
private String rate;
private String cron;
private String end;
private Long endTime;
private Long createTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,870 @@
package io.dataease.base.domain;
import java.util.ArrayList;
import java.util.List;
public class DatasetTableTaskExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DatasetTableTaskExample() {
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 andTableIdIsNull() {
addCriterion("table_id is null");
return (Criteria) this;
}
public Criteria andTableIdIsNotNull() {
addCriterion("table_id is not null");
return (Criteria) this;
}
public Criteria andTableIdEqualTo(String value) {
addCriterion("table_id =", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotEqualTo(String value) {
addCriterion("table_id <>", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdGreaterThan(String value) {
addCriterion("table_id >", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdGreaterThanOrEqualTo(String value) {
addCriterion("table_id >=", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLessThan(String value) {
addCriterion("table_id <", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLessThanOrEqualTo(String value) {
addCriterion("table_id <=", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLike(String value) {
addCriterion("table_id like", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotLike(String value) {
addCriterion("table_id not like", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdIn(List<String> values) {
addCriterion("table_id in", values, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotIn(List<String> values) {
addCriterion("table_id not in", values, "tableId");
return (Criteria) this;
}
public Criteria andTableIdBetween(String value1, String value2) {
addCriterion("table_id between", value1, value2, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotBetween(String value1, String value2) {
addCriterion("table_id not between", value1, value2, "tableId");
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 andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(String value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(String value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(String value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(String value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(String value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(String value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLike(String value) {
addCriterion("`type` like", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotLike(String value) {
addCriterion("`type` not like", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<String> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<String> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(String value1, String value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(String value1, String value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;
}
public Criteria andStartTimeIsNotNull() {
addCriterion("start_time is not null");
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(Long value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(Long value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(Long value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(Long value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(Long value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(Long value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<Long> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Long> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(Long value1, Long value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(Long value1, Long value2) {
addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andRateIsNull() {
addCriterion("rate is null");
return (Criteria) this;
}
public Criteria andRateIsNotNull() {
addCriterion("rate is not null");
return (Criteria) this;
}
public Criteria andRateEqualTo(String value) {
addCriterion("rate =", value, "rate");
return (Criteria) this;
}
public Criteria andRateNotEqualTo(String value) {
addCriterion("rate <>", value, "rate");
return (Criteria) this;
}
public Criteria andRateGreaterThan(String value) {
addCriterion("rate >", value, "rate");
return (Criteria) this;
}
public Criteria andRateGreaterThanOrEqualTo(String value) {
addCriterion("rate >=", value, "rate");
return (Criteria) this;
}
public Criteria andRateLessThan(String value) {
addCriterion("rate <", value, "rate");
return (Criteria) this;
}
public Criteria andRateLessThanOrEqualTo(String value) {
addCriterion("rate <=", value, "rate");
return (Criteria) this;
}
public Criteria andRateLike(String value) {
addCriterion("rate like", value, "rate");
return (Criteria) this;
}
public Criteria andRateNotLike(String value) {
addCriterion("rate not like", value, "rate");
return (Criteria) this;
}
public Criteria andRateIn(List<String> values) {
addCriterion("rate in", values, "rate");
return (Criteria) this;
}
public Criteria andRateNotIn(List<String> values) {
addCriterion("rate not in", values, "rate");
return (Criteria) this;
}
public Criteria andRateBetween(String value1, String value2) {
addCriterion("rate between", value1, value2, "rate");
return (Criteria) this;
}
public Criteria andRateNotBetween(String value1, String value2) {
addCriterion("rate not between", value1, value2, "rate");
return (Criteria) this;
}
public Criteria andCronIsNull() {
addCriterion("cron is null");
return (Criteria) this;
}
public Criteria andCronIsNotNull() {
addCriterion("cron is not null");
return (Criteria) this;
}
public Criteria andCronEqualTo(String value) {
addCriterion("cron =", value, "cron");
return (Criteria) this;
}
public Criteria andCronNotEqualTo(String value) {
addCriterion("cron <>", value, "cron");
return (Criteria) this;
}
public Criteria andCronGreaterThan(String value) {
addCriterion("cron >", value, "cron");
return (Criteria) this;
}
public Criteria andCronGreaterThanOrEqualTo(String value) {
addCriterion("cron >=", value, "cron");
return (Criteria) this;
}
public Criteria andCronLessThan(String value) {
addCriterion("cron <", value, "cron");
return (Criteria) this;
}
public Criteria andCronLessThanOrEqualTo(String value) {
addCriterion("cron <=", value, "cron");
return (Criteria) this;
}
public Criteria andCronLike(String value) {
addCriterion("cron like", value, "cron");
return (Criteria) this;
}
public Criteria andCronNotLike(String value) {
addCriterion("cron not like", value, "cron");
return (Criteria) this;
}
public Criteria andCronIn(List<String> values) {
addCriterion("cron in", values, "cron");
return (Criteria) this;
}
public Criteria andCronNotIn(List<String> values) {
addCriterion("cron not in", values, "cron");
return (Criteria) this;
}
public Criteria andCronBetween(String value1, String value2) {
addCriterion("cron between", value1, value2, "cron");
return (Criteria) this;
}
public Criteria andCronNotBetween(String value1, String value2) {
addCriterion("cron not between", value1, value2, "cron");
return (Criteria) this;
}
public Criteria andEndIsNull() {
addCriterion("`end` is null");
return (Criteria) this;
}
public Criteria andEndIsNotNull() {
addCriterion("`end` is not null");
return (Criteria) this;
}
public Criteria andEndEqualTo(String value) {
addCriterion("`end` =", value, "end");
return (Criteria) this;
}
public Criteria andEndNotEqualTo(String value) {
addCriterion("`end` <>", value, "end");
return (Criteria) this;
}
public Criteria andEndGreaterThan(String value) {
addCriterion("`end` >", value, "end");
return (Criteria) this;
}
public Criteria andEndGreaterThanOrEqualTo(String value) {
addCriterion("`end` >=", value, "end");
return (Criteria) this;
}
public Criteria andEndLessThan(String value) {
addCriterion("`end` <", value, "end");
return (Criteria) this;
}
public Criteria andEndLessThanOrEqualTo(String value) {
addCriterion("`end` <=", value, "end");
return (Criteria) this;
}
public Criteria andEndLike(String value) {
addCriterion("`end` like", value, "end");
return (Criteria) this;
}
public Criteria andEndNotLike(String value) {
addCriterion("`end` not like", value, "end");
return (Criteria) this;
}
public Criteria andEndIn(List<String> values) {
addCriterion("`end` in", values, "end");
return (Criteria) this;
}
public Criteria andEndNotIn(List<String> values) {
addCriterion("`end` not in", values, "end");
return (Criteria) this;
}
public Criteria andEndBetween(String value1, String value2) {
addCriterion("`end` between", value1, value2, "end");
return (Criteria) this;
}
public Criteria andEndNotBetween(String value1, String value2) {
addCriterion("`end` not between", value1, value2, "end");
return (Criteria) this;
}
public Criteria andEndTimeIsNull() {
addCriterion("end_time is null");
return (Criteria) this;
}
public Criteria andEndTimeIsNotNull() {
addCriterion("end_time is not null");
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(Long value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(Long value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(Long value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(Long value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(Long value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(Long value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<Long> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Long> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(Long value1, Long value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(Long value1, Long value2) {
addCriterion("end_time not between", value1, value2, "endTime");
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,25 @@
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetTableTaskLog implements Serializable {
private String id;
private String tableId;
private String taskId;
private Long startTime;
private Long endTime;
private String status;
private String info;
private Long createTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,730 @@
package io.dataease.base.domain;
import java.util.ArrayList;
import java.util.List;
public class DatasetTableTaskLogExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DatasetTableTaskLogExample() {
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 andTableIdIsNull() {
addCriterion("table_id is null");
return (Criteria) this;
}
public Criteria andTableIdIsNotNull() {
addCriterion("table_id is not null");
return (Criteria) this;
}
public Criteria andTableIdEqualTo(String value) {
addCriterion("table_id =", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotEqualTo(String value) {
addCriterion("table_id <>", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdGreaterThan(String value) {
addCriterion("table_id >", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdGreaterThanOrEqualTo(String value) {
addCriterion("table_id >=", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLessThan(String value) {
addCriterion("table_id <", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLessThanOrEqualTo(String value) {
addCriterion("table_id <=", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdLike(String value) {
addCriterion("table_id like", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotLike(String value) {
addCriterion("table_id not like", value, "tableId");
return (Criteria) this;
}
public Criteria andTableIdIn(List<String> values) {
addCriterion("table_id in", values, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotIn(List<String> values) {
addCriterion("table_id not in", values, "tableId");
return (Criteria) this;
}
public Criteria andTableIdBetween(String value1, String value2) {
addCriterion("table_id between", value1, value2, "tableId");
return (Criteria) this;
}
public Criteria andTableIdNotBetween(String value1, String value2) {
addCriterion("table_id not between", value1, value2, "tableId");
return (Criteria) this;
}
public Criteria andTaskIdIsNull() {
addCriterion("task_id is null");
return (Criteria) this;
}
public Criteria andTaskIdIsNotNull() {
addCriterion("task_id is not null");
return (Criteria) this;
}
public Criteria andTaskIdEqualTo(String value) {
addCriterion("task_id =", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdNotEqualTo(String value) {
addCriterion("task_id <>", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdGreaterThan(String value) {
addCriterion("task_id >", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdGreaterThanOrEqualTo(String value) {
addCriterion("task_id >=", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdLessThan(String value) {
addCriterion("task_id <", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdLessThanOrEqualTo(String value) {
addCriterion("task_id <=", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdLike(String value) {
addCriterion("task_id like", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdNotLike(String value) {
addCriterion("task_id not like", value, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdIn(List<String> values) {
addCriterion("task_id in", values, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdNotIn(List<String> values) {
addCriterion("task_id not in", values, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdBetween(String value1, String value2) {
addCriterion("task_id between", value1, value2, "taskId");
return (Criteria) this;
}
public Criteria andTaskIdNotBetween(String value1, String value2) {
addCriterion("task_id not between", value1, value2, "taskId");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;
}
public Criteria andStartTimeIsNotNull() {
addCriterion("start_time is not null");
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(Long value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(Long value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(Long value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(Long value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(Long value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(Long value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<Long> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Long> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(Long value1, Long value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(Long value1, Long value2) {
addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andEndTimeIsNull() {
addCriterion("end_time is null");
return (Criteria) this;
}
public Criteria andEndTimeIsNotNull() {
addCriterion("end_time is not null");
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(Long value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(Long value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(Long value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(Long value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(Long value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(Long value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<Long> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Long> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(Long value1, Long value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(Long value1, Long value2) {
addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(String value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(String value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(String value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(String value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(String value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(String value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLike(String value) {
addCriterion("`status` like", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotLike(String value) {
addCriterion("`status` not like", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<String> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<String> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(String value1, String value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(String value1, String value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andInfoIsNull() {
addCriterion("info is null");
return (Criteria) this;
}
public Criteria andInfoIsNotNull() {
addCriterion("info is not null");
return (Criteria) this;
}
public Criteria andInfoEqualTo(String value) {
addCriterion("info =", value, "info");
return (Criteria) this;
}
public Criteria andInfoNotEqualTo(String value) {
addCriterion("info <>", value, "info");
return (Criteria) this;
}
public Criteria andInfoGreaterThan(String value) {
addCriterion("info >", value, "info");
return (Criteria) this;
}
public Criteria andInfoGreaterThanOrEqualTo(String value) {
addCriterion("info >=", value, "info");
return (Criteria) this;
}
public Criteria andInfoLessThan(String value) {
addCriterion("info <", value, "info");
return (Criteria) this;
}
public Criteria andInfoLessThanOrEqualTo(String value) {
addCriterion("info <=", value, "info");
return (Criteria) this;
}
public Criteria andInfoLike(String value) {
addCriterion("info like", value, "info");
return (Criteria) this;
}
public Criteria andInfoNotLike(String value) {
addCriterion("info not like", value, "info");
return (Criteria) this;
}
public Criteria andInfoIn(List<String> values) {
addCriterion("info in", values, "info");
return (Criteria) this;
}
public Criteria andInfoNotIn(List<String> values) {
addCriterion("info not in", values, "info");
return (Criteria) this;
}
public Criteria andInfoBetween(String value1, String value2) {
addCriterion("info between", value1, value2, "info");
return (Criteria) this;
}
public Criteria andInfoNotBetween(String value1, String value2) {
addCriterion("info not between", value1, value2, "info");
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,30 @@
package io.dataease.base.mapper;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.base.domain.DatasetTableTaskLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetTableTaskLogMapper {
long countByExample(DatasetTableTaskLogExample example);
int deleteByExample(DatasetTableTaskLogExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetTableTaskLog record);
int insertSelective(DatasetTableTaskLog record);
List<DatasetTableTaskLog> selectByExample(DatasetTableTaskLogExample example);
DatasetTableTaskLog selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetTableTaskLog record, @Param("example") DatasetTableTaskLogExample example);
int updateByExample(@Param("record") DatasetTableTaskLog record, @Param("example") DatasetTableTaskLogExample example);
int updateByPrimaryKeySelective(DatasetTableTaskLog record);
int updateByPrimaryKey(DatasetTableTaskLog record);
}

View File

@ -0,0 +1,258 @@
<?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.DatasetTableTaskLogMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetTableTaskLog">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
<result column="task_id" jdbcType="VARCHAR" property="taskId" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="info" jdbcType="VARCHAR" property="info" />
<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, table_id, task_id, start_time, end_time, `status`, info, create_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dataset_table_task_log
<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_table_task_log
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dataset_table_task_log
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample">
delete from dataset_table_task_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
insert into dataset_table_task_log (id, table_id, task_id,
start_time, end_time, `status`,
info, create_time)
values (#{id,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR},
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
#{info,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
insert into dataset_table_task_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="tableId != null">
table_id,
</if>
<if test="taskId != null">
task_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="status != null">
`status`,
</if>
<if test="info != null">
info,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
<if test="taskId != null">
#{taskId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="info != null">
#{info,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample" resultType="java.lang.Long">
select count(*) from dataset_table_task_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update dataset_table_task_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.tableId != null">
table_id = #{record.tableId,jdbcType=VARCHAR},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=VARCHAR},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=BIGINT},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.info != null">
info = #{record.info,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_table_task_log
set id = #{record.id,jdbcType=VARCHAR},
table_id = #{record.tableId,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
`status` = #{record.status,jdbcType=VARCHAR},
info = #{record.info,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.DatasetTableTaskLog">
update dataset_table_task_log
<set>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
<if test="taskId != null">
task_id = #{taskId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="info != null">
info = #{info,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.DatasetTableTaskLog">
update dataset_table_task_log
set table_id = #{tableId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
`status` = #{status,jdbcType=VARCHAR},
info = #{info,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.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetTableTaskMapper {
long countByExample(DatasetTableTaskExample example);
int deleteByExample(DatasetTableTaskExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetTableTask record);
int insertSelective(DatasetTableTask record);
List<DatasetTableTask> selectByExample(DatasetTableTaskExample example);
DatasetTableTask selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetTableTask record, @Param("example") DatasetTableTaskExample example);
int updateByExample(@Param("record") DatasetTableTask record, @Param("example") DatasetTableTaskExample example);
int updateByPrimaryKeySelective(DatasetTableTask record);
int updateByPrimaryKey(DatasetTableTask record);
}

View File

@ -0,0 +1,290 @@
<?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.DatasetTableTaskMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetTableTask">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="rate" jdbcType="VARCHAR" property="rate" />
<result column="cron" jdbcType="VARCHAR" property="cron" />
<result column="end" jdbcType="VARCHAR" property="end" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<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, table_id, `name`, `type`, start_time, rate, cron, `end`, end_time, create_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetTableTaskExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dataset_table_task
<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_table_task
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dataset_table_task
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetTableTaskExample">
delete from dataset_table_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetTableTask">
insert into dataset_table_task (id, table_id, `name`,
`type`, start_time, rate,
cron, `end`, end_time,
create_time)
values (#{id,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{rate,jdbcType=VARCHAR},
#{cron,jdbcType=VARCHAR}, #{end,jdbcType=VARCHAR}, #{endTime,jdbcType=BIGINT},
#{createTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetTableTask">
insert into dataset_table_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="tableId != null">
table_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="type != null">
`type`,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="rate != null">
rate,
</if>
<if test="cron != null">
cron,
</if>
<if test="end != null">
`end`,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=BIGINT},
</if>
<if test="rate != null">
#{rate,jdbcType=VARCHAR},
</if>
<if test="cron != null">
#{cron,jdbcType=VARCHAR},
</if>
<if test="end != null">
#{end,jdbcType=VARCHAR},
</if>
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetTableTaskExample" resultType="java.lang.Long">
select count(*) from dataset_table_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update dataset_table_task
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.tableId != null">
table_id = #{record.tableId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=BIGINT},
</if>
<if test="record.rate != null">
rate = #{record.rate,jdbcType=VARCHAR},
</if>
<if test="record.cron != null">
cron = #{record.cron,jdbcType=VARCHAR},
</if>
<if test="record.end != null">
`end` = #{record.end,jdbcType=VARCHAR},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</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_table_task
set id = #{record.id,jdbcType=VARCHAR},
table_id = #{record.tableId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=BIGINT},
rate = #{record.rate,jdbcType=VARCHAR},
cron = #{record.cron,jdbcType=VARCHAR},
`end` = #{record.end,jdbcType=VARCHAR},
end_time = #{record.endTime,jdbcType=BIGINT},
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.DatasetTableTask">
update dataset_table_task
<set>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=BIGINT},
</if>
<if test="rate != null">
rate = #{rate,jdbcType=VARCHAR},
</if>
<if test="cron != null">
cron = #{cron,jdbcType=VARCHAR},
</if>
<if test="end != null">
`end` = #{end,jdbcType=VARCHAR},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</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.DatasetTableTask">
update dataset_table_task
set table_id = #{tableId,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=BIGINT},
rate = #{rate,jdbcType=VARCHAR},
cron = #{cron,jdbcType=VARCHAR},
`end` = #{end,jdbcType=VARCHAR},
end_time = #{endTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,34 @@
package io.dataease.controller.dataset;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.service.dataset.DataSetTableTaskService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author gin
* @Date 2021/3/4 1:32 下午
*/
@RestController
@RequestMapping("dataset/task")
public class DataSetTableTaskController {
@Resource
private DataSetTableTaskService dataSetTableTaskService;
@PostMapping("save")
public DatasetTableTask save(@RequestBody DatasetTableTask datasetTableTask) {
return dataSetTableTaskService.save(datasetTableTask);
}
@PostMapping("delete/{id}")
public void delete(@PathVariable String id) {
dataSetTableTaskService.delete(id);
}
@PostMapping("list")
public List<DatasetTableTask> list(@RequestBody DatasetTableTask datasetTableTask) {
return dataSetTableTaskService.list(datasetTableTask);
}
}

View File

@ -0,0 +1,29 @@
package io.dataease.controller.dataset;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.service.dataset.DataSetTableTaskLogService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author gin
* @Date 2021/3/4 1:32 下午
*/
@RestController
@RequestMapping("dataset/taskLog")
public class DataSetTableTaskLogController {
@Resource
private DataSetTableTaskLogService dataSetTableTaskLogService;
@PostMapping("save")
public DatasetTableTaskLog save(@RequestBody DatasetTableTaskLog datasetTableTaskLog) {
return dataSetTableTaskLogService.save(datasetTableTaskLog);
}
@PostMapping("delete/{id}")
public void delete(@PathVariable String id) {
dataSetTableTaskLogService.delete(id);
}
}

View File

@ -0,0 +1,36 @@
package io.dataease.service.dataset;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.base.mapper.DatasetTableTaskLogMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.UUID;
/**
* @Author gin
* @Date 2021/3/4 1:26 下午
*/
@Service
public class DataSetTableTaskLogService {
@Resource
private DatasetTableTaskLogMapper datasetTableTaskLogMapper;
public DatasetTableTaskLog save(DatasetTableTaskLog datasetTableTaskLog) {
if (StringUtils.isEmpty(datasetTableTaskLog.getId())) {
datasetTableTaskLog.setId(UUID.randomUUID().toString());
datasetTableTaskLog.setCreateTime(System.currentTimeMillis());
datasetTableTaskLogMapper.insert(datasetTableTaskLog);
} else {
datasetTableTaskLogMapper.updateByPrimaryKey(datasetTableTaskLog);
}
return datasetTableTaskLog;
}
public void delete(String id) {
datasetTableTaskLogMapper.deleteByPrimaryKey(id);
}
}

View File

@ -0,0 +1,46 @@
package io.dataease.service.dataset;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskExample;
import io.dataease.base.mapper.DatasetTableTaskMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;
/**
* @Author gin
* @Date 2021/3/4 1:26 下午
*/
@Service
public class DataSetTableTaskService {
@Resource
private DatasetTableTaskMapper datasetTableTaskMapper;
public DatasetTableTask save(DatasetTableTask datasetTableTask) {
if (StringUtils.isEmpty(datasetTableTask.getId())) {
datasetTableTask.setId(UUID.randomUUID().toString());
datasetTableTask.setCreateTime(System.currentTimeMillis());
datasetTableTaskMapper.insert(datasetTableTask);
} else {
datasetTableTaskMapper.updateByPrimaryKey(datasetTableTask);
}
return datasetTableTask;
}
public void delete(String id) {
datasetTableTaskMapper.deleteByPrimaryKey(id);
}
public List<DatasetTableTask> list(DatasetTableTask datasetTableTask) {
DatasetTableTaskExample datasetTableTaskExample = new DatasetTableTaskExample();
DatasetTableTaskExample.Criteria criteria = datasetTableTaskExample.createCriteria();
if (StringUtils.isNotEmpty(datasetTableTask.getTableId())) {
criteria.andTableIdEqualTo(datasetTableTask.getTableId());
}
datasetTableTaskExample.setOrderByClause("create_time desc,name asc");
return datasetTableTaskMapper.selectByExample(datasetTableTaskExample);
}
}

View File

@ -32,3 +32,36 @@ CREATE TABLE IF NOT EXISTS `dataset_table_field`
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
DROP TABLE IF EXISTS `dataset_table_task`;
CREATE TABLE IF NOT EXISTS `dataset_table_task`
(
`id` varchar(50) NOT NULL COMMENT 'ID',
`table_id` varchar(50) NOT NULL COMMENT '表ID',
`name` varchar(255) NOT NULL COMMENT '任务名称',
`type` varchar(50) NOT NULL COMMENT '更新方式0-全量更新 1-增量更新',
`start_time` bigint(13) COMMENT '开始时间',
`rate` varchar(50) NOT NULL COMMENT '执行频率',
`cron` varchar(255) COMMENT 'cron表达式',
`end` varchar(50) NOT NULL COMMENT '结束限制',
`end_time` bigint(13) COMMENT '结束时间',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `IDX_TABLE_ID` (`table_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
DROP TABLE IF EXISTS `dataset_table_task_log`;
CREATE TABLE IF NOT EXISTS `dataset_table_task_log`
(
`id` varchar(50) NOT NULL COMMENT 'ID',
`table_id` varchar(50) NOT NULL COMMENT '表ID',
`task_id` varchar(50) NOT NULL COMMENT '任务ID',
`start_time` bigint(13) COMMENT '开始时间',
`end_time` bigint(13) COMMENT '结束时间',
`status` varchar(50) NOT NULL COMMENT '执行状态',
`info` varchar(255) COMMENT '执行内容',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `IDX_TABLE_ID` (`task_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;

View File

@ -4,6 +4,7 @@ export function post(url, data) {
return request({
url: url,
method: 'post',
loading: true,
data
})
}

View File

@ -4,6 +4,7 @@ export function loadTable(data) {
return request({
url: '/dataset/table/list',
method: 'post',
loading: true,
data
})
}
@ -11,6 +12,7 @@ export function loadTable(data) {
export function getScene(sceneId) {
return request({
url: '/dataset/group/getScene/' + sceneId,
loading: true,
method: 'post'
})
}
@ -19,6 +21,7 @@ export function addGroup(data) {
return request({
url: '/dataset/group/save',
method: 'post',
loading: true,
data
})
}
@ -26,6 +29,7 @@ export function addGroup(data) {
export function delGroup(groupId) {
return request({
url: '/dataset/group/delete/' + groupId,
loading: true,
method: 'post'
})
}
@ -34,6 +38,7 @@ export function addTable(data) {
return request({
url: '/dataset/table/update',
method: 'post',
loading: true,
data
})
}
@ -41,6 +46,7 @@ export function addTable(data) {
export function delTable(tableId) {
return request({
url: '/dataset/table/delete/' + tableId,
loading: true,
method: 'post'
})
}
@ -49,6 +55,7 @@ export function groupTree(data) {
return request({
url: '/dataset/group/tree',
method: 'post',
loading: true,
data
})
}
@ -56,6 +63,7 @@ export function groupTree(data) {
export function listDatasource() {
return request({
url: '/datasource/list',
loading: true,
method: 'get'
})
}
@ -63,6 +71,7 @@ export function listDatasource() {
export function getTable(id) {
return request({
url: '/dataset/table/get/' + id,
loading: true,
method: 'post'
})
}
@ -71,6 +80,7 @@ export function getPreviewData(data) {
return request({
url: '/dataset/table/getPreviewData',
method: 'post',
loading: true,
data
})
}
@ -78,6 +88,7 @@ export function getPreviewData(data) {
export function fieldList(id) {
return request({
url: '/dataset/field/list/' + id,
loading: true,
method: 'post'
})
}
@ -86,6 +97,7 @@ export function batchEdit(data) {
return request({
url: '/dataset/field/batchEdit',
method: 'post',
loading: true,
data
})
}
@ -94,6 +106,7 @@ export function post(url, data) {
return request({
url: url,
method: 'post',
loading: true,
data
})
}

View File

@ -609,7 +609,26 @@ export default {
sync_data: '定时同步',
update_setting: '更新设置',
sync_now: '立即更新',
add_task: '添加任务'
add_task: '添加任务',
task_name: '任务名称',
start_time: '开始时间',
end_time: '结束时间',
status: '状态',
task_update: '定时更新',
update_type: '更新方式',
all_scope: '全量更新',
add_scope: '增量更新',
select_data_time: '选择日期时间',
execute_rate: '执行频率',
execute_once: '只执行一次',
cron_config: '表达式设定',
no_limit: '无限制',
set_end_time: '设定结束时间',
operate: '操作',
save_success: '保存成功',
close: '关闭',
required: '必填',
input_content: '请输入内容'
},
datasource: {
create: '新建数据连接',

View File

@ -240,12 +240,12 @@ export default {
},
groupFormRules: {
name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' }
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }
]
},
tableFormRules: {
name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' }
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }
]
},
selectTableFlag: false,
@ -328,7 +328,7 @@ export default {
post('/chart/group/save', group).then(response => {
this.close()
this.$message({
message: this.$t('commons.save_success'),
message: this.$t('dataset.save_success'),
type: 'success',
showClose: true
})
@ -351,7 +351,7 @@ export default {
post('/chart/view/save', view).then(response => {
this.closeTable()
this.$message({
message: this.$t('commons.save_success'),
message: this.$t('dataset.save_success'),
type: 'success',
showClose: true
})

View File

@ -1,5 +1,5 @@
<template>
<ms-container>
<ms-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<ms-aside-container>
<group @switchComponent="switchComponent"/>

View File

@ -96,8 +96,8 @@
<el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
<el-row style="width: 100%;height: 100%;" class="padding-lr">
<el-row style="margin-top: 10px;">
<el-row style="display:flex;height: 30px;">
<span style="line-height: 30px;width: 60px;text-align: right;">{{ $t('chart.x_axis') }}</span>
<el-row style="display:flex;height: 32px;">
<span style="line-height: 32px;width: 60px;text-align: right;">{{ $t('chart.x_axis') }}</span>
<draggable
v-model="view.xaxis"
group="itxst"
@ -120,8 +120,8 @@
</transition-group>
</draggable>
</el-row>
<el-row style="display:flex;height: 30px;margin-top: 10px;">
<span style="line-height: 30px;width: 60px;text-align: right;">{{ $t('chart.y_axis') }}</span>
<el-row style="display:flex;height: 32px;margin-top: 10px;">
<span style="line-height: 32px;width: 60px;text-align: right;">{{ $t('chart.y_axis') }}</span>
<draggable
v-model="view.yaxis"
group="itxst"

View File

@ -1,61 +1,186 @@
<template>
<el-col>
<el-row>
<el-button icon="el-icon-setting" size="mini" @click="showConfig">
{{ $t('dataset.update_setting') }}
</el-button>
</el-row>
<el-row style="margin-top: 10px;">
<!--TODO-->
<el-table
size="mini"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
prop="name"
label="更新任务名称"
/>
<el-table-column
prop="startTime"
label="开始时间"
/>
<el-table-column
prop="endTime"
label="结束时间"
/>
<el-table-column
prop="info"
label="更新信息"
/>
</el-table>
</el-row>
<el-dialog
:title="table.name+' '+$t('dataset.update_setting')"
:visible="update_setting"
:show-close="false"
width="50%"
class="dialog-css"
>
<el-col>
<el-row>
<el-button icon="el-icon-download" size="mini">
{{ $t('dataset.sync_now') }}
</el-button>
<el-button icon="el-icon-plus" size="mini">
{{ $t('dataset.add_task') }}
<el-button icon="el-icon-setting" size="mini" @click="showConfig">
{{ $t('dataset.update_setting') }}
</el-button>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="update_setting = false">{{ $t('dataset.cancel') }}</el-button>
<el-button type="primary" size="mini" @click="update_setting = false">{{ $t('dataset.confirm') }}</el-button>
</div>
</el-dialog>
</el-col>
<el-row style="margin-top: 10px;">
<el-table
size="mini"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
prop="name"
:label="$t('dataset.task_name')"
/>
<el-table-column
prop="startTime"
:label="$t('dataset.start_time')"
/>
<el-table-column
prop="endTime"
:label="$t('dataset.end_time')"
/>
<el-table-column
prop="status"
:label="$t('dataset.status')"
/>
</el-table>
</el-row>
<el-dialog
:title="table.name+' '+$t('dataset.update_setting')"
:visible="update_setting"
:show-close="false"
width="50%"
class="dialog-css"
>
<el-dialog
:title="$t('dataset.task_update')"
:visible="update_task"
:show-close="false"
width="50%"
class="dialog-css"
append-to-body
>
<el-col>
<el-form :form="taskForm" label-width="80px">
<el-form-item :label="$t('dataset.task_name')" prop="name">
<el-input
v-model="taskForm.name"
size="mini"
style="width: 50%"
:placeholder="$t('dataset.task_name')"
/>
</el-form-item>
<el-form-item :label="$t('dataset.update_type')" prop="type">
<el-select v-model="taskForm.type" size="mini">
<el-option
:label="$t('dataset.all_scope')"
value="0"
/>
<el-option
:label="$t('dataset.add_scope')"
value="1"
:disabled="true"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('dataset.start_time')" prop="startTime">
<el-date-picker
v-model="taskForm.startTime"
type="datetime"
:placeholder="$t('dataset.select_data_time')"
size="mini"
/>
</el-form-item>
<el-form-item :label="$t('dataset.execute_rate')" prop="rate">
<el-select v-model="taskForm.rate" size="mini">
<el-option
:label="$t('dataset.execute_once')"
value="0"
/>
<el-option
:label="$t('dataset.cron_config')"
value="1"
/>
</el-select>
</el-form-item>
<el-form-item v-if="taskForm.rate === '1'" label="">
<el-input v-model="taskForm.cron" size="mini" style="width: 50%"/>
</el-form-item>
<el-form-item :label="$t('dataset.end_time')" prop="end">
<el-select v-model="taskForm.end" size="mini">
<el-option
:label="$t('dataset.no_limit')"
value="0"
/>
<el-option
:label="$t('dataset.set_end_time')"
value="1"
/>
</el-select>
</el-form-item>
<el-form-item v-if="taskForm.end === '1'" label="">
<el-date-picker
v-model="taskForm.endTime"
type="datetime"
:placeholder="$t('dataset.select_data_time')"
size="mini"
/>
</el-form-item>
</el-form>
</el-col>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="closeTask">{{ $t('dataset.cancel') }}</el-button>
<el-button type="primary" size="mini" @click="saveTask(taskForm)">{{ $t('dataset.confirm') }}</el-button>
</div>
</el-dialog>
<el-row>
<el-button icon="el-icon-download" size="mini">
{{ $t('dataset.sync_now') }}
</el-button>
<el-button icon="el-icon-plus" size="mini" @click="addTask(undefined)">
{{ $t('dataset.add_task') }}
</el-button>
</el-row>
<el-row style="margin-top: 10px;">
<el-table
border
size="mini"
:data="taskData"
style="width: 100%"
height="300"
>
<el-table-column
prop="name"
:label="$t('dataset.start_time')"
/>
<el-table-column
prop="rate"
:label="$t('dataset.execute_rate')"
>
<template slot-scope="scope">
<span v-if="scope.row.rate === '0'">{{ $t('dataset.execute_once') }}</span>
<span v-if="scope.row.rate === '1'">{{ $t('dataset.cron_config') }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('dataset.operate')"
>
<template slot-scope="scope" style="float: right">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
circle
@click="addTask(scope.row)"/>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
circle
@click="deleteTask(scope.row)"/>
</template>
</el-table-column>
</el-table>
</el-row>
<div slot="footer" class="dialog-footer">
<!-- <el-button size="mini" @click="update_setting = false">{{ $t('dataset.cancel') }}</el-button>-->
<!-- <el-button type="primary" size="mini" @click="update_setting = false">{{ $t('dataset.confirm') }}</el-button>-->
<el-button size="mini" @click="update_setting = false">{{ $t('dataset.close') }}</el-button>
</div>
</el-dialog>
</el-col>
</template>
<script>
import { post } from '@/api/dataset/dataset'
export default {
name: 'UpdateInfo',
props: {
@ -64,32 +189,133 @@ export default {
data() {
return {
update_setting: false,
update_task: false,
taskForm: {
name: '',
type: '0',
startTime: '',
rate: '0',
cron: '',
endTime: '',
end: '0'
},
tableData: [{
startTime: '2016-05-02 00:00:00',
endTime: '2016-05-02 00:00:10',
name: '每天0点更新',
info: '更新成功'
status: '更新成功'
}, {
startTime: '2016-05-02 00:00:00',
endTime: '2016-05-02 00:00:10',
name: '手动更新',
status: '更新成功'
}, {
startTime: '2016-05-02 00:00:00',
endTime: '2016-05-02 00:00:10',
name: '每天0点更新',
info: '更新成功'
status: '更新成功'
}, {
startTime: '2016-05-02 00:00:00',
endTime: '2016-05-02 00:00:10',
name: '每天0点更新',
info: '更新成功'
}, {
startTime: '2016-05-02 00:00:00',
endTime: '2016-05-02 00:00:10',
name: '每天0点更新',
info: '更新成功'
}]
status: '更新成功'
}],
taskData: [],
taskFormRules: {
name: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }
],
type: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }
],
startTime: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }
],
rate: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }
],
end: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }
]
}
}
},
watch: {
table() {
this.listTask()
}
},
methods: {
showConfig() {
this.update_setting = true
this.listTask()
},
addTask(task) {
if (!task) {
this.resetTaskForm()
this.taskForm.name = this.table.name + ' ' + this.$t('dataset.task_update')
this.taskForm.startTime = new Date()
} else {
this.taskForm = JSON.parse(JSON.stringify(task))
}
this.update_task = true
},
listTask() {
post('/dataset/task/list', { tableId: this.table.id }).then(response => {
this.taskData = response.data
})
},
saveTask(task) {
task.startTime = new Date(task.startTime).getTime()
task.endTime = new Date(task.endTime).getTime()
task.tableId = this.table.id
post('/dataset/task/save', task).then(response => {
this.$message({
message: this.$t('dataset.save_success'),
type: 'success',
showClose: true
})
this.update_task = false
this.resetTaskForm()
this.listTask()
})
// this.$refs['taskForm'].validate((valid) => {
// if (valid) {
//
// } else {
// this.$message({
// message: this.$t('dataset.input_content'),
// type: 'error',
// showClose: true
// })
// return false
// }
// })
},
deleteTask(task) {
post('/dataset/task/delete/' + task.id, null).then(response => {
this.$message({
message: this.$t('dataset.delete_success'),
type: 'success',
showClose: true
})
this.resetTaskForm()
this.listTask()
})
},
closeTask() {
this.update_task = false
this.resetTaskForm()
},
resetTaskForm() {
this.taskForm = {
name: '',
type: '0',
startTime: '',
rate: '0',
endTime: '',
end: '0'
}
}
}
}
@ -103,4 +329,8 @@ export default {
.dialog-css >>> .el-dialog__body {
padding: 10px 20px 20px;
}
.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@ -262,15 +262,15 @@ export default {
},
groupFormRules: {
name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' }
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }
]
},
tableFormRules: {
name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' }
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }
],
mode: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' }
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' }
]
}
}
@ -362,7 +362,7 @@ export default {
addGroup(group).then(res => {
this.close()
this.$message({
message: this.$t('commons.save_success'),
message: this.$t('dataset.save_success'),
type: 'success',
showClose: true
})
@ -387,7 +387,7 @@ export default {
addTable(table).then(response => {
this.closeTable()
this.$message({
message: this.$t('commons.save_success'),
message: this.$t('dataset.save_success'),
type: 'success',
showClose: true
})

View File

@ -1,5 +1,5 @@
<template>
<ms-container>
<ms-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<ms-aside-container>
<group @switchComponent="switchComponent"/>