From e0c724fccf66ffb5f71de07f78945b95c543bb84 Mon Sep 17 00:00:00 2001 From: YuanYe <418471657@qq.com> Date: Mon, 11 Nov 2024 10:50:02 +0800 Subject: [PATCH] 1 --- .../java/com/hfkj/dao/CmsContentMapper.java | 23 ++--- .../com/hfkj/dao/CmsContentSqlProvider.java | 14 +++ .../main/java/com/hfkj/entity/CmsContent.java | 87 +++---------------- .../com/hfkj/entity/CmsContentExample.java | 60 +++++++++++++ 4 files changed, 100 insertions(+), 84 deletions(-) diff --git a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java index c68e1a7..9be4071 100644 --- a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java +++ b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java @@ -41,16 +41,16 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Insert({ "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)", + "show_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})" + "#{showType,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); @@ -67,6 +67,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), + @Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER), @Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR), @Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @@ -80,8 +81,8 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Select({ "select", - "id, platform_code, 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, show_type, jump_url, appid, ", + "create_time, update_time, `status`, ext_1, ext_2, ext_3", "from cms_content", "where id = #{id,jdbcType=BIGINT}" }) @@ -92,6 +93,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), + @Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER), @Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR), @Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @@ -119,6 +121,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "`name` = #{name,jdbcType=VARCHAR},", "img = #{img,jdbcType=VARCHAR},", "jump_type = #{jumpType,jdbcType=INTEGER},", + "show_type = #{showType,jdbcType=INTEGER},", "jump_url = #{jumpUrl,jdbcType=VARCHAR},", "appid = #{appid,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", diff --git a/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java b/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java index e2a8cb2..6fb0d43 100644 --- a/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java @@ -48,6 +48,10 @@ public class CmsContentSqlProvider { sql.VALUES("jump_type", "#{jumpType,jdbcType=INTEGER}"); } + if (record.getShowType() != null) { + sql.VALUES("show_type", "#{showType,jdbcType=INTEGER}"); + } + if (record.getJumpUrl() != null) { sql.VALUES("jump_url", "#{jumpUrl,jdbcType=VARCHAR}"); } @@ -95,6 +99,7 @@ public class CmsContentSqlProvider { sql.SELECT("`name`"); sql.SELECT("img"); sql.SELECT("jump_type"); + sql.SELECT("show_type"); sql.SELECT("jump_url"); sql.SELECT("appid"); sql.SELECT("create_time"); @@ -144,6 +149,10 @@ public class CmsContentSqlProvider { sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); } + if (record.getShowType() != null) { + sql.SET("show_type = #{record.showType,jdbcType=INTEGER}"); + } + if (record.getJumpUrl() != null) { sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}"); } @@ -190,6 +199,7 @@ public class CmsContentSqlProvider { sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); sql.SET("img = #{record.img,jdbcType=VARCHAR}"); sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); + sql.SET("show_type = #{record.showType,jdbcType=INTEGER}"); sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}"); sql.SET("appid = #{record.appid,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); @@ -228,6 +238,10 @@ public class CmsContentSqlProvider { sql.SET("jump_type = #{jumpType,jdbcType=INTEGER}"); } + if (record.getShowType() != null) { + sql.SET("show_type = #{showType,jdbcType=INTEGER}"); + } + if (record.getJumpUrl() != null) { sql.SET("jump_url = #{jumpUrl,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/entity/CmsContent.java b/service/src/main/java/com/hfkj/entity/CmsContent.java index 7e96965..eb389ec 100644 --- a/service/src/main/java/com/hfkj/entity/CmsContent.java +++ b/service/src/main/java/com/hfkj/entity/CmsContent.java @@ -43,6 +43,11 @@ public class CmsContent implements Serializable { */ private Integer jumpType; + /** + * 展示类型:1:数据展示 + */ + private Integer showType; + /** * 跳转地址 */ @@ -124,6 +129,14 @@ public class CmsContent implements Serializable { this.jumpType = jumpType; } + public Integer getShowType() { + return showType; + } + + public void setShowType(Integer showType) { + this.showType = showType; + } + public String getJumpUrl() { return jumpUrl; } @@ -187,78 +200,4 @@ public class CmsContent implements Serializable { public void setExt3(String ext3) { this.ext3 = ext3; } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - 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())) - && (this.getJumpType() == null ? other.getJumpType() == null : this.getJumpType().equals(other.getJumpType())) - && (this.getJumpUrl() == null ? other.getJumpUrl() == null : this.getJumpUrl().equals(other.getJumpUrl())) - && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) - && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) - && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); - } - - @Override - public int hashCode() { - 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()); - result = prime * result + ((getJumpType() == null) ? 0 : getJumpType().hashCode()); - result = prime * result + ((getJumpUrl() == null) ? 0 : getJumpUrl().hashCode()); - result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); - result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); - result = prime * result + ((getExt3() == null) ? 0 : getExt3().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(", platformCode=").append(platformCode); - sb.append(", code=").append(code); - sb.append(", name=").append(name); - sb.append(", img=").append(img); - sb.append(", jumpType=").append(jumpType); - sb.append(", jumpUrl=").append(jumpUrl); - sb.append(", appid=").append(appid); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append(", status=").append(status); - sb.append(", ext1=").append(ext1); - sb.append(", ext2=").append(ext2); - sb.append(", ext3=").append(ext3); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/CmsContentExample.java b/service/src/main/java/com/hfkj/entity/CmsContentExample.java index 0289f9e..3a0545a 100644 --- a/service/src/main/java/com/hfkj/entity/CmsContentExample.java +++ b/service/src/main/java/com/hfkj/entity/CmsContentExample.java @@ -525,6 +525,66 @@ public class CmsContentExample { return (Criteria) this; } + public Criteria andShowTypeIsNull() { + addCriterion("show_type is null"); + return (Criteria) this; + } + + public Criteria andShowTypeIsNotNull() { + addCriterion("show_type is not null"); + return (Criteria) this; + } + + public Criteria andShowTypeEqualTo(Integer value) { + addCriterion("show_type =", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotEqualTo(Integer value) { + addCriterion("show_type <>", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeGreaterThan(Integer value) { + addCriterion("show_type >", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("show_type >=", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeLessThan(Integer value) { + addCriterion("show_type <", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeLessThanOrEqualTo(Integer value) { + addCriterion("show_type <=", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeIn(List values) { + addCriterion("show_type in", values, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotIn(List values) { + addCriterion("show_type not in", values, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeBetween(Integer value1, Integer value2) { + addCriterion("show_type between", value1, value2, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotBetween(Integer value1, Integer value2) { + addCriterion("show_type not between", value1, value2, "showType"); + return (Criteria) this; + } + public Criteria andJumpUrlIsNull() { addCriterion("jump_url is null"); return (Criteria) this;