diff --git a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java index 9be4071..d4020de 100644 --- a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java +++ b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java @@ -41,16 +41,18 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Insert({ "insert into cms_content (platform_code, code, ", "`name`, img, jump_type, ", - "show_type, jump_url, ", - "appid, create_time, ", - "update_time, `status`, ", - "ext_1, ext_2, ext_3)", + "show_type, show_data_id, ", + "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}, ", - "#{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})" + "#{showType,jdbcType=INTEGER}, #{showDataId,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); @@ -68,6 +70,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @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="show_data_id", property="showDataId", 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), @@ -81,8 +84,8 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Select({ "select", - "id, platform_code, code, `name`, img, jump_type, show_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, show_data_id, jump_url, ", + "appid, create_time, update_time, `status`, ext_1, ext_2, ext_3", "from cms_content", "where id = #{id,jdbcType=BIGINT}" }) @@ -94,6 +97,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @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="show_data_id", property="showDataId", 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), @@ -122,6 +126,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "img = #{img,jdbcType=VARCHAR},", "jump_type = #{jumpType,jdbcType=INTEGER},", "show_type = #{showType,jdbcType=INTEGER},", + "show_data_id = #{showDataId,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 6fb0d43..876565c 100644 --- a/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java @@ -52,6 +52,10 @@ public class CmsContentSqlProvider { sql.VALUES("show_type", "#{showType,jdbcType=INTEGER}"); } + if (record.getShowDataId() != null) { + sql.VALUES("show_data_id", "#{showDataId,jdbcType=INTEGER}"); + } + if (record.getJumpUrl() != null) { sql.VALUES("jump_url", "#{jumpUrl,jdbcType=VARCHAR}"); } @@ -100,6 +104,7 @@ public class CmsContentSqlProvider { sql.SELECT("img"); sql.SELECT("jump_type"); sql.SELECT("show_type"); + sql.SELECT("show_data_id"); sql.SELECT("jump_url"); sql.SELECT("appid"); sql.SELECT("create_time"); @@ -153,6 +158,10 @@ public class CmsContentSqlProvider { sql.SET("show_type = #{record.showType,jdbcType=INTEGER}"); } + if (record.getShowDataId() != null) { + sql.SET("show_data_id = #{record.showDataId,jdbcType=INTEGER}"); + } + if (record.getJumpUrl() != null) { sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}"); } @@ -200,6 +209,7 @@ public class CmsContentSqlProvider { 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("show_data_id = #{record.showDataId,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}"); @@ -242,6 +252,10 @@ public class CmsContentSqlProvider { sql.SET("show_type = #{showType,jdbcType=INTEGER}"); } + if (record.getShowDataId() != null) { + sql.SET("show_data_id = #{showDataId,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 eb389ec..12418c2 100644 --- a/service/src/main/java/com/hfkj/entity/CmsContent.java +++ b/service/src/main/java/com/hfkj/entity/CmsContent.java @@ -44,10 +44,15 @@ public class CmsContent implements Serializable { private Integer jumpType; /** - * 展示类型:1:数据展示 + * 展示类型:1:双数据 2:四数据 3:横版多数据 */ private Integer showType; + /** + * 数据编码 + */ + private Integer showDataId; + /** * 跳转地址 */ @@ -137,6 +142,14 @@ public class CmsContent implements Serializable { this.showType = showType; } + public Integer getShowDataId() { + return showDataId; + } + + public void setShowDataId(Integer showDataId) { + this.showDataId = showDataId; + } + public String getJumpUrl() { return jumpUrl; } diff --git a/service/src/main/java/com/hfkj/entity/CmsContentExample.java b/service/src/main/java/com/hfkj/entity/CmsContentExample.java index 3a0545a..ba692c0 100644 --- a/service/src/main/java/com/hfkj/entity/CmsContentExample.java +++ b/service/src/main/java/com/hfkj/entity/CmsContentExample.java @@ -585,6 +585,66 @@ public class CmsContentExample { return (Criteria) this; } + public Criteria andShowDataIdIsNull() { + addCriterion("show_data_id is null"); + return (Criteria) this; + } + + public Criteria andShowDataIdIsNotNull() { + addCriterion("show_data_id is not null"); + return (Criteria) this; + } + + public Criteria andShowDataIdEqualTo(Integer value) { + addCriterion("show_data_id =", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdNotEqualTo(Integer value) { + addCriterion("show_data_id <>", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdGreaterThan(Integer value) { + addCriterion("show_data_id >", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdGreaterThanOrEqualTo(Integer value) { + addCriterion("show_data_id >=", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdLessThan(Integer value) { + addCriterion("show_data_id <", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdLessThanOrEqualTo(Integer value) { + addCriterion("show_data_id <=", value, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdIn(List values) { + addCriterion("show_data_id in", values, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdNotIn(List values) { + addCriterion("show_data_id not in", values, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdBetween(Integer value1, Integer value2) { + addCriterion("show_data_id between", value1, value2, "showDataId"); + return (Criteria) this; + } + + public Criteria andShowDataIdNotBetween(Integer value1, Integer value2) { + addCriterion("show_data_id not between", value1, value2, "showDataId"); + return (Criteria) this; + } + public Criteria andJumpUrlIsNull() { addCriterion("jump_url is null"); return (Criteria) this;