袁野 3 months ago
parent 9285ee697f
commit 886d8da0ba
  1. 89
      service/src/main/java/com/hfkj/dao/SecConfigMapper.java
  2. 7
      service/src/main/java/com/hfkj/dao/SecConfigMapperExt.java
  3. 206
      service/src/main/java/com/hfkj/dao/SecConfigSqlProvider.java
  4. 87
      service/src/main/java/com/hfkj/entity/SecConfig.java
  5. 422
      service/src/main/java/com/hfkj/entity/SecConfigExample.java

@ -0,0 +1,89 @@
package com.hfkj.dao;
import com.hfkj.entity.SecConfig;
import com.hfkj.entity.SecConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface SecConfigMapper extends SecConfigMapperExt {
@SelectProvider(type=SecConfigSqlProvider.class, method="countByExample")
long countByExample(SecConfigExample example);
@DeleteProvider(type=SecConfigSqlProvider.class, method="deleteByExample")
int deleteByExample(SecConfigExample example);
@Delete({
"delete from sec_config",
"where id = #{id,jdbcType=INTEGER}"
})
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into sec_config (code_type, code_value)",
"values (#{codeType,jdbcType=VARCHAR}, #{codeValue,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(SecConfig record);
@InsertProvider(type=SecConfigSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(SecConfig record);
@SelectProvider(type=SecConfigSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="code_type", property="codeType", jdbcType=JdbcType.VARCHAR),
@Result(column="code_value", property="codeValue", jdbcType=JdbcType.VARCHAR)
})
List<SecConfig> selectByExample(SecConfigExample example);
@Select({
"select",
"id, code_type, code_value",
"from sec_config",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="code_type", property="codeType", jdbcType=JdbcType.VARCHAR),
@Result(column="code_value", property="codeValue", jdbcType=JdbcType.VARCHAR)
})
SecConfig selectByPrimaryKey(Integer id);
@UpdateProvider(type=SecConfigSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") SecConfig record, @Param("example") SecConfigExample example);
@UpdateProvider(type=SecConfigSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") SecConfig record, @Param("example") SecConfigExample example);
@UpdateProvider(type=SecConfigSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(SecConfig record);
@Update({
"update sec_config",
"set code_type = #{codeType,jdbcType=VARCHAR},",
"code_value = #{codeValue,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKey(SecConfig record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface SecConfigMapperExt {
}

@ -0,0 +1,206 @@
package com.hfkj.dao;
import com.hfkj.entity.SecConfig;
import com.hfkj.entity.SecConfigExample.Criteria;
import com.hfkj.entity.SecConfigExample.Criterion;
import com.hfkj.entity.SecConfigExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class SecConfigSqlProvider {
public String countByExample(SecConfigExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("sec_config");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(SecConfigExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("sec_config");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(SecConfig record) {
SQL sql = new SQL();
sql.INSERT_INTO("sec_config");
if (record.getCodeType() != null) {
sql.VALUES("code_type", "#{codeType,jdbcType=VARCHAR}");
}
if (record.getCodeValue() != null) {
sql.VALUES("code_value", "#{codeValue,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(SecConfigExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("code_type");
sql.SELECT("code_value");
sql.FROM("sec_config");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
SecConfig record = (SecConfig) parameter.get("record");
SecConfigExample example = (SecConfigExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("sec_config");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getCodeType() != null) {
sql.SET("code_type = #{record.codeType,jdbcType=VARCHAR}");
}
if (record.getCodeValue() != null) {
sql.SET("code_value = #{record.codeValue,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("sec_config");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("code_type = #{record.codeType,jdbcType=VARCHAR}");
sql.SET("code_value = #{record.codeValue,jdbcType=VARCHAR}");
SecConfigExample example = (SecConfigExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(SecConfig record) {
SQL sql = new SQL();
sql.UPDATE("sec_config");
if (record.getCodeType() != null) {
sql.SET("code_type = #{codeType,jdbcType=VARCHAR}");
}
if (record.getCodeValue() != null) {
sql.SET("code_value = #{codeValue,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=INTEGER}");
return sql.toString();
}
protected void applyWhere(SQL sql, SecConfigExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,87 @@
package com.hfkj.entity;
import java.io.Serializable;
/**
* sec_config
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class SecConfig implements Serializable {
private Integer id;
private String codeType;
private String codeValue;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getCodeValue() {
return codeValue;
}
public void setCodeValue(String codeValue) {
this.codeValue = codeValue;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
SecConfig other = (SecConfig) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCodeType() == null ? other.getCodeType() == null : this.getCodeType().equals(other.getCodeType()))
&& (this.getCodeValue() == null ? other.getCodeValue() == null : this.getCodeValue().equals(other.getCodeValue()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCodeType() == null) ? 0 : getCodeType().hashCode());
result = prime * result + ((getCodeValue() == null) ? 0 : getCodeValue().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", codeType=").append(codeType);
sb.append(", codeValue=").append(codeValue);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,422 @@
package com.hfkj.entity;
import java.util.ArrayList;
import java.util.List;
public class SecConfigExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public SecConfigExample() {
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(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
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(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 andCodeTypeIsNull() {
addCriterion("code_type is null");
return (Criteria) this;
}
public Criteria andCodeTypeIsNotNull() {
addCriterion("code_type is not null");
return (Criteria) this;
}
public Criteria andCodeTypeEqualTo(String value) {
addCriterion("code_type =", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeNotEqualTo(String value) {
addCriterion("code_type <>", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeGreaterThan(String value) {
addCriterion("code_type >", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeGreaterThanOrEqualTo(String value) {
addCriterion("code_type >=", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeLessThan(String value) {
addCriterion("code_type <", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeLessThanOrEqualTo(String value) {
addCriterion("code_type <=", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeLike(String value) {
addCriterion("code_type like", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeNotLike(String value) {
addCriterion("code_type not like", value, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeIn(List<String> values) {
addCriterion("code_type in", values, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeNotIn(List<String> values) {
addCriterion("code_type not in", values, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeBetween(String value1, String value2) {
addCriterion("code_type between", value1, value2, "codeType");
return (Criteria) this;
}
public Criteria andCodeTypeNotBetween(String value1, String value2) {
addCriterion("code_type not between", value1, value2, "codeType");
return (Criteria) this;
}
public Criteria andCodeValueIsNull() {
addCriterion("code_value is null");
return (Criteria) this;
}
public Criteria andCodeValueIsNotNull() {
addCriterion("code_value is not null");
return (Criteria) this;
}
public Criteria andCodeValueEqualTo(String value) {
addCriterion("code_value =", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueNotEqualTo(String value) {
addCriterion("code_value <>", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueGreaterThan(String value) {
addCriterion("code_value >", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueGreaterThanOrEqualTo(String value) {
addCriterion("code_value >=", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueLessThan(String value) {
addCriterion("code_value <", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueLessThanOrEqualTo(String value) {
addCriterion("code_value <=", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueLike(String value) {
addCriterion("code_value like", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueNotLike(String value) {
addCriterion("code_value not like", value, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueIn(List<String> values) {
addCriterion("code_value in", values, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueNotIn(List<String> values) {
addCriterion("code_value not in", values, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueBetween(String value1, String value2) {
addCriterion("code_value between", value1, value2, "codeValue");
return (Criteria) this;
}
public Criteria andCodeValueNotBetween(String value1, String value2) {
addCriterion("code_value not between", value1, value2, "codeValue");
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);
}
}
}
Loading…
Cancel
Save