Merge branch 'schedule' of http://192.168.111.189:80/git/xymp/backend into schedule
commit
629dcc6b54
@ -0,0 +1,135 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
public class TerminalHeartbeatHistory {
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column terminal_heartbeat_history.term_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer termId;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column terminal_heartbeat_history.heartbeat_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long heartbeatTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column terminal_heartbeat_history.heartbeat_ip
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String heartbeatIp;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column terminal_heartbeat_history.heartbeat_port
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Short heartbeatPort;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column terminal_heartbeat_history.term_id
|
||||
*
|
||||
* @return the value of terminal_heartbeat_history.term_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getTermId() {
|
||||
return termId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column terminal_heartbeat_history.term_id
|
||||
*
|
||||
* @param termId the value for terminal_heartbeat_history.term_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setTermId(Integer termId) {
|
||||
this.termId = termId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column terminal_heartbeat_history.heartbeat_time
|
||||
*
|
||||
* @return the value of terminal_heartbeat_history.heartbeat_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getHeartbeatTime() {
|
||||
return heartbeatTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column terminal_heartbeat_history.heartbeat_time
|
||||
*
|
||||
* @param heartbeatTime the value for terminal_heartbeat_history.heartbeat_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setHeartbeatTime(Long heartbeatTime) {
|
||||
this.heartbeatTime = heartbeatTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column terminal_heartbeat_history.heartbeat_ip
|
||||
*
|
||||
* @return the value of terminal_heartbeat_history.heartbeat_ip
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getHeartbeatIp() {
|
||||
return heartbeatIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column terminal_heartbeat_history.heartbeat_ip
|
||||
*
|
||||
* @param heartbeatIp the value for terminal_heartbeat_history.heartbeat_ip
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setHeartbeatIp(String heartbeatIp) {
|
||||
this.heartbeatIp = heartbeatIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column terminal_heartbeat_history.heartbeat_port
|
||||
*
|
||||
* @return the value of terminal_heartbeat_history.heartbeat_port
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Short getHeartbeatPort() {
|
||||
return heartbeatPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column terminal_heartbeat_history.heartbeat_port
|
||||
*
|
||||
* @param heartbeatPort the value for terminal_heartbeat_history.heartbeat_port
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setHeartbeatPort(Short heartbeatPort) {
|
||||
this.heartbeatPort = heartbeatPort;
|
||||
}
|
||||
}
|
@ -0,0 +1,551 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalHeartbeatHistoryExample {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public TerminalHeartbeatHistoryExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
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 andTermIdIsNull() {
|
||||
addCriterion("term_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdIsNotNull() {
|
||||
addCriterion("term_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdEqualTo(Integer value) {
|
||||
addCriterion("term_id =", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotEqualTo(Integer value) {
|
||||
addCriterion("term_id <>", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdGreaterThan(Integer value) {
|
||||
addCriterion("term_id >", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("term_id >=", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdLessThan(Integer value) {
|
||||
addCriterion("term_id <", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("term_id <=", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdIn(List<Integer> values) {
|
||||
addCriterion("term_id in", values, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotIn(List<Integer> values) {
|
||||
addCriterion("term_id not in", values, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("term_id between", value1, value2, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("term_id not between", value1, value2, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeIsNull() {
|
||||
addCriterion("heartbeat_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeIsNotNull() {
|
||||
addCriterion("heartbeat_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeEqualTo(Long value) {
|
||||
addCriterion("heartbeat_time =", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeNotEqualTo(Long value) {
|
||||
addCriterion("heartbeat_time <>", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeGreaterThan(Long value) {
|
||||
addCriterion("heartbeat_time >", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("heartbeat_time >=", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeLessThan(Long value) {
|
||||
addCriterion("heartbeat_time <", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("heartbeat_time <=", value, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeIn(List<Long> values) {
|
||||
addCriterion("heartbeat_time in", values, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeNotIn(List<Long> values) {
|
||||
addCriterion("heartbeat_time not in", values, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("heartbeat_time between", value1, value2, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("heartbeat_time not between", value1, value2, "heartbeatTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpIsNull() {
|
||||
addCriterion("heartbeat_ip is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpIsNotNull() {
|
||||
addCriterion("heartbeat_ip is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpEqualTo(String value) {
|
||||
addCriterion("heartbeat_ip =", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpNotEqualTo(String value) {
|
||||
addCriterion("heartbeat_ip <>", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpGreaterThan(String value) {
|
||||
addCriterion("heartbeat_ip >", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("heartbeat_ip >=", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpLessThan(String value) {
|
||||
addCriterion("heartbeat_ip <", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpLessThanOrEqualTo(String value) {
|
||||
addCriterion("heartbeat_ip <=", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpLike(String value) {
|
||||
addCriterion("heartbeat_ip like", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpNotLike(String value) {
|
||||
addCriterion("heartbeat_ip not like", value, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpIn(List<String> values) {
|
||||
addCriterion("heartbeat_ip in", values, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpNotIn(List<String> values) {
|
||||
addCriterion("heartbeat_ip not in", values, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpBetween(String value1, String value2) {
|
||||
addCriterion("heartbeat_ip between", value1, value2, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatIpNotBetween(String value1, String value2) {
|
||||
addCriterion("heartbeat_ip not between", value1, value2, "heartbeatIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortIsNull() {
|
||||
addCriterion("heartbeat_port is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortIsNotNull() {
|
||||
addCriterion("heartbeat_port is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortEqualTo(Short value) {
|
||||
addCriterion("heartbeat_port =", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortNotEqualTo(Short value) {
|
||||
addCriterion("heartbeat_port <>", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortGreaterThan(Short value) {
|
||||
addCriterion("heartbeat_port >", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortGreaterThanOrEqualTo(Short value) {
|
||||
addCriterion("heartbeat_port >=", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortLessThan(Short value) {
|
||||
addCriterion("heartbeat_port <", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortLessThanOrEqualTo(Short value) {
|
||||
addCriterion("heartbeat_port <=", value, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortIn(List<Short> values) {
|
||||
addCriterion("heartbeat_port in", values, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortNotIn(List<Short> values) {
|
||||
addCriterion("heartbeat_port not in", values, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortBetween(Short value1, Short value2) {
|
||||
addCriterion("heartbeat_port between", value1, value2, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeartbeatPortNotBetween(Short value1, Short value2) {
|
||||
addCriterion("heartbeat_port not between", value1, value2, "heartbeatPort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated do_not_delete_during_merge
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateUtil {
|
||||
public final static String defaultDatePattern = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
/**
|
||||
* 获得默认的 date pattern
|
||||
*/
|
||||
public static String getDatePattern() {
|
||||
return defaultDatePattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用预设Format格式化Date成字符串
|
||||
*/
|
||||
public static String format(Date date) {
|
||||
return format(date, getDatePattern());
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用参数Format格式化Date成字符串
|
||||
*/
|
||||
public static String format(Date date, String pattern) {
|
||||
String returnValue = "";
|
||||
|
||||
if (date != null) {
|
||||
SimpleDateFormat df = new SimpleDateFormat(pattern);
|
||||
returnValue = df.format(date);
|
||||
}
|
||||
|
||||
return (returnValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用预设格式将字符串转为Date
|
||||
*/
|
||||
public static Date parse(String strDate) throws ParseException {
|
||||
return parse(strDate, getDatePattern());
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用参数Format将字符串转为Date
|
||||
*/
|
||||
public static Date parse(String strDate, String pattern) throws ParseException {
|
||||
SimpleDateFormat df = new SimpleDateFormat(pattern);
|
||||
return df.parse(strDate);
|
||||
}
|
||||
|
||||
public static Date getTodayZero() throws ParseException {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String str = df.format(new Date());
|
||||
return df.parse(str);
|
||||
}
|
||||
|
||||
public static Date getDayZero(Date date) throws ParseException {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String str = df.format(date);
|
||||
return df.parse(str);
|
||||
}
|
||||
|
||||
public static Date getMonthZero() throws ParseException {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM");
|
||||
String str = df.format(new Date());
|
||||
return df.parse(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在日期上增加数个整日(n为负数则是减少数日)
|
||||
*/
|
||||
public static Date addDay(Date date, int n) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.DAY_OF_MONTH, n);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public static Date addMonth(Date date, int n) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.MONTH, n);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public static long getDifferenceInDays(Date startDate, Date endDate) {
|
||||
LocalDate startLocalDate = startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate endLocalDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
return ChronoUnit.DAYS.between(startLocalDate, endLocalDate);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.shxy.xymanager_dao.dao;
|
||||
|
||||
import com.shxy.xymanager_common.entity.TerminalHeartbeatHistory;
|
||||
import com.shxy.xymanager_common.entity.TerminalHeartbeatHistoryExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TerminalHeartbeatHistoryMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
long countByExample(TerminalHeartbeatHistoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByExample(TerminalHeartbeatHistoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insert(TerminalHeartbeatHistory row);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insertSelective(TerminalHeartbeatHistory row);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
List<TerminalHeartbeatHistory> selectByExample(TerminalHeartbeatHistoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExampleSelective(@Param("row") TerminalHeartbeatHistory row, @Param("example") TerminalHeartbeatHistoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table terminal_heartbeat_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExample(@Param("row") TerminalHeartbeatHistory row, @Param("example") TerminalHeartbeatHistoryExample example);
|
||||
}
|
@ -0,0 +1,208 @@
|
||||
<?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="com.shxy.xymanager_dao.dao.TerminalHeartbeatHistoryMapper">
|
||||
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalHeartbeatHistory">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<result column="term_id" jdbcType="INTEGER" property="termId" />
|
||||
<result column="heartbeat_time" jdbcType="BIGINT" property="heartbeatTime" />
|
||||
<result column="heartbeat_ip" jdbcType="VARCHAR" property="heartbeatIp" />
|
||||
<result column="heartbeat_port" jdbcType="SMALLINT" property="heartbeatPort" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<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">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<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">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
term_id, heartbeat_time, heartbeat_ip, heartbeat_port
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalHeartbeatHistoryExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from terminal_heartbeat_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalHeartbeatHistoryExample">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from terminal_heartbeat_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalHeartbeatHistory">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into terminal_heartbeat_history (term_id, heartbeat_time, heartbeat_ip,
|
||||
heartbeat_port)
|
||||
values (#{termId,jdbcType=INTEGER}, #{heartbeatTime,jdbcType=BIGINT}, #{heartbeatIp,jdbcType=VARCHAR},
|
||||
#{heartbeatPort,jdbcType=SMALLINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalHeartbeatHistory">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into terminal_heartbeat_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="termId != null">
|
||||
term_id,
|
||||
</if>
|
||||
<if test="heartbeatTime != null">
|
||||
heartbeat_time,
|
||||
</if>
|
||||
<if test="heartbeatIp != null">
|
||||
heartbeat_ip,
|
||||
</if>
|
||||
<if test="heartbeatPort != null">
|
||||
heartbeat_port,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="termId != null">
|
||||
#{termId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="heartbeatTime != null">
|
||||
#{heartbeatTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="heartbeatIp != null">
|
||||
#{heartbeatIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="heartbeatPort != null">
|
||||
#{heartbeatPort,jdbcType=SMALLINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalHeartbeatHistoryExample" resultType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select count(*) from terminal_heartbeat_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update terminal_heartbeat_history
|
||||
<set>
|
||||
<if test="row.termId != null">
|
||||
term_id = #{row.termId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="row.heartbeatTime != null">
|
||||
heartbeat_time = #{row.heartbeatTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="row.heartbeatIp != null">
|
||||
heartbeat_ip = #{row.heartbeatIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="row.heartbeatPort != null">
|
||||
heartbeat_port = #{row.heartbeatPort,jdbcType=SMALLINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="example != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update terminal_heartbeat_history
|
||||
set term_id = #{row.termId,jdbcType=INTEGER},
|
||||
heartbeat_time = #{row.heartbeatTime,jdbcType=BIGINT},
|
||||
heartbeat_ip = #{row.heartbeatIp,jdbcType=VARCHAR},
|
||||
heartbeat_port = #{row.heartbeatPort,jdbcType=SMALLINT}
|
||||
<if test="example != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,27 @@
|
||||
package com.shxy.xymanager_service.impl;
|
||||
|
||||
import com.shxy.xymanager_common.entity.TerminalHeartbeatHistory;
|
||||
import com.shxy.xymanager_common.entity.TerminalHeartbeatHistoryExample;
|
||||
import com.shxy.xymanager_dao.dao.TerminalHeartbeatHistoryMapper;
|
||||
import com.shxy.xymanager_service.service.HeartbeatService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HeartbeatServiceImpl implements HeartbeatService {
|
||||
@Resource
|
||||
TerminalHeartbeatHistoryMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<TerminalHeartbeatHistory> listAll(Integer termId) {
|
||||
TerminalHeartbeatHistoryExample example = new TerminalHeartbeatHistoryExample();
|
||||
TerminalHeartbeatHistoryExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andTermIdEqualTo(termId);
|
||||
example.setOrderByClause("heartbeat_time desc");
|
||||
return mapper.selectByExample(example);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.shxy.xymanager_service.impl;
|
||||
|
||||
import com.shxy.xymanager_common.entity.TerminalBasicInfoHistoryExample;
|
||||
import com.shxy.xymanager_dao.dao.TerminalBasicInfoHistoryDao;
|
||||
import com.shxy.xymanager_service.service.TerminalBasicInfoHistoryService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TerminalBasicInfoHistoryServiceImpl implements TerminalBasicInfoHistoryService {
|
||||
|
||||
@Resource
|
||||
TerminalBasicInfoHistoryDao terminalBasicInfoHistoryDao;
|
||||
|
||||
@Override
|
||||
public long count(Integer termId, Long start, Long end) {
|
||||
TerminalBasicInfoHistoryExample example = new TerminalBasicInfoHistoryExample();
|
||||
TerminalBasicInfoHistoryExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andTermIdEqualTo(termId);
|
||||
if (start != null) {
|
||||
criteria.andUpdateTimeGreaterThanOrEqualTo(start);
|
||||
}
|
||||
if (end != null) {
|
||||
criteria.andUpdateTimeLessThan(end);
|
||||
}
|
||||
return terminalBasicInfoHistoryDao.countByExample(example);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.shxy.xymanager_service.service;
|
||||
|
||||
import com.shxy.xymanager_common.entity.TerminalHeartbeatHistory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HeartbeatService {
|
||||
|
||||
List<TerminalHeartbeatHistory> listAll(Integer termId);
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.shxy.xymanager_service.service;
|
||||
|
||||
public interface TerminalBasicInfoHistoryService {
|
||||
long count(Integer termId, Long start, Long end);
|
||||
}
|
Loading…
Reference in New Issue