I2新增查询功能和代码优化
parent
f5102276ae
commit
32dbd5ba6c
@ -0,0 +1,8 @@
|
||||
CREATE TABLE `upload_statics` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`check_type` varchar(32) NOT NULL,
|
||||
`first_value` bigint DEFAULT NULL,
|
||||
`upload_time` date DEFAULT NULL COMMENT '上传记录的日期',
|
||||
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='i2上传Id的确认表';
|
@ -0,0 +1,30 @@
|
||||
package com.shxy.i2.dao;
|
||||
|
||||
import com.shxy.i2.entity.Upload_Statics;
|
||||
import com.shxy.i2.entity.Upload_StaticsExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface Upload_StaticsDao {
|
||||
long countByExample(Upload_StaticsExample example);
|
||||
|
||||
int deleteByExample(Upload_StaticsExample example);
|
||||
|
||||
int deleteByPrimaryKey(String checkType);
|
||||
|
||||
int insert(Upload_Statics record);
|
||||
|
||||
int insertSelective(Upload_Statics record);
|
||||
|
||||
List<Upload_Statics> selectByExample(Upload_StaticsExample example);
|
||||
|
||||
Upload_Statics selectByPrimaryKey(String checkType);
|
||||
|
||||
int updateByExampleSelective(@Param("record") Upload_Statics record, @Param("example") Upload_StaticsExample example);
|
||||
|
||||
int updateByExample(@Param("record") Upload_Statics record, @Param("example") Upload_StaticsExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(Upload_Statics record);
|
||||
|
||||
int updateByPrimaryKey(Upload_Statics record);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.shxy.i2.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Upload_Statics implements Serializable {
|
||||
private String checkType;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private BigInteger firstValue;
|
||||
|
||||
private Date uploadTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,538 @@
|
||||
package com.shxy.i2.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class Upload_StaticsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public Upload_StaticsExample() {
|
||||
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));
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
addCriterion(condition, new java.sql.Date(value.getTime()), property);
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
|
||||
if (values == null || values.size() == 0) {
|
||||
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
|
||||
}
|
||||
List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
|
||||
Iterator<Date> iter = values.iterator();
|
||||
while (iter.hasNext()) {
|
||||
dateList.add(new java.sql.Date(iter.next().getTime()));
|
||||
}
|
||||
addCriterion(condition, dateList, property);
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeIsNull() {
|
||||
addCriterion("check_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeIsNotNull() {
|
||||
addCriterion("check_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeEqualTo(String value) {
|
||||
addCriterion("check_type =", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeNotEqualTo(String value) {
|
||||
addCriterion("check_type <>", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeGreaterThan(String value) {
|
||||
addCriterion("check_type >", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("check_type >=", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeLessThan(String value) {
|
||||
addCriterion("check_type <", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("check_type <=", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeLike(String value) {
|
||||
addCriterion("check_type like", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeNotLike(String value) {
|
||||
addCriterion("check_type not like", value, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeIn(List<String> values) {
|
||||
addCriterion("check_type in", values, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeNotIn(List<String> values) {
|
||||
addCriterion("check_type not in", values, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeBetween(String value1, String value2) {
|
||||
addCriterion("check_type between", value1, value2, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCheckTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("check_type not between", value1, value2, "checkType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueIsNull() {
|
||||
addCriterion("first_value is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueIsNotNull() {
|
||||
addCriterion("first_value is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueEqualTo(Long value) {
|
||||
addCriterion("first_value =", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueNotEqualTo(Long value) {
|
||||
addCriterion("first_value <>", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueGreaterThan(Long value) {
|
||||
addCriterion("first_value >", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("first_value >=", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueLessThan(Long value) {
|
||||
addCriterion("first_value <", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueLessThanOrEqualTo(Long value) {
|
||||
addCriterion("first_value <=", value, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueIn(List<Long> values) {
|
||||
addCriterion("first_value in", values, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueNotIn(List<Long> values) {
|
||||
addCriterion("first_value not in", values, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueBetween(Long value1, Long value2) {
|
||||
addCriterion("first_value between", value1, value2, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFirstValueNotBetween(Long value1, Long value2) {
|
||||
addCriterion("first_value not between", value1, value2, "firstValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeIsNull() {
|
||||
addCriterion("upload_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeIsNotNull() {
|
||||
addCriterion("upload_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeEqualTo(Date value) {
|
||||
addCriterionForJDBCDate("upload_time =", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeNotEqualTo(Date value) {
|
||||
addCriterionForJDBCDate("upload_time <>", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeGreaterThan(Date value) {
|
||||
addCriterionForJDBCDate("upload_time >", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterionForJDBCDate("upload_time >=", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeLessThan(Date value) {
|
||||
addCriterionForJDBCDate("upload_time <", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterionForJDBCDate("upload_time <=", value, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeIn(List<Date> values) {
|
||||
addCriterionForJDBCDate("upload_time in", values, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeNotIn(List<Date> values) {
|
||||
addCriterionForJDBCDate("upload_time not in", values, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeBetween(Date value1, Date value2) {
|
||||
addCriterionForJDBCDate("upload_time between", value1, value2, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUploadTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterionForJDBCDate("upload_time not between", value1, value2, "uploadTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
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,388 @@
|
||||
<?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.i2.dao.Upload_StaticsDao">
|
||||
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Upload_Statics">
|
||||
<id column="check_type" jdbcType="VARCHAR" property="checkType" />
|
||||
<result column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="first_value" jdbcType="BIGINT" property="firstValue" />
|
||||
<result column="upload_time" jdbcType="DATE" property="uploadTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</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">
|
||||
check_type, id, first_value, upload_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from upload_statics
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from upload_statics
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample">
|
||||
delete from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
insert into upload_statics (check_type, id, first_value,
|
||||
upload_time, update_time)
|
||||
values (#{checkType,jdbcType=VARCHAR}, #{id,jdbcType=INTEGER}, #{firstValue,jdbcType=BIGINT},
|
||||
#{uploadTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
insert into upload_statics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkType != null">
|
||||
check_type,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="firstValue != null">
|
||||
first_value,
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
upload_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkType != null">
|
||||
#{checkType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="firstValue != null">
|
||||
#{firstValue,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
#{uploadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample" resultType="java.lang.Long">
|
||||
select count(*) from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update upload_statics
|
||||
<set>
|
||||
<if test="record.checkType != null">
|
||||
check_type = #{record.checkType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.firstValue != null">
|
||||
first_value = #{record.firstValue,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.uploadTime != null">
|
||||
upload_time = #{record.uploadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update upload_statics
|
||||
set check_type = #{record.checkType,jdbcType=VARCHAR},
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
first_value = #{record.firstValue,jdbcType=BIGINT},
|
||||
upload_time = #{record.uploadTime,jdbcType=DATE},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
update upload_statics
|
||||
<set>
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="firstValue != null">
|
||||
first_value = #{firstValue,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
upload_time = #{uploadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
update upload_statics
|
||||
set id = #{id,jdbcType=INTEGER},
|
||||
first_value = #{firstValue,jdbcType=BIGINT},
|
||||
upload_time = #{uploadTime,jdbcType=DATE},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Upload_Statics">
|
||||
<id column="check_type" jdbcType="VARCHAR" property="checkType" />
|
||||
<result column="value" jdbcType="BIGINT" property="value" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</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">
|
||||
check_type, value, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from upload_statics
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from upload_statics
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample">
|
||||
delete from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
insert into upload_statics (check_type, value, update_time
|
||||
)
|
||||
values (#{checkType,jdbcType=VARCHAR}, #{value,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
insert into upload_statics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkType != null">
|
||||
check_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
value,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkType != null">
|
||||
#{checkType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
#{value,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.shxy.i2.entity.Upload_StaticsExample" resultType="java.lang.Long">
|
||||
select count(*) from upload_statics
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update upload_statics
|
||||
<set>
|
||||
<if test="record.checkType != null">
|
||||
check_type = #{record.checkType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.value != null">
|
||||
value = #{record.value,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update upload_statics
|
||||
set check_type = #{record.checkType,jdbcType=VARCHAR},
|
||||
value = #{record.value,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
update upload_statics
|
||||
<set>
|
||||
<if test="value != null">
|
||||
value = #{value,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Upload_Statics">
|
||||
update upload_statics
|
||||
set value = #{value,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where check_type = #{checkType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue