diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRouteOverrunDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRouteOverrunDAO.java new file mode 100644 index 000000000..26818297a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRouteOverrunDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRouteOverrun; +import club.joylink.rtss.entity.DraftMapRouteOverrunExample; +import org.springframework.stereotype.Repository; + +/** + * DraftMapRouteOverrunDAO继承基类 + */ +@Repository +public interface DraftMapRouteOverrunDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrun.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrun.java new file mode 100644 index 000000000..a1472fecf --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrun.java @@ -0,0 +1,95 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * @author + * + */ +public class DraftMapRouteOverrun implements Serializable { + private Long id; + + private String code; + + private String sectionCode; + + private String switchCode; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSectionCode() { + return sectionCode; + } + + public void setSectionCode(String sectionCode) { + this.sectionCode = sectionCode; + } + + public String getSwitchCode() { + return switchCode; + } + + public void setSwitchCode(String switchCode) { + this.switchCode = switchCode; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapRouteOverrun other = (DraftMapRouteOverrun) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getSectionCode() == null ? other.getSectionCode() == null : this.getSectionCode().equals(other.getSectionCode())) + && (this.getSwitchCode() == null ? other.getSwitchCode() == null : this.getSwitchCode().equals(other.getSwitchCode())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getSectionCode() == null) ? 0 : getSectionCode().hashCode()); + result = prime * result + ((getSwitchCode() == null) ? 0 : getSwitchCode().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", sectionCode=").append(sectionCode); + sb.append(", switchCode=").append(switchCode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrunExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrunExample.java new file mode 100644 index 000000000..f36be0f2c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteOverrunExample.java @@ -0,0 +1,492 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRouteOverrunExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRouteOverrunExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andSectionCodeIsNull() { + addCriterion("section_code is null"); + return (Criteria) this; + } + + public Criteria andSectionCodeIsNotNull() { + addCriterion("section_code is not null"); + return (Criteria) this; + } + + public Criteria andSectionCodeEqualTo(String value) { + addCriterion("section_code =", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeNotEqualTo(String value) { + addCriterion("section_code <>", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeGreaterThan(String value) { + addCriterion("section_code >", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("section_code >=", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeLessThan(String value) { + addCriterion("section_code <", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeLessThanOrEqualTo(String value) { + addCriterion("section_code <=", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeLike(String value) { + addCriterion("section_code like", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeNotLike(String value) { + addCriterion("section_code not like", value, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeIn(List values) { + addCriterion("section_code in", values, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeNotIn(List values) { + addCriterion("section_code not in", values, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeBetween(String value1, String value2) { + addCriterion("section_code between", value1, value2, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSectionCodeNotBetween(String value1, String value2) { + addCriterion("section_code not between", value1, value2, "sectionCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeIsNull() { + addCriterion("switch_code is null"); + return (Criteria) this; + } + + public Criteria andSwitchCodeIsNotNull() { + addCriterion("switch_code is not null"); + return (Criteria) this; + } + + public Criteria andSwitchCodeEqualTo(String value) { + addCriterion("switch_code =", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeNotEqualTo(String value) { + addCriterion("switch_code <>", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeGreaterThan(String value) { + addCriterion("switch_code >", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeGreaterThanOrEqualTo(String value) { + addCriterion("switch_code >=", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeLessThan(String value) { + addCriterion("switch_code <", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeLessThanOrEqualTo(String value) { + addCriterion("switch_code <=", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeLike(String value) { + addCriterion("switch_code like", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeNotLike(String value) { + addCriterion("switch_code not like", value, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeIn(List values) { + addCriterion("switch_code in", values, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeNotIn(List values) { + addCriterion("switch_code not in", values, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeBetween(String value1, String value2) { + addCriterion("switch_code between", value1, value2, "switchCode"); + return (Criteria) this; + } + + public Criteria andSwitchCodeNotBetween(String value1, String value2) { + addCriterion("switch_code not between", value1, value2, "switchCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/DraftMapRouteOverrunDAO.xml b/src/main/resources/mybatis/mapper/DraftMapRouteOverrunDAO.xml new file mode 100644 index 000000000..2b9f0b2d3 --- /dev/null +++ b/src/main/resources/mybatis/mapper/DraftMapRouteOverrunDAO.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, code, section_code, switch_code + + + + + delete from draft_map_route_overrun + where id = #{id,jdbcType=BIGINT} + + + delete from draft_map_route_overrun + + + + + + insert into draft_map_route_overrun (code, section_code, switch_code + ) + values (#{code,jdbcType=VARCHAR}, #{sectionCode,jdbcType=VARCHAR}, #{switchCode,jdbcType=VARCHAR} + ) + + + insert into draft_map_route_overrun + + + code, + + + section_code, + + + switch_code, + + + + + #{code,jdbcType=VARCHAR}, + + + #{sectionCode,jdbcType=VARCHAR}, + + + #{switchCode,jdbcType=VARCHAR}, + + + + + + update draft_map_route_overrun + + + id = #{record.id,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + section_code = #{record.sectionCode,jdbcType=VARCHAR}, + + + switch_code = #{record.switchCode,jdbcType=VARCHAR}, + + + + + + + + update draft_map_route_overrun + set id = #{record.id,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + section_code = #{record.sectionCode,jdbcType=VARCHAR}, + switch_code = #{record.switchCode,jdbcType=VARCHAR} + + + + + + update draft_map_route_overrun + + + code = #{code,jdbcType=VARCHAR}, + + + section_code = #{sectionCode,jdbcType=VARCHAR}, + + + switch_code = #{switchCode,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update draft_map_route_overrun + set code = #{code,jdbcType=VARCHAR}, + section_code = #{sectionCode,jdbcType=VARCHAR}, + switch_code = #{switchCode,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file