From 3787961b31a2dbc493dd0f6e9da3dd504425116d Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Mon, 26 Sep 2022 14:19:24 +0800 Subject: [PATCH] 1 --- .../java/com/hai/dao/CmsContentMapper.java | 39 ++++++------ .../com/hai/dao/CmsContentSqlProvider.java | 16 +++++ .../main/java/com/hai/entity/CmsContent.java | 16 +++++ .../com/hai/entity/CmsContentExample.java | 60 +++++++++++++++++++ 4 files changed, 114 insertions(+), 17 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java b/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java index 76a4b5ab..13cfc0a5 100644 --- a/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java +++ b/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java @@ -43,24 +43,24 @@ public interface CmsContentMapper extends CmsContentMapperExt { "title, description, ", "create_time, `status`, ", "has_patch, visit_count, ", - "tag, img_data, jump_type, ", - "jump_name, jump_url, ", - "sort_id, update_time, ", - "recommend, company_id, ", - "company_name, user_name, ", - "op_id, ext_1, ext_2, ", - "ext_3, content)", + "platform, tag, img_data, ", + "jump_type, jump_name, ", + "jump_url, sort_id, ", + "update_time, recommend, ", + "company_id, company_name, ", + "user_name, op_id, ext_1, ", + "ext_2, ext_3, content)", "values (#{categoryId,jdbcType=BIGINT}, #{categoryCode,jdbcType=VARCHAR}, ", "#{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, ", "#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", "#{hasPatch,jdbcType=INTEGER}, #{visitCount,jdbcType=INTEGER}, ", - "#{tag,jdbcType=VARCHAR}, #{imgData,jdbcType=VARCHAR}, #{jumpType,jdbcType=INTEGER}, ", - "#{jumpName,jdbcType=VARCHAR}, #{jumpUrl,jdbcType=VARCHAR}, ", - "#{sortId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{recommend,jdbcType=BIT}, #{companyId,jdbcType=BIGINT}, ", - "#{companyName,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ", - "#{opId,jdbcType=BIGINT}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", - "#{ext3,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})" + "#{platform,jdbcType=INTEGER}, #{tag,jdbcType=VARCHAR}, #{imgData,jdbcType=VARCHAR}, ", + "#{jumpType,jdbcType=INTEGER}, #{jumpName,jdbcType=VARCHAR}, ", + "#{jumpUrl,jdbcType=VARCHAR}, #{sortId,jdbcType=INTEGER}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{recommend,jdbcType=BIT}, ", + "#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", + "#{userName,jdbcType=VARCHAR}, #{opId,jdbcType=BIGINT}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(CmsContent record); @@ -80,6 +80,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="has_patch", property="hasPatch", jdbcType=JdbcType.INTEGER), @Result(column="visit_count", property="visitCount", jdbcType=JdbcType.INTEGER), + @Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER), @Result(column="tag", property="tag", jdbcType=JdbcType.VARCHAR), @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), @@ -110,6 +111,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="has_patch", property="hasPatch", jdbcType=JdbcType.INTEGER), @Result(column="visit_count", property="visitCount", jdbcType=JdbcType.INTEGER), + @Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER), @Result(column="tag", property="tag", jdbcType=JdbcType.VARCHAR), @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), @@ -131,9 +133,9 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Select({ "select", "id, category_id, category_code, title, description, create_time, `status`, has_patch, ", - "visit_count, tag, img_data, jump_type, jump_name, jump_url, sort_id, update_time, ", - "recommend, company_id, company_name, user_name, op_id, ext_1, ext_2, ext_3, ", - "content", + "visit_count, platform, tag, img_data, jump_type, jump_name, jump_url, sort_id, ", + "update_time, recommend, company_id, company_name, user_name, op_id, ext_1, ext_2, ", + "ext_3, content", "from cms_content", "where id = #{id,jdbcType=BIGINT}" }) @@ -147,6 +149,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="has_patch", property="hasPatch", jdbcType=JdbcType.INTEGER), @Result(column="visit_count", property="visitCount", jdbcType=JdbcType.INTEGER), + @Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER), @Result(column="tag", property="tag", jdbcType=JdbcType.VARCHAR), @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), @@ -188,6 +191,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "`status` = #{status,jdbcType=INTEGER},", "has_patch = #{hasPatch,jdbcType=INTEGER},", "visit_count = #{visitCount,jdbcType=INTEGER},", + "platform = #{platform,jdbcType=INTEGER},", "tag = #{tag,jdbcType=VARCHAR},", "img_data = #{imgData,jdbcType=VARCHAR},", "jump_type = #{jumpType,jdbcType=INTEGER},", @@ -218,6 +222,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "`status` = #{status,jdbcType=INTEGER},", "has_patch = #{hasPatch,jdbcType=INTEGER},", "visit_count = #{visitCount,jdbcType=INTEGER},", + "platform = #{platform,jdbcType=INTEGER},", "tag = #{tag,jdbcType=VARCHAR},", "img_data = #{imgData,jdbcType=VARCHAR},", "jump_type = #{jumpType,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java b/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java index 888a283f..c258d62d 100644 --- a/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java @@ -60,6 +60,10 @@ public class CmsContentSqlProvider { sql.VALUES("visit_count", "#{visitCount,jdbcType=INTEGER}"); } + if (record.getPlatform() != null) { + sql.VALUES("platform", "#{platform,jdbcType=INTEGER}"); + } + if (record.getTag() != null) { sql.VALUES("tag", "#{tag,jdbcType=VARCHAR}"); } @@ -142,6 +146,7 @@ public class CmsContentSqlProvider { sql.SELECT("`status`"); sql.SELECT("has_patch"); sql.SELECT("visit_count"); + sql.SELECT("platform"); sql.SELECT("tag"); sql.SELECT("img_data"); sql.SELECT("jump_type"); @@ -183,6 +188,7 @@ public class CmsContentSqlProvider { sql.SELECT("`status`"); sql.SELECT("has_patch"); sql.SELECT("visit_count"); + sql.SELECT("platform"); sql.SELECT("tag"); sql.SELECT("img_data"); sql.SELECT("jump_type"); @@ -251,6 +257,10 @@ public class CmsContentSqlProvider { sql.SET("visit_count = #{record.visitCount,jdbcType=INTEGER}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{record.platform,jdbcType=INTEGER}"); + } + if (record.getTag() != null) { sql.SET("tag = #{record.tag,jdbcType=VARCHAR}"); } @@ -332,6 +342,7 @@ public class CmsContentSqlProvider { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("has_patch = #{record.hasPatch,jdbcType=INTEGER}"); sql.SET("visit_count = #{record.visitCount,jdbcType=INTEGER}"); + sql.SET("platform = #{record.platform,jdbcType=INTEGER}"); sql.SET("tag = #{record.tag,jdbcType=VARCHAR}"); sql.SET("img_data = #{record.imgData,jdbcType=VARCHAR}"); sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); @@ -367,6 +378,7 @@ public class CmsContentSqlProvider { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("has_patch = #{record.hasPatch,jdbcType=INTEGER}"); sql.SET("visit_count = #{record.visitCount,jdbcType=INTEGER}"); + sql.SET("platform = #{record.platform,jdbcType=INTEGER}"); sql.SET("tag = #{record.tag,jdbcType=VARCHAR}"); sql.SET("img_data = #{record.imgData,jdbcType=VARCHAR}"); sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); @@ -424,6 +436,10 @@ public class CmsContentSqlProvider { sql.SET("visit_count = #{visitCount,jdbcType=INTEGER}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{platform,jdbcType=INTEGER}"); + } + if (record.getTag() != null) { sql.SET("tag = #{tag,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/CmsContent.java b/hai-service/src/main/java/com/hai/entity/CmsContent.java index 49b04f38..3fa9c89e 100644 --- a/hai-service/src/main/java/com/hai/entity/CmsContent.java +++ b/hai-service/src/main/java/com/hai/entity/CmsContent.java @@ -58,6 +58,11 @@ public class CmsContent implements Serializable { */ private Integer visitCount; + /** + * 平台类型 1:微信小程序 2:h5 3:银联小程序 + */ + private Integer platform; + /** * 标签,格式为:流行,古典 */ @@ -203,6 +208,14 @@ public class CmsContent implements Serializable { this.visitCount = visitCount; } + public Integer getPlatform() { + return platform; + } + + public void setPlatform(Integer platform) { + this.platform = platform; + } + public String getTag() { return tag; } @@ -352,6 +365,7 @@ public class CmsContent implements Serializable { && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getHasPatch() == null ? other.getHasPatch() == null : this.getHasPatch().equals(other.getHasPatch())) && (this.getVisitCount() == null ? other.getVisitCount() == null : this.getVisitCount().equals(other.getVisitCount())) + && (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform())) && (this.getTag() == null ? other.getTag() == null : this.getTag().equals(other.getTag())) && (this.getImgData() == null ? other.getImgData() == null : this.getImgData().equals(other.getImgData())) && (this.getJumpType() == null ? other.getJumpType() == null : this.getJumpType().equals(other.getJumpType())) @@ -383,6 +397,7 @@ public class CmsContent implements Serializable { result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getHasPatch() == null) ? 0 : getHasPatch().hashCode()); result = prime * result + ((getVisitCount() == null) ? 0 : getVisitCount().hashCode()); + result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); result = prime * result + ((getTag() == null) ? 0 : getTag().hashCode()); result = prime * result + ((getImgData() == null) ? 0 : getImgData().hashCode()); result = prime * result + ((getJumpType() == null) ? 0 : getJumpType().hashCode()); @@ -417,6 +432,7 @@ public class CmsContent implements Serializable { sb.append(", status=").append(status); sb.append(", hasPatch=").append(hasPatch); sb.append(", visitCount=").append(visitCount); + sb.append(", platform=").append(platform); sb.append(", tag=").append(tag); sb.append(", imgData=").append(imgData); sb.append(", jumpType=").append(jumpType); diff --git a/hai-service/src/main/java/com/hai/entity/CmsContentExample.java b/hai-service/src/main/java/com/hai/entity/CmsContentExample.java index dd562981..283ce45a 100644 --- a/hai-service/src/main/java/com/hai/entity/CmsContentExample.java +++ b/hai-service/src/main/java/com/hai/entity/CmsContentExample.java @@ -695,6 +695,66 @@ public class CmsContentExample { return (Criteria) this; } + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(Integer value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(Integer value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(Integer value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(Integer value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(Integer value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(Integer value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(Integer value1, Integer value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(Integer value1, Integer value2) { + addCriterion("platform not between", value1, value2, "platform"); + return (Criteria) this; + } + public Criteria andTagIsNull() { addCriterion("tag is null"); return (Criteria) this;