'生成实体'

dev-discount
= 4 years ago
parent eb66397d73
commit eee299b606
  1. 25
      hai-service/src/main/java/com/hai/dao/SecSinopecConfigMapper.java
  2. 30
      hai-service/src/main/java/com/hai/dao/SecSinopecConfigSqlProvider.java
  3. 36
      hai-service/src/main/java/com/hai/entity/SecSinopecConfig.java
  4. 126
      hai-service/src/main/java/com/hai/entity/SecSinopecConfigExample.java

@ -39,12 +39,12 @@ public interface SecSinopecConfigMapper extends SecSinopecConfigMapperExt {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@Insert({ @Insert({
"insert into sec_sinopec_config (app_id, app_secret, ", "insert into sec_sinopec_config (`name`, app_secret, ",
"code, create_time, ", "code, create_time, ",
"SignKey)", "SignKey, app_id)",
"values (#{appId,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, ", "values (#{name,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, ",
"#{code,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{code,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{signkey,jdbcType=VARCHAR})" "#{signkey,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(SecSinopecConfig record); int insert(SecSinopecConfig record);
@ -56,27 +56,29 @@ public interface SecSinopecConfigMapper extends SecSinopecConfigMapperExt {
@SelectProvider(type=SecSinopecConfigSqlProvider.class, method="selectByExample") @SelectProvider(type=SecSinopecConfigSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR), @Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR) @Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR),
@Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR)
}) })
List<SecSinopecConfig> selectByExample(SecSinopecConfigExample example); List<SecSinopecConfig> selectByExample(SecSinopecConfigExample example);
@Select({ @Select({
"select", "select",
"id, app_id, app_secret, code, create_time, SignKey", "id, `name`, app_secret, code, create_time, SignKey, app_id",
"from sec_sinopec_config", "from sec_sinopec_config",
"where id = #{id,jdbcType=INTEGER}" "where id = #{id,jdbcType=INTEGER}"
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR), @Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR) @Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR),
@Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR)
}) })
SecSinopecConfig selectByPrimaryKey(Integer id); SecSinopecConfig selectByPrimaryKey(Integer id);
@ -91,11 +93,12 @@ public interface SecSinopecConfigMapper extends SecSinopecConfigMapperExt {
@Update({ @Update({
"update sec_sinopec_config", "update sec_sinopec_config",
"set app_id = #{appId,jdbcType=VARCHAR},", "set `name` = #{name,jdbcType=VARCHAR},",
"app_secret = #{appSecret,jdbcType=VARCHAR},", "app_secret = #{appSecret,jdbcType=VARCHAR},",
"code = #{code,jdbcType=VARCHAR},", "code = #{code,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"SignKey = #{signkey,jdbcType=VARCHAR}", "SignKey = #{signkey,jdbcType=VARCHAR},",
"app_id = #{appId,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=INTEGER}" "where id = #{id,jdbcType=INTEGER}"
}) })
int updateByPrimaryKey(SecSinopecConfig record); int updateByPrimaryKey(SecSinopecConfig record);

@ -28,8 +28,8 @@ public class SecSinopecConfigSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("sec_sinopec_config"); sql.INSERT_INTO("sec_sinopec_config");
if (record.getAppId() != null) { if (record.getName() != null) {
sql.VALUES("app_id", "#{appId,jdbcType=VARCHAR}"); sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}");
} }
if (record.getAppSecret() != null) { if (record.getAppSecret() != null) {
@ -48,6 +48,10 @@ public class SecSinopecConfigSqlProvider {
sql.VALUES("SignKey", "#{signkey,jdbcType=VARCHAR}"); sql.VALUES("SignKey", "#{signkey,jdbcType=VARCHAR}");
} }
if (record.getAppId() != null) {
sql.VALUES("app_id", "#{appId,jdbcType=VARCHAR}");
}
return sql.toString(); return sql.toString();
} }
@ -58,11 +62,12 @@ public class SecSinopecConfigSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("app_id"); sql.SELECT("`name`");
sql.SELECT("app_secret"); sql.SELECT("app_secret");
sql.SELECT("code"); sql.SELECT("code");
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("SignKey"); sql.SELECT("SignKey");
sql.SELECT("app_id");
sql.FROM("sec_sinopec_config"); sql.FROM("sec_sinopec_config");
applyWhere(sql, example, false); applyWhere(sql, example, false);
@ -84,8 +89,8 @@ public class SecSinopecConfigSqlProvider {
sql.SET("id = #{record.id,jdbcType=INTEGER}"); sql.SET("id = #{record.id,jdbcType=INTEGER}");
} }
if (record.getAppId() != null) { if (record.getName() != null) {
sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
} }
if (record.getAppSecret() != null) { if (record.getAppSecret() != null) {
@ -104,6 +109,10 @@ public class SecSinopecConfigSqlProvider {
sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}"); sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}");
} }
if (record.getAppId() != null) {
sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true); applyWhere(sql, example, true);
return sql.toString(); return sql.toString();
} }
@ -113,11 +122,12 @@ public class SecSinopecConfigSqlProvider {
sql.UPDATE("sec_sinopec_config"); sql.UPDATE("sec_sinopec_config");
sql.SET("id = #{record.id,jdbcType=INTEGER}"); sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("app_secret = #{record.appSecret,jdbcType=VARCHAR}"); sql.SET("app_secret = #{record.appSecret,jdbcType=VARCHAR}");
sql.SET("code = #{record.code,jdbcType=VARCHAR}"); sql.SET("code = #{record.code,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}"); sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}");
sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}");
SecSinopecConfigExample example = (SecSinopecConfigExample) parameter.get("example"); SecSinopecConfigExample example = (SecSinopecConfigExample) parameter.get("example");
applyWhere(sql, example, true); applyWhere(sql, example, true);
@ -128,8 +138,8 @@ public class SecSinopecConfigSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("sec_sinopec_config"); sql.UPDATE("sec_sinopec_config");
if (record.getAppId() != null) { if (record.getName() != null) {
sql.SET("app_id = #{appId,jdbcType=VARCHAR}"); sql.SET("`name` = #{name,jdbcType=VARCHAR}");
} }
if (record.getAppSecret() != null) { if (record.getAppSecret() != null) {
@ -148,6 +158,10 @@ public class SecSinopecConfigSqlProvider {
sql.SET("SignKey = #{signkey,jdbcType=VARCHAR}"); sql.SET("SignKey = #{signkey,jdbcType=VARCHAR}");
} }
if (record.getAppId() != null) {
sql.SET("app_id = #{appId,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=INTEGER}"); sql.WHERE("id = #{id,jdbcType=INTEGER}");
return sql.toString(); return sql.toString();

@ -19,9 +19,9 @@ public class SecSinopecConfig implements Serializable {
private Integer id; private Integer id;
/** /**
* 客户AppId * 中石化客户名称
*/ */
private String appId; private String name;
/** /**
* 客户密码 * 客户密码
@ -43,6 +43,11 @@ public class SecSinopecConfig implements Serializable {
*/ */
private String signkey; private String signkey;
/**
* 客户AppId
*/
private String appId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Integer getId() { public Integer getId() {
@ -53,12 +58,12 @@ public class SecSinopecConfig implements Serializable {
this.id = id; this.id = id;
} }
public String getAppId() { public String getName() {
return appId; return name;
} }
public void setAppId(String appId) { public void setName(String name) {
this.appId = appId; this.name = name;
} }
public String getAppSecret() { public String getAppSecret() {
@ -93,6 +98,14 @@ public class SecSinopecConfig implements Serializable {
this.signkey = signkey; this.signkey = signkey;
} }
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
@Override @Override
public boolean equals(Object that) { public boolean equals(Object that) {
if (this == that) { if (this == that) {
@ -106,11 +119,12 @@ public class SecSinopecConfig implements Serializable {
} }
SecSinopecConfig other = (SecSinopecConfig) that; SecSinopecConfig other = (SecSinopecConfig) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret())) && (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret()))
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getSignkey() == null ? other.getSignkey() == null : this.getSignkey().equals(other.getSignkey())); && (this.getSignkey() == null ? other.getSignkey() == null : this.getSignkey().equals(other.getSignkey()))
&& (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()));
} }
@Override @Override
@ -118,11 +132,12 @@ public class SecSinopecConfig implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getAppSecret() == null) ? 0 : getAppSecret().hashCode()); result = prime * result + ((getAppSecret() == null) ? 0 : getAppSecret().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getSignkey() == null) ? 0 : getSignkey().hashCode()); result = prime * result + ((getSignkey() == null) ? 0 : getSignkey().hashCode());
result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
return result; return result;
} }
@ -133,11 +148,12 @@ public class SecSinopecConfig implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", appId=").append(appId); sb.append(", name=").append(name);
sb.append(", appSecret=").append(appSecret); sb.append(", appSecret=").append(appSecret);
sb.append(", code=").append(code); sb.append(", code=").append(code);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", signkey=").append(signkey); sb.append(", signkey=").append(signkey);
sb.append(", appId=").append(appId);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();

@ -185,73 +185,73 @@ public class SecSinopecConfigExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdIsNull() { public Criteria andNameIsNull() {
addCriterion("app_id is null"); addCriterion("`name` is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdIsNotNull() { public Criteria andNameIsNotNull() {
addCriterion("app_id is not null"); addCriterion("`name` is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdEqualTo(String value) { public Criteria andNameEqualTo(String value) {
addCriterion("app_id =", value, "appId"); addCriterion("`name` =", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdNotEqualTo(String value) { public Criteria andNameNotEqualTo(String value) {
addCriterion("app_id <>", value, "appId"); addCriterion("`name` <>", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdGreaterThan(String value) { public Criteria andNameGreaterThan(String value) {
addCriterion("app_id >", value, "appId"); addCriterion("`name` >", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdGreaterThanOrEqualTo(String value) { public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("app_id >=", value, "appId"); addCriterion("`name` >=", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdLessThan(String value) { public Criteria andNameLessThan(String value) {
addCriterion("app_id <", value, "appId"); addCriterion("`name` <", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdLessThanOrEqualTo(String value) { public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("app_id <=", value, "appId"); addCriterion("`name` <=", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdLike(String value) { public Criteria andNameLike(String value) {
addCriterion("app_id like", value, "appId"); addCriterion("`name` like", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdNotLike(String value) { public Criteria andNameNotLike(String value) {
addCriterion("app_id not like", value, "appId"); addCriterion("`name` not like", value, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdIn(List<String> values) { public Criteria andNameIn(List<String> values) {
addCriterion("app_id in", values, "appId"); addCriterion("`name` in", values, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdNotIn(List<String> values) { public Criteria andNameNotIn(List<String> values) {
addCriterion("app_id not in", values, "appId"); addCriterion("`name` not in", values, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdBetween(String value1, String value2) { public Criteria andNameBetween(String value1, String value2) {
addCriterion("app_id between", value1, value2, "appId"); addCriterion("`name` between", value1, value2, "name");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdNotBetween(String value1, String value2) { public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("app_id not between", value1, value2, "appId"); addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this; return (Criteria) this;
} }
@ -524,6 +524,76 @@ public class SecSinopecConfigExample {
addCriterion("SignKey not between", value1, value2, "signkey"); addCriterion("SignKey not between", value1, value2, "signkey");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAppIdIsNull() {
addCriterion("app_id is null");
return (Criteria) this;
}
public Criteria andAppIdIsNotNull() {
addCriterion("app_id is not null");
return (Criteria) this;
}
public Criteria andAppIdEqualTo(String value) {
addCriterion("app_id =", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdNotEqualTo(String value) {
addCriterion("app_id <>", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdGreaterThan(String value) {
addCriterion("app_id >", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdGreaterThanOrEqualTo(String value) {
addCriterion("app_id >=", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdLessThan(String value) {
addCriterion("app_id <", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdLessThanOrEqualTo(String value) {
addCriterion("app_id <=", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdLike(String value) {
addCriterion("app_id like", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdNotLike(String value) {
addCriterion("app_id not like", value, "appId");
return (Criteria) this;
}
public Criteria andAppIdIn(List<String> values) {
addCriterion("app_id in", values, "appId");
return (Criteria) this;
}
public Criteria andAppIdNotIn(List<String> values) {
addCriterion("app_id not in", values, "appId");
return (Criteria) this;
}
public Criteria andAppIdBetween(String value1, String value2) {
addCriterion("app_id between", value1, value2, "appId");
return (Criteria) this;
}
public Criteria andAppIdNotBetween(String value1, String value2) {
addCriterion("app_id not between", value1, value2, "appId");
return (Criteria) this;
}
} }
/** /**

Loading…
Cancel
Save