فهرست منبع

增加清洗记录,设备字段

wuhongshuang 5 سال پیش
والد
کامیت
ee767d6389

+ 69 - 0
src/main/java/com/shawn/model/entity/TCleanHistory.java

@@ -0,0 +1,69 @@
+package com.shawn.model.entity;
+
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+import com.shawn.web.exception.MyException;
+
+@Accessors(chain = true)
+@NoArgsConstructor
+@Getter
+@Setter
+@ToString
+public class TCleanHistory {
+    
+	@ApiModelProperty(value="id")
+	private Long id;
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value="添加时间")
+	private Date createDate;
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value="修改时间")
+	private Date modifyDate;
+
+	@ApiModelProperty(value="类型 ,0:定时清洗,1:随机清洗")
+	private Integer type;
+
+	@ApiModelProperty(value="设备唯一码")
+	private String clientId;
+
+	@ApiModelProperty(value="管理员ID")
+	private Long adminId;
+
+	@ApiModelProperty(value="设备id")
+	private Long equipmentId;
+
+	@ApiModelProperty(value="本次清洗用水量")
+	private Integer water;
+
+	@ApiModelProperty(value="本次清洗用电量")
+	private Integer electricity;
+
+	/**自定义统一方法设置主键**/
+	public void setPrimaryKey(Long primaryKey) {
+		 setId(primaryKey);
+	}
+
+	/**自定义统一方法获取主键**/
+	@JsonIgnore
+	public Long getPrimaryKey() {
+		 return getId();
+	}
+
+	/**判断该实体是否存在主键**/
+	public boolean hasPrimaryKey() {
+		return true;
+	}
+
+}

+ 789 - 0
src/main/java/com/shawn/model/entity/TCleanHistoryExample.java

@@ -0,0 +1,789 @@
+package com.shawn.model.entity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TCleanHistoryExample {
+    /**
+     * t_clean_history
+     */
+    protected String orderByClause;
+
+    /**
+     * t_clean_history
+     */
+    protected boolean distinct;
+
+    /**
+     * t_clean_history
+     */
+    protected List<Criteria> oredCriteria;
+
+    private Integer limit;
+
+    private Integer offset;
+
+    public TCleanHistoryExample() {
+        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;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    public Integer getOffset() {
+        return offset;
+    }
+
+    /**
+     * t_clean_history 2020-04-09
+     */
+    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(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<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> 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 andCreateDateIsNull() {
+            addCriterion("create_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateIsNotNull() {
+            addCriterion("create_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateEqualTo(Date value) {
+            addCriterion("create_date =", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateNotEqualTo(Date value) {
+            addCriterion("create_date <>", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateGreaterThan(Date value) {
+            addCriterion("create_date >", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_date >=", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateLessThan(Date value) {
+            addCriterion("create_date <", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
+            addCriterion("create_date <=", value, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateIn(List<Date> values) {
+            addCriterion("create_date in", values, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateNotIn(List<Date> values) {
+            addCriterion("create_date not in", values, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateBetween(Date value1, Date value2) {
+            addCriterion("create_date between", value1, value2, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
+            addCriterion("create_date not between", value1, value2, "createDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateIsNull() {
+            addCriterion("modify_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateIsNotNull() {
+            addCriterion("modify_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateEqualTo(Date value) {
+            addCriterion("modify_date =", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateNotEqualTo(Date value) {
+            addCriterion("modify_date <>", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateGreaterThan(Date value) {
+            addCriterion("modify_date >", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateGreaterThanOrEqualTo(Date value) {
+            addCriterion("modify_date >=", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateLessThan(Date value) {
+            addCriterion("modify_date <", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateLessThanOrEqualTo(Date value) {
+            addCriterion("modify_date <=", value, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateIn(List<Date> values) {
+            addCriterion("modify_date in", values, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateNotIn(List<Date> values) {
+            addCriterion("modify_date not in", values, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateBetween(Date value1, Date value2) {
+            addCriterion("modify_date between", value1, value2, "modifyDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andModifyDateNotBetween(Date value1, Date value2) {
+            addCriterion("modify_date not between", value1, value2, "modifyDate");
+            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(Integer value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdIsNull() {
+            addCriterion("client_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdIsNotNull() {
+            addCriterion("client_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdEqualTo(String value) {
+            addCriterion("client_id =", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdNotEqualTo(String value) {
+            addCriterion("client_id <>", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdGreaterThan(String value) {
+            addCriterion("client_id >", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdGreaterThanOrEqualTo(String value) {
+            addCriterion("client_id >=", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdLessThan(String value) {
+            addCriterion("client_id <", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdLessThanOrEqualTo(String value) {
+            addCriterion("client_id <=", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdLike(String value) {
+            addCriterion("client_id like", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdNotLike(String value) {
+            addCriterion("client_id not like", value, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdIn(List<String> values) {
+            addCriterion("client_id in", values, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdNotIn(List<String> values) {
+            addCriterion("client_id not in", values, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdBetween(String value1, String value2) {
+            addCriterion("client_id between", value1, value2, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andClientIdNotBetween(String value1, String value2) {
+            addCriterion("client_id not between", value1, value2, "clientId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdIsNull() {
+            addCriterion("admin_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdIsNotNull() {
+            addCriterion("admin_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdEqualTo(Long value) {
+            addCriterion("admin_id =", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdNotEqualTo(Long value) {
+            addCriterion("admin_id <>", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdGreaterThan(Long value) {
+            addCriterion("admin_id >", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("admin_id >=", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdLessThan(Long value) {
+            addCriterion("admin_id <", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdLessThanOrEqualTo(Long value) {
+            addCriterion("admin_id <=", value, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdIn(List<Long> values) {
+            addCriterion("admin_id in", values, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdNotIn(List<Long> values) {
+            addCriterion("admin_id not in", values, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdBetween(Long value1, Long value2) {
+            addCriterion("admin_id between", value1, value2, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdminIdNotBetween(Long value1, Long value2) {
+            addCriterion("admin_id not between", value1, value2, "adminId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdIsNull() {
+            addCriterion("equipment_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdIsNotNull() {
+            addCriterion("equipment_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdEqualTo(Long value) {
+            addCriterion("equipment_id =", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotEqualTo(Long value) {
+            addCriterion("equipment_id <>", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdGreaterThan(Long value) {
+            addCriterion("equipment_id >", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("equipment_id >=", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdLessThan(Long value) {
+            addCriterion("equipment_id <", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
+            addCriterion("equipment_id <=", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdIn(List<Long> values) {
+            addCriterion("equipment_id in", values, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotIn(List<Long> values) {
+            addCriterion("equipment_id not in", values, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdBetween(Long value1, Long value2) {
+            addCriterion("equipment_id between", value1, value2, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
+            addCriterion("equipment_id not between", value1, value2, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterIsNull() {
+            addCriterion("water is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterIsNotNull() {
+            addCriterion("water is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterEqualTo(Integer value) {
+            addCriterion("water =", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterNotEqualTo(Integer value) {
+            addCriterion("water <>", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterGreaterThan(Integer value) {
+            addCriterion("water >", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterGreaterThanOrEqualTo(Integer value) {
+            addCriterion("water >=", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterLessThan(Integer value) {
+            addCriterion("water <", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterLessThanOrEqualTo(Integer value) {
+            addCriterion("water <=", value, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterIn(List<Integer> values) {
+            addCriterion("water in", values, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterNotIn(List<Integer> values) {
+            addCriterion("water not in", values, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterBetween(Integer value1, Integer value2) {
+            addCriterion("water between", value1, value2, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andWaterNotBetween(Integer value1, Integer value2) {
+            addCriterion("water not between", value1, value2, "water");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityIsNull() {
+            addCriterion("electricity is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityIsNotNull() {
+            addCriterion("electricity is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityEqualTo(Integer value) {
+            addCriterion("electricity =", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityNotEqualTo(Integer value) {
+            addCriterion("electricity <>", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityGreaterThan(Integer value) {
+            addCriterion("electricity >", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityGreaterThanOrEqualTo(Integer value) {
+            addCriterion("electricity >=", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityLessThan(Integer value) {
+            addCriterion("electricity <", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityLessThanOrEqualTo(Integer value) {
+            addCriterion("electricity <=", value, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityIn(List<Integer> values) {
+            addCriterion("electricity in", values, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityNotIn(List<Integer> values) {
+            addCriterion("electricity not in", values, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityBetween(Integer value1, Integer value2) {
+            addCriterion("electricity between", value1, value2, "electricity");
+            return (Criteria) this;
+        }
+
+        public Criteria andElectricityNotBetween(Integer value1, Integer value2) {
+            addCriterion("electricity not between", value1, value2, "electricity");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * t_clean_history
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * t_clean_history 2020-04-09
+     */
+    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);
+        }
+    }
+}

+ 25 - 3
src/main/java/com/shawn/model/entity/TEquipment.java

@@ -1,7 +1,5 @@
 package com.shawn.model.entity;
 
-import java.util.Date;
-import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModelProperty;
@@ -10,7 +8,9 @@ import lombok.NoArgsConstructor;
 import lombok.Setter;
 import lombok.ToString;
 import lombok.experimental.Accessors;
-import com.shawn.web.exception.MyException;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 @Accessors(chain = true)
 @NoArgsConstructor
@@ -159,6 +159,28 @@ public class TEquipment {
 	@ApiModelProperty(value="共同参数")
 	private String commonParameters;
 
+	@ApiModelProperty(value="气味浓度")
+	private String odorConcentration;
+
+	@ApiModelProperty(value="清洁剂余量")
+	private Integer cleaner;
+
+	@ApiModelProperty(value="消毒水余量")
+	private Integer disinfectant;
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value="机器本次开机时间")
+	private Date startDate;
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value="过期时间;类似看视频充会员")
+	private Date overdueDate;
+
+	@ApiModelProperty(value="剩余使用次")
+	private Integer remaining;
+
 	/**自定义统一方法设置主键**/
 	public void setPrimaryKey(Long primaryKey) {
 		 setId(primaryKey);

+ 442 - 2
src/main/java/com/shawn/model/entity/TEquipmentExample.java

@@ -94,7 +94,7 @@ public class TEquipmentExample {
     }
 
     /**
-     * t_equipment 2019-08-23
+     * t_equipment 2020-04-09
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -2796,6 +2796,446 @@ public class TEquipmentExample {
             addCriterion("is_sleep not between", value1, value2, "isSleep");
             return (Criteria) this;
         }
+
+        public Criteria andNetworkIsNull() {
+            addCriterion("network is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkIsNotNull() {
+            addCriterion("network is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkEqualTo(String value) {
+            addCriterion("network =", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkNotEqualTo(String value) {
+            addCriterion("network <>", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkGreaterThan(String value) {
+            addCriterion("network >", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkGreaterThanOrEqualTo(String value) {
+            addCriterion("network >=", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkLessThan(String value) {
+            addCriterion("network <", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkLessThanOrEqualTo(String value) {
+            addCriterion("network <=", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkLike(String value) {
+            addCriterion("network like", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkNotLike(String value) {
+            addCriterion("network not like", value, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkIn(List<String> values) {
+            addCriterion("network in", values, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkNotIn(List<String> values) {
+            addCriterion("network not in", values, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkBetween(String value1, String value2) {
+            addCriterion("network between", value1, value2, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andNetworkNotBetween(String value1, String value2) {
+            addCriterion("network not between", value1, value2, "network");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationIsNull() {
+            addCriterion("odor_concentration is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationIsNotNull() {
+            addCriterion("odor_concentration is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationEqualTo(String value) {
+            addCriterion("odor_concentration =", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationNotEqualTo(String value) {
+            addCriterion("odor_concentration <>", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationGreaterThan(String value) {
+            addCriterion("odor_concentration >", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationGreaterThanOrEqualTo(String value) {
+            addCriterion("odor_concentration >=", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationLessThan(String value) {
+            addCriterion("odor_concentration <", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationLessThanOrEqualTo(String value) {
+            addCriterion("odor_concentration <=", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationLike(String value) {
+            addCriterion("odor_concentration like", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationNotLike(String value) {
+            addCriterion("odor_concentration not like", value, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationIn(List<String> values) {
+            addCriterion("odor_concentration in", values, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationNotIn(List<String> values) {
+            addCriterion("odor_concentration not in", values, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationBetween(String value1, String value2) {
+            addCriterion("odor_concentration between", value1, value2, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andOdorConcentrationNotBetween(String value1, String value2) {
+            addCriterion("odor_concentration not between", value1, value2, "odorConcentration");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerIsNull() {
+            addCriterion("cleaner is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerIsNotNull() {
+            addCriterion("cleaner is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerEqualTo(Integer value) {
+            addCriterion("cleaner =", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerNotEqualTo(Integer value) {
+            addCriterion("cleaner <>", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerGreaterThan(Integer value) {
+            addCriterion("cleaner >", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerGreaterThanOrEqualTo(Integer value) {
+            addCriterion("cleaner >=", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerLessThan(Integer value) {
+            addCriterion("cleaner <", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerLessThanOrEqualTo(Integer value) {
+            addCriterion("cleaner <=", value, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerIn(List<Integer> values) {
+            addCriterion("cleaner in", values, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerNotIn(List<Integer> values) {
+            addCriterion("cleaner not in", values, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerBetween(Integer value1, Integer value2) {
+            addCriterion("cleaner between", value1, value2, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andCleanerNotBetween(Integer value1, Integer value2) {
+            addCriterion("cleaner not between", value1, value2, "cleaner");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantIsNull() {
+            addCriterion("disinfectant is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantIsNotNull() {
+            addCriterion("disinfectant is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantEqualTo(Integer value) {
+            addCriterion("disinfectant =", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantNotEqualTo(Integer value) {
+            addCriterion("disinfectant <>", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantGreaterThan(Integer value) {
+            addCriterion("disinfectant >", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantGreaterThanOrEqualTo(Integer value) {
+            addCriterion("disinfectant >=", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantLessThan(Integer value) {
+            addCriterion("disinfectant <", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantLessThanOrEqualTo(Integer value) {
+            addCriterion("disinfectant <=", value, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantIn(List<Integer> values) {
+            addCriterion("disinfectant in", values, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantNotIn(List<Integer> values) {
+            addCriterion("disinfectant not in", values, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantBetween(Integer value1, Integer value2) {
+            addCriterion("disinfectant between", value1, value2, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisinfectantNotBetween(Integer value1, Integer value2) {
+            addCriterion("disinfectant not between", value1, value2, "disinfectant");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateIsNull() {
+            addCriterion("start_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateIsNotNull() {
+            addCriterion("start_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateEqualTo(Date value) {
+            addCriterion("start_date =", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateNotEqualTo(Date value) {
+            addCriterion("start_date <>", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateGreaterThan(Date value) {
+            addCriterion("start_date >", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateGreaterThanOrEqualTo(Date value) {
+            addCriterion("start_date >=", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateLessThan(Date value) {
+            addCriterion("start_date <", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateLessThanOrEqualTo(Date value) {
+            addCriterion("start_date <=", value, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateIn(List<Date> values) {
+            addCriterion("start_date in", values, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateNotIn(List<Date> values) {
+            addCriterion("start_date not in", values, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateBetween(Date value1, Date value2) {
+            addCriterion("start_date between", value1, value2, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartDateNotBetween(Date value1, Date value2) {
+            addCriterion("start_date not between", value1, value2, "startDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateIsNull() {
+            addCriterion("overdue_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateIsNotNull() {
+            addCriterion("overdue_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateEqualTo(Date value) {
+            addCriterion("overdue_date =", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateNotEqualTo(Date value) {
+            addCriterion("overdue_date <>", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateGreaterThan(Date value) {
+            addCriterion("overdue_date >", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateGreaterThanOrEqualTo(Date value) {
+            addCriterion("overdue_date >=", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateLessThan(Date value) {
+            addCriterion("overdue_date <", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateLessThanOrEqualTo(Date value) {
+            addCriterion("overdue_date <=", value, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateIn(List<Date> values) {
+            addCriterion("overdue_date in", values, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateNotIn(List<Date> values) {
+            addCriterion("overdue_date not in", values, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateBetween(Date value1, Date value2) {
+            addCriterion("overdue_date between", value1, value2, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andOverdueDateNotBetween(Date value1, Date value2) {
+            addCriterion("overdue_date not between", value1, value2, "overdueDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingIsNull() {
+            addCriterion("remaining is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingIsNotNull() {
+            addCriterion("remaining is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingEqualTo(Integer value) {
+            addCriterion("remaining =", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingNotEqualTo(Integer value) {
+            addCriterion("remaining <>", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingGreaterThan(Integer value) {
+            addCriterion("remaining >", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingGreaterThanOrEqualTo(Integer value) {
+            addCriterion("remaining >=", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingLessThan(Integer value) {
+            addCriterion("remaining <", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingLessThanOrEqualTo(Integer value) {
+            addCriterion("remaining <=", value, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingIn(List<Integer> values) {
+            addCriterion("remaining in", values, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingNotIn(List<Integer> values) {
+            addCriterion("remaining not in", values, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingBetween(Integer value1, Integer value2) {
+            addCriterion("remaining between", value1, value2, "remaining");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemainingNotBetween(Integer value1, Integer value2) {
+            addCriterion("remaining not between", value1, value2, "remaining");
+            return (Criteria) this;
+        }
     }
 
     /**
@@ -2809,7 +3249,7 @@ public class TEquipmentExample {
     }
 
     /**
-     * t_equipment 2019-08-23
+     * t_equipment 2020-04-09
      */
     public static class Criterion {
         private String condition;

+ 50 - 0
src/main/java/com/shawn/model/param/TCleanHistoryParam.java

@@ -0,0 +1,50 @@
+/**
+ * Date:2020-58-09 15:58:59
+ * author:吴洪双
+*/
+
+package com.shawn.model.param;
+
+import com.shawn.common.myAnnotation.CamelCaseToUnderscore;
+import com.shawn.model.entity.TCleanHistory;
+import java.util.List;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+@SuppressWarnings("serial")
+@Accessors(chain = true)
+@NoArgsConstructor
+@Getter
+@Setter
+@ToString
+public class TCleanHistoryParam extends TCleanHistory {
+	@CamelCaseToUnderscore
+    @ApiModelProperty(value = "排序,如:id desc")
+    private String orderByClause;
+    @ApiModelProperty(value = "是否distinct")
+    private boolean distinct;
+    @ApiModelProperty(value = "分页,展示多少条记录")
+    private Integer limit;
+    @ApiModelProperty(value = "分页,从第几条开始,默认从0开始")
+    private Integer offset;
+    @ApiModelProperty(value = "主键id 集合,用于批量删除和批量修改")
+    private List primaryKeyList;
+    private List<TCleanHistory> entityList;//实体集合,用于批量新增
+    
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date createDate_start;
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date createDate_end;
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date modifyDate_start;
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date modifyDate_end;
+
+/*==================================以上是自动生成部分字段======================================*/
+	
+}

+ 14 - 0
src/main/java/com/shawn/repository/TCleanHistoryMapper.java

@@ -0,0 +1,14 @@
+/**
+ * Date:2020-58-09 15:58:59
+ * author:吴洪双
+*/
+
+package com.shawn.repository;
+
+import com.shawn.model.entity.TCleanHistory;
+import com.shawn.model.entity.TCleanHistoryExample;
+import com.shawn.model.param.TCleanHistoryParam;
+import com.shawn.repository.base.BaseDaoInterface;
+
+public interface TCleanHistoryMapper extends BaseDaoInterface<TCleanHistory,TCleanHistoryExample,TCleanHistoryParam, Long>{
+}

+ 4 - 11
src/main/java/com/shawn/service/base/BaseService.java

@@ -4,6 +4,7 @@ import java.io.Serializable;
 import java.util.List;
 import java.util.Optional;
 
+import com.shawn.util.UniqueIDUtil;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -13,9 +14,7 @@ import com.shawn.repository.base.BaseDaoInterface;
 
 @Service
 public abstract class BaseService<ENTITY,ENTITYExample,ENTITYParam, ID extends Serializable> {
-	@Autowired
-	GetNoServiceImpl getNoServiceImpl;
-	
+
 	protected BaseDaoInterface<ENTITY,ENTITYExample,ENTITYParam, ID> baseDAO;
 	@Autowired
 	public BaseService(BaseDaoInterface<ENTITY,ENTITYExample,ENTITYParam, ID> dao){
@@ -37,7 +36,7 @@ public abstract class BaseService<ENTITY,ENTITYExample,ENTITYParam, ID extends S
 	 * @return
 	 */
 	public String generateUniqueID(String tableName) {
-		return getNoServiceImpl.getNo(tableName);
+		return UniqueIDUtil.getUniqueID();
 	}
 	/**
 	 * 生成唯一id
@@ -45,13 +44,7 @@ public abstract class BaseService<ENTITY,ENTITYExample,ENTITYParam, ID extends S
 	 * @return
 	 */
 	public String generateUniqueID() {
-		return getNoServiceImpl.getNo(getResourceName());
-	}
-	/**
-	 * 测试数据库连接
-	 */
-	public Integer checkDB() {
-		return getNoServiceImpl.checkDB();
+		return UniqueIDUtil.getUniqueID();
 	}
 	/**
 	 * 新增

+ 0 - 4
src/main/java/com/shawn/service/base/BaseServiceInterface.java

@@ -51,10 +51,6 @@ public interface BaseServiceInterface<ENTITY,ENTITYExample,ENTITYParam, ID exten
     
 	public int updateBatchByIdList(ENTITYParam entity);
 	/**
-	 * 测试数据库连接
-	 */
-	public Integer checkDB();
-	/**
 	 * 自定义获取model 表的名称
 	 */
 	public String getResourceName();

+ 0 - 33
src/main/java/com/shawn/service/base/GetNoServiceImpl.java

@@ -1,33 +0,0 @@
-package com.shawn.service.base;
-
-import com.shawn.repository.GetNoMapper;
-import com.shawn.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-@Service
-public class GetNoServiceImpl {
-	@Autowired
-	GetNoMapper getNoMapper;
-	@Transactional
-	public String getNo(String modelName) {
-		String sequence = null;
-		Map<String, String> map = new HashMap<String, String>();
-		map.put("tableName", modelName);
-		map.put("tableDate", DateUtils.formatDate(new Date(), DateUtils.PATTERN_yyyyMMdd));
-		sequence = getNoMapper.getNo(map);
-		return sequence;
-	}
-
-	/**
-	 * 测试数据库连接
-	 */
-	public Integer checkDB() {
-		return getNoMapper.checkDB();
-	}
-}

+ 31 - 0
src/main/java/com/shawn/service/impl/TCleanHistoryServiceImpl.java

@@ -0,0 +1,31 @@
+/**
+ * Date:2020-58-09 15:58:59
+ * author:吴洪双
+*/
+
+package com.shawn.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.shawn.model.entity.TCleanHistory;
+import com.shawn.model.entity.TCleanHistoryExample;
+import com.shawn.model.param.TCleanHistoryParam;
+import com.shawn.repository.TCleanHistoryMapper;
+import com.shawn.service.base.BaseService;
+import com.shawn.service.interfac.TCleanHistoryServiceInterface;
+@Service
+public class TCleanHistoryServiceImpl extends BaseService<TCleanHistory,TCleanHistoryExample,TCleanHistoryParam,Long> implements TCleanHistoryServiceInterface{
+	@Autowired
+	private TCleanHistoryMapper tCleanHistoryMapper;
+	@Autowired
+	public TCleanHistoryServiceImpl(TCleanHistoryMapper dao) {
+		super(dao);
+	}
+
+	@Override
+	public String getResourceName() {
+		return "TCleanHistory";
+	}
+
+}

+ 14 - 0
src/main/java/com/shawn/service/interfac/TCleanHistoryServiceInterface.java

@@ -0,0 +1,14 @@
+/**
+ * Date:2020-58-09 15:58:59
+ * author:吴洪双
+*/
+
+package com.shawn.service.interfac;
+
+import com.shawn.model.entity.TCleanHistory;
+import com.shawn.model.entity.TCleanHistoryExample;
+import com.shawn.model.param.TCleanHistoryParam;
+import com.shawn.service.base.BaseServiceInterface;
+
+public interface TCleanHistoryServiceInterface extends BaseServiceInterface<TCleanHistory,TCleanHistoryExample,TCleanHistoryParam,Long>{
+}

+ 23 - 0
src/main/java/com/shawn/util/UniqueIDUtil.java

@@ -0,0 +1,23 @@
+package com.shawn.util;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * 生成36位的唯一id
+ * wuhs
+ */
+@Slf4j
+public class UniqueIDUtil {
+
+    public static String getUniqueID(){
+        String id = DateUtils.formatDate(new Date(),DateUtils.PATTERN_yyyyMMddHHmmssSSS);
+        UUID uuid=UUID.randomUUID();
+        String uuidStr=uuid.toString().replaceAll("-","");
+        id=(id+uuidStr).substring(0,20);
+//        log.debug("id:{},长度:{}",id,id.length());
+        return id;
+    }
+}

+ 44 - 0
src/main/java/com/shawn/web/controller/TCleanHistoryController.java

@@ -0,0 +1,44 @@
+/**
+ * Date:2020-58-09 15:58:59
+ * author:吴洪双
+*/
+
+package com.shawn.web.controller;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.shawn.model.dto.ResultMessage;
+import com.shawn.web.controller.base.BaseController;
+import com.shawn.web.exception.MyException;
+import com.shawn.model.entity.TCleanHistory;
+import com.shawn.model.entity.TCleanHistoryExample;
+import com.shawn.model.param.TCleanHistoryParam;
+import com.shawn.service.interfac.TCleanHistoryServiceInterface;
+
+import lombok.extern.apachecommons.CommonsLog;
+@CommonsLog
+@RestController
+@RequestMapping("TCleanHistory")
+public class TCleanHistoryController extends BaseController<TCleanHistory,TCleanHistoryExample,TCleanHistoryParam,Long>{
+	@Autowired
+	private TCleanHistoryServiceInterface tCleanHistoryService;
+	@Autowired
+	public TCleanHistoryController(TCleanHistoryServiceInterface service) {
+		super(service);
+	}
+
+	@Override
+	protected TCleanHistoryExample createNewExample() {
+		return new TCleanHistoryExample();
+	}
+	
+    
+}

+ 0 - 14
src/main/resources/com/shawn/repository/mybatis/GetNoMapper.xml

@@ -1,14 +0,0 @@
-<?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.shawn.repository.GetNoMapper" >
- 
-	<select id="getNo" statementType="CALLABLE" resultType="java.lang.String">  
-	   	 select nextVal(#{tableName,mode=IN,jdbcType=VARCHAR},#{tableDate,mode=IN,jdbcType=VARCHAR})
-	</select> 
-	<!-- 测试数据库连接 -->  
-	<select id="checkDB" resultType="java.lang.Integer">  
-	   	 select 1 from dual
-	</select>   
-	
-	
-</mapper>

+ 331 - 0
src/main/resources/com/shawn/repository/mybatis/TCleanHistoryMapper.xml

@@ -0,0 +1,331 @@
+<?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.shawn.repository.TCleanHistoryMapper">
+  <resultMap id="BaseResultMap" type="com.shawn.model.entity.TCleanHistory">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
+    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="client_id" jdbcType="VARCHAR" property="clientId" />
+    <result column="admin_id" jdbcType="BIGINT" property="adminId" />
+    <result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
+    <result column="water" jdbcType="INTEGER" property="water" />
+    <result column="electricity" jdbcType="INTEGER" property="electricity" />
+  </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, create_date, modify_date, type, client_id, admin_id, equipment_id, water, electricity
+  </sql>
+  <select id="selectByExample" parameterType="com.shawn.model.entity.TCleanHistoryExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_clean_history
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="limit != null">
+      <if test="offset != null">
+        limit ${offset}, ${limit}
+      </if>
+      <if test="offset == null">
+        limit ${limit}
+      </if>
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from t_clean_history
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from t_clean_history
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.shawn.model.entity.TCleanHistoryExample">
+    delete from t_clean_history
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.shawn.model.entity.TCleanHistory">
+    insert into t_clean_history (id, create_date, modify_date, 
+      type, client_id, admin_id, 
+      equipment_id, water, electricity
+      )
+    values (#{id,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP}, 
+      #{type,jdbcType=INTEGER}, #{clientId,jdbcType=VARCHAR}, #{adminId,jdbcType=BIGINT}, 
+      #{equipmentId,jdbcType=BIGINT}, #{water,jdbcType=INTEGER}, #{electricity,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.shawn.model.entity.TCleanHistory">
+    insert into t_clean_history
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="createDate != null">
+        create_date,
+      </if>
+      <if test="modifyDate != null">
+        modify_date,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="clientId != null">
+        client_id,
+      </if>
+      <if test="adminId != null">
+        admin_id,
+      </if>
+      <if test="equipmentId != null">
+        equipment_id,
+      </if>
+      <if test="water != null">
+        water,
+      </if>
+      <if test="electricity != null">
+        electricity,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="createDate != null">
+        #{createDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="modifyDate != null">
+        #{modifyDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="clientId != null">
+        #{clientId,jdbcType=VARCHAR},
+      </if>
+      <if test="adminId != null">
+        #{adminId,jdbcType=BIGINT},
+      </if>
+      <if test="equipmentId != null">
+        #{equipmentId,jdbcType=BIGINT},
+      </if>
+      <if test="water != null">
+        #{water,jdbcType=INTEGER},
+      </if>
+      <if test="electricity != null">
+        #{electricity,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.shawn.model.entity.TCleanHistoryExample" resultType="java.lang.Long">
+    select count(*) from t_clean_history
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update t_clean_history
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.createDate != null">
+        create_date = #{record.createDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.modifyDate != null">
+        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.clientId != null">
+        client_id = #{record.clientId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.adminId != null">
+        admin_id = #{record.adminId,jdbcType=BIGINT},
+      </if>
+      <if test="record.equipmentId != null">
+        equipment_id = #{record.equipmentId,jdbcType=BIGINT},
+      </if>
+      <if test="record.water != null">
+        water = #{record.water,jdbcType=INTEGER},
+      </if>
+      <if test="record.electricity != null">
+        electricity = #{record.electricity,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update t_clean_history
+    set id = #{record.id,jdbcType=BIGINT},
+      create_date = #{record.createDate,jdbcType=TIMESTAMP},
+      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
+      type = #{record.type,jdbcType=INTEGER},
+      client_id = #{record.clientId,jdbcType=VARCHAR},
+      admin_id = #{record.adminId,jdbcType=BIGINT},
+      equipment_id = #{record.equipmentId,jdbcType=BIGINT},
+      water = #{record.water,jdbcType=INTEGER},
+      electricity = #{record.electricity,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.shawn.model.entity.TCleanHistory">
+    update t_clean_history
+    <set>
+      <if test="createDate != null">
+        create_date = #{createDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="modifyDate != null">
+        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="clientId != null">
+        client_id = #{clientId,jdbcType=VARCHAR},
+      </if>
+      <if test="adminId != null">
+        admin_id = #{adminId,jdbcType=BIGINT},
+      </if>
+      <if test="equipmentId != null">
+        equipment_id = #{equipmentId,jdbcType=BIGINT},
+      </if>
+      <if test="water != null">
+        water = #{water,jdbcType=INTEGER},
+      </if>
+      <if test="electricity != null">
+        electricity = #{electricity,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.shawn.model.entity.TCleanHistory">
+    update t_clean_history
+    set create_date = #{createDate,jdbcType=TIMESTAMP},
+      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
+      type = #{type,jdbcType=INTEGER},
+      client_id = #{clientId,jdbcType=VARCHAR},
+      admin_id = #{adminId,jdbcType=BIGINT},
+      equipment_id = #{equipmentId,jdbcType=BIGINT},
+      water = #{water,jdbcType=INTEGER},
+      electricity = #{electricity,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <insert id="insertBatch" parameterType="java.util.List">
+    insert into t_clean_history (id,create_date,modify_date,type,client_id,admin_id,equipment_id,water,electricity)
+    <foreach collection="list" index="index" item="item" separator="union all">
+      select #{item.id,jdbcType=BIGINT},#{item.createDate,jdbcType=TIMESTAMP},#{item.modifyDate,jdbcType=TIMESTAMP},#{item.type,jdbcType=INTEGER},#{item.clientId,jdbcType=VARCHAR},#{item.adminId,jdbcType=BIGINT},#{item.equipmentId,jdbcType=BIGINT},#{item.water,jdbcType=INTEGER},#{item.electricity,jdbcType=INTEGER} from dual
+    </foreach>
+  </insert>
+  <delete id="deleteBatchByIdList" parameterType="java.util.List">
+    DELETE FROM t_clean_history where id in 
+    <foreach close=")" collection="list" item="item" open="(" separator=",">
+      #{item}
+    </foreach>
+  </delete>
+  <update id="updateBatchByIdList" parameterType="com.shawn.model.param.TCleanHistoryParam">
+    update t_clean_history
+    <trim prefix="set" suffixOverrides=",">
+      <if test="id != null">
+        id = #{id},
+      </if>
+      <if test="createDate != null">
+        create_date = #{createDate},
+      </if>
+      <if test="modifyDate != null">
+        modify_date = #{modifyDate},
+      </if>
+      <if test="type != null">
+        type = #{type},
+      </if>
+      <if test="clientId != null">
+        client_id = #{clientId},
+      </if>
+      <if test="adminId != null">
+        admin_id = #{adminId},
+      </if>
+      <if test="equipmentId != null">
+        equipment_id = #{equipmentId},
+      </if>
+      <if test="water != null">
+        water = #{water},
+      </if>
+      <if test="electricity != null">
+        electricity = #{electricity},
+      </if>
+    </trim>
+     where id in 
+    <foreach close=")" collection="primaryKeyList" item="item" open="(" separator=",">
+      #{item}
+    </foreach>
+  </update>
+</mapper>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1096 - 956
src/main/resources/com/shawn/repository/mybatis/TEquipmentMapper.xml