设备故障接口新增
parent
e4e37d6c74
commit
07fc9ce119
@ -0,0 +1,44 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
@Data
|
||||
public class TerminalFaults implements Serializable {
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private BigInteger id;
|
||||
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private Integer termId;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("设备编号")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private String cmdid;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("故障时间")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private Date faultTime;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("故障编号")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private Integer faultCode;
|
||||
|
||||
@ExcelProperty("故障名称")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private String msg;
|
||||
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,571 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalFaultsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TerminalFaultsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(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 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 andFaultTimeIsNull() {
|
||||
addCriterion("fault_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeIsNotNull() {
|
||||
addCriterion("fault_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeEqualTo(Date value) {
|
||||
addCriterion("fault_time =", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeNotEqualTo(Date value) {
|
||||
addCriterion("fault_time <>", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeGreaterThan(Date value) {
|
||||
addCriterion("fault_time >", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("fault_time >=", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeLessThan(Date value) {
|
||||
addCriterion("fault_time <", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("fault_time <=", value, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeIn(List<Date> values) {
|
||||
addCriterion("fault_time in", values, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeNotIn(List<Date> values) {
|
||||
addCriterion("fault_time not in", values, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("fault_time between", value1, value2, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("fault_time not between", value1, value2, "faultTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeIsNull() {
|
||||
addCriterion("fault_code is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeIsNotNull() {
|
||||
addCriterion("fault_code is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeEqualTo(Integer value) {
|
||||
addCriterion("fault_code =", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeNotEqualTo(Integer value) {
|
||||
addCriterion("fault_code <>", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeGreaterThan(Integer value) {
|
||||
addCriterion("fault_code >", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("fault_code >=", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeLessThan(Integer value) {
|
||||
addCriterion("fault_code <", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("fault_code <=", value, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeIn(List<Integer> values) {
|
||||
addCriterion("fault_code in", values, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeNotIn(List<Integer> values) {
|
||||
addCriterion("fault_code not in", values, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fault_code between", value1, value2, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFaultCodeNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fault_code not between", value1, value2, "faultCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIsNull() {
|
||||
addCriterion("msg is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIsNotNull() {
|
||||
addCriterion("msg is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgEqualTo(String value) {
|
||||
addCriterion("msg =", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotEqualTo(String value) {
|
||||
addCriterion("msg <>", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgGreaterThan(String value) {
|
||||
addCriterion("msg >", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("msg >=", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLessThan(String value) {
|
||||
addCriterion("msg <", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLessThanOrEqualTo(String value) {
|
||||
addCriterion("msg <=", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLike(String value) {
|
||||
addCriterion("msg like", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotLike(String value) {
|
||||
addCriterion("msg not like", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIn(List<String> values) {
|
||||
addCriterion("msg in", values, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotIn(List<String> values) {
|
||||
addCriterion("msg not in", values, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgBetween(String value1, String value2) {
|
||||
addCriterion("msg between", value1, value2, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotBetween(String value1, String value2) {
|
||||
addCriterion("msg not between", value1, value2, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "装置故障对象", description = "装置故障对象")
|
||||
public class TermFaultsVo {
|
||||
|
||||
@NotEmpty(message = "不能传入空值")
|
||||
@ApiModelProperty(value = "装置编号", required = true, example = "A0001")
|
||||
private Integer termid;
|
||||
|
||||
@Min(value = 1, message = "分页位置最小从1开始")
|
||||
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
|
||||
private int pageindex;
|
||||
|
||||
@Min(value = 1, message = "分页大小最小为1")
|
||||
@ApiModelProperty(value = "分页大小", required = true, example = "1")
|
||||
private int pagesize;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", example = "123455")
|
||||
private DateTime starttime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", example = "123455")
|
||||
private DateTime endtime;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.shxy.xymanager_dao.dao;
|
||||
|
||||
import com.shxy.xymanager_common.entity.TerminalFaults;
|
||||
import com.shxy.xymanager_common.entity.TerminalFaultsExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TerminalFaultsDao {
|
||||
long countByExample(TerminalFaultsExample example);
|
||||
|
||||
int deleteByExample(TerminalFaultsExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(TerminalFaults record);
|
||||
|
||||
int insertSelective(TerminalFaults record);
|
||||
|
||||
List<TerminalFaults> selectByExample(TerminalFaultsExample example);
|
||||
|
||||
TerminalFaults selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TerminalFaults record, @Param("example") TerminalFaultsExample example);
|
||||
|
||||
int updateByExample(@Param("record") TerminalFaults record, @Param("example") TerminalFaultsExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TerminalFaults record);
|
||||
|
||||
int updateByPrimaryKey(TerminalFaults record);
|
||||
}
|
@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.shxy.xymanager_dao.dao.TerminalFaultsDao">
|
||||
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalFaults">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="term_id" jdbcType="INTEGER" property="termId" />
|
||||
<result column="fault_time" jdbcType="TIMESTAMP" property="faultTime" />
|
||||
<result column="fault_code" jdbcType="INTEGER" property="faultCode" />
|
||||
<result column="msg" jdbcType="VARCHAR" property="msg" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, term_id, fault_time, fault_code, msg, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalFaultsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from terminal_faults
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from terminal_faults
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from terminal_faults
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalFaultsExample">
|
||||
delete from terminal_faults
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalFaults">
|
||||
insert into terminal_faults (id, term_id, fault_time,
|
||||
fault_code, msg, create_time
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{termId,jdbcType=INTEGER}, #{faultTime,jdbcType=TIMESTAMP},
|
||||
#{faultCode,jdbcType=INTEGER}, #{msg,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalFaults">
|
||||
insert into terminal_faults
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="termId != null">
|
||||
term_id,
|
||||
</if>
|
||||
<if test="faultTime != null">
|
||||
fault_time,
|
||||
</if>
|
||||
<if test="faultCode != null">
|
||||
fault_code,
|
||||
</if>
|
||||
<if test="msg != null">
|
||||
msg,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="termId != null">
|
||||
#{termId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="faultTime != null">
|
||||
#{faultTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="faultCode != null">
|
||||
#{faultCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="msg != null">
|
||||
#{msg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalFaultsExample" resultType="java.lang.Long">
|
||||
select count(*) from terminal_faults
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update terminal_faults
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.termId != null">
|
||||
term_id = #{record.termId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.faultTime != null">
|
||||
fault_time = #{record.faultTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.faultCode != null">
|
||||
fault_code = #{record.faultCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.msg != null">
|
||||
msg = #{record.msg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update terminal_faults
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
term_id = #{record.termId,jdbcType=INTEGER},
|
||||
fault_time = #{record.faultTime,jdbcType=TIMESTAMP},
|
||||
fault_code = #{record.faultCode,jdbcType=INTEGER},
|
||||
msg = #{record.msg,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalFaults">
|
||||
update terminal_faults
|
||||
<set>
|
||||
<if test="termId != null">
|
||||
term_id = #{termId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="faultTime != null">
|
||||
fault_time = #{faultTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="faultCode != null">
|
||||
fault_code = #{faultCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="msg != null">
|
||||
msg = #{msg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalFaults">
|
||||
update terminal_faults
|
||||
set term_id = #{termId,jdbcType=INTEGER},
|
||||
fault_time = #{faultTime,jdbcType=TIMESTAMP},
|
||||
fault_code = #{faultCode,jdbcType=INTEGER},
|
||||
msg = #{msg,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue