袁野 4 months ago
parent f089a8882b
commit ed3456db81
  1. 31
      service/src/main/java/com/hfkj/dao/CmsContentMapper.java
  2. 14
      service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java
  3. 18
      service/src/main/java/com/hfkj/entity/CmsContent.java
  4. 70
      service/src/main/java/com/hfkj/entity/CmsContentExample.java

@ -39,16 +39,18 @@ public interface CmsContentMapper extends CmsContentMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into cms_content (code, `name`, ",
"img, jump_type, jump_url, ",
"appid, create_time, ",
"update_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ",
"#{img,jdbcType=VARCHAR}, #{jumpType,jdbcType=INTEGER}, #{jumpUrl,jdbcType=VARCHAR}, ",
"#{appid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"insert into cms_content (platform_code, code, ",
"`name`, img, jump_type, ",
"jump_url, appid, ",
"create_time, update_time, ",
"`status`, ext_1, ext_2, ",
"ext_3)",
"values (#{platformCode,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, ",
"#{name,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{jumpType,jdbcType=INTEGER}, ",
"#{jumpUrl,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(CmsContent record);
@ -60,6 +62,7 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@SelectProvider(type=CmsContentSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@ -77,13 +80,14 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Select({
"select",
"id, code, `name`, img, jump_type, jump_url, appid, create_time, update_time, ",
"`status`, ext_1, ext_2, ext_3",
"id, platform_code, code, `name`, img, jump_type, jump_url, appid, create_time, ",
"update_time, `status`, ext_1, ext_2, ext_3",
"from cms_content",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR),
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@ -110,7 +114,8 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Update({
"update cms_content",
"set code = #{code,jdbcType=VARCHAR},",
"set platform_code = #{platformCode,jdbcType=VARCHAR},",
"code = #{code,jdbcType=VARCHAR},",
"`name` = #{name,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"jump_type = #{jumpType,jdbcType=INTEGER},",

@ -28,6 +28,10 @@ public class CmsContentSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("cms_content");
if (record.getPlatformCode() != null) {
sql.VALUES("platform_code", "#{platformCode,jdbcType=VARCHAR}");
}
if (record.getCode() != null) {
sql.VALUES("code", "#{code,jdbcType=VARCHAR}");
}
@ -86,6 +90,7 @@ public class CmsContentSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("platform_code");
sql.SELECT("code");
sql.SELECT("`name`");
sql.SELECT("img");
@ -119,6 +124,10 @@ public class CmsContentSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getPlatformCode() != null) {
sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}");
}
if (record.getCode() != null) {
sql.SET("code = #{record.code,jdbcType=VARCHAR}");
}
@ -176,6 +185,7 @@ public class CmsContentSqlProvider {
sql.UPDATE("cms_content");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}");
sql.SET("code = #{record.code,jdbcType=VARCHAR}");
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
@ -198,6 +208,10 @@ public class CmsContentSqlProvider {
SQL sql = new SQL();
sql.UPDATE("cms_content");
if (record.getPlatformCode() != null) {
sql.SET("platform_code = #{platformCode,jdbcType=VARCHAR}");
}
if (record.getCode() != null) {
sql.SET("code = #{code,jdbcType=VARCHAR}");
}

@ -18,6 +18,11 @@ public class CmsContent implements Serializable {
*/
private Long id;
/**
* 登录平台code
*/
private String platformCode;
/**
* 编码
*/
@ -79,6 +84,14 @@ public class CmsContent implements Serializable {
this.id = id;
}
public String getPlatformCode() {
return platformCode;
}
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
}
public String getCode() {
return code;
}
@ -188,6 +201,7 @@ public class CmsContent implements Serializable {
}
CmsContent other = (CmsContent) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode()))
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
@ -207,6 +221,7 @@ public class CmsContent implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
@ -229,6 +244,7 @@ public class CmsContent implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", platformCode=").append(platformCode);
sb.append(", code=").append(code);
sb.append(", name=").append(name);
sb.append(", img=").append(img);
@ -245,4 +261,4 @@ public class CmsContent implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -185,6 +185,76 @@ public class CmsContentExample {
return (Criteria) this;
}
public Criteria andPlatformCodeIsNull() {
addCriterion("platform_code is null");
return (Criteria) this;
}
public Criteria andPlatformCodeIsNotNull() {
addCriterion("platform_code is not null");
return (Criteria) this;
}
public Criteria andPlatformCodeEqualTo(String value) {
addCriterion("platform_code =", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeNotEqualTo(String value) {
addCriterion("platform_code <>", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeGreaterThan(String value) {
addCriterion("platform_code >", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeGreaterThanOrEqualTo(String value) {
addCriterion("platform_code >=", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeLessThan(String value) {
addCriterion("platform_code <", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeLessThanOrEqualTo(String value) {
addCriterion("platform_code <=", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeLike(String value) {
addCriterion("platform_code like", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeNotLike(String value) {
addCriterion("platform_code not like", value, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeIn(List<String> values) {
addCriterion("platform_code in", values, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeNotIn(List<String> values) {
addCriterion("platform_code not in", values, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeBetween(String value1, String value2) {
addCriterion("platform_code between", value1, value2, "platformCode");
return (Criteria) this;
}
public Criteria andPlatformCodeNotBetween(String value1, String value2) {
addCriterion("platform_code not between", value1, value2, "platformCode");
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;

Loading…
Cancel
Save