diff --git a/hai-cweb/src/main/resources/pre/application.yml b/hai-cweb/src/main/resources/pre/application.yml index a6ff5a1c..1012ea5c 100644 --- a/hai-cweb/src/main/resources/pre/application.yml +++ b/hai-cweb/src/main/resources/pre/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - z + url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource 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 adad79a6..76a4b5ab 100644 --- a/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java +++ b/hai-service/src/main/java/com/hai/dao/CmsContentMapper.java @@ -2,12 +2,22 @@ package com.hai.dao; import com.hai.entity.CmsContent; import com.hai.entity.CmsContentExample; -import org.apache.ibatis.annotations.*; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; -import java.util.List; - /** * * 代码由工具生成,请勿修改!!! @@ -16,10 +26,10 @@ import java.util.List; **/ @Repository public interface CmsContentMapper extends CmsContentMapperExt { - @SelectProvider(type= CmsContentSqlProvider.class, method="countByExample") + @SelectProvider(type=CmsContentSqlProvider.class, method="countByExample") long countByExample(CmsContentExample example); - @DeleteProvider(type= CmsContentSqlProvider.class, method="deleteByExample") + @DeleteProvider(type=CmsContentSqlProvider.class, method="deleteByExample") int deleteByExample(CmsContentExample example); @Delete({ @@ -33,133 +43,139 @@ public interface CmsContentMapper extends CmsContentMapperExt { "title, description, ", "create_time, `status`, ", "has_patch, visit_count, ", - "tag, img_data, jump_name, ", - "jump_url, sort_id, ", - "update_time, recommend, ", - "company_id, company_name, ", - "user_name, op_id, ext_1, ", - "ext_2, ext_3, content)", + "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}, #{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})" + "#{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); - @InsertProvider(type= CmsContentSqlProvider.class, method="insertSelective") + @InsertProvider(type=CmsContentSqlProvider.class, method="insertSelective") @Options(useGeneratedKeys=true,keyProperty="id") int insertSelective(CmsContent record); - @SelectProvider(type= CmsContentSqlProvider.class, method="selectByExampleWithBLOBs") + @SelectProvider(type=CmsContentSqlProvider.class, method="selectByExampleWithBLOBs") @Results({ - @Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), - @Result(column="category_id", property="categoryId", jdbcType= JdbcType.BIGINT), - @Result(column="category_code", property="categoryCode", jdbcType= JdbcType.VARCHAR), - @Result(column="title", property="title", jdbcType= JdbcType.VARCHAR), - @Result(column="description", property="description", jdbcType= JdbcType.VARCHAR), - @Result(column="create_time", property="createTime", jdbcType= JdbcType.TIMESTAMP), - @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="tag", property="tag", jdbcType= JdbcType.VARCHAR), - @Result(column="img_data", property="imgData", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_name", property="jumpName", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_url", property="jumpUrl", jdbcType= JdbcType.VARCHAR), - @Result(column="sort_id", property="sortId", jdbcType= JdbcType.INTEGER), - @Result(column="update_time", property="updateTime", jdbcType= JdbcType.TIMESTAMP), - @Result(column="recommend", property="recommend", jdbcType= JdbcType.BIT), - @Result(column="company_id", property="companyId", jdbcType= JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType= JdbcType.VARCHAR), - @Result(column="user_name", property="userName", jdbcType= JdbcType.VARCHAR), - @Result(column="op_id", property="opId", jdbcType= JdbcType.BIGINT), - @Result(column="ext_1", property="ext1", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_2", property="ext2", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_3", property="ext3", jdbcType= JdbcType.VARCHAR), - @Result(column="content", property="content", jdbcType= JdbcType.LONGVARCHAR) + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="category_id", property="categoryId", jdbcType=JdbcType.BIGINT), + @Result(column="category_code", property="categoryCode", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @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="tag", property="tag", jdbcType=JdbcType.VARCHAR), + @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), + @Result(column="jump_name", property="jumpName", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="sort_id", property="sortId", jdbcType=JdbcType.INTEGER), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="recommend", property="recommend", jdbcType=JdbcType.BIT), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR), + @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR) }) List selectByExampleWithBLOBs(CmsContentExample example); - @SelectProvider(type= CmsContentSqlProvider.class, method="selectByExample") + @SelectProvider(type=CmsContentSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), - @Result(column="category_id", property="categoryId", jdbcType= JdbcType.BIGINT), - @Result(column="category_code", property="categoryCode", jdbcType= JdbcType.VARCHAR), - @Result(column="title", property="title", jdbcType= JdbcType.VARCHAR), - @Result(column="description", property="description", jdbcType= JdbcType.VARCHAR), - @Result(column="create_time", property="createTime", jdbcType= JdbcType.TIMESTAMP), - @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="tag", property="tag", jdbcType= JdbcType.VARCHAR), - @Result(column="img_data", property="imgData", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_name", property="jumpName", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_url", property="jumpUrl", jdbcType= JdbcType.VARCHAR), - @Result(column="sort_id", property="sortId", jdbcType= JdbcType.INTEGER), - @Result(column="update_time", property="updateTime", jdbcType= JdbcType.TIMESTAMP), - @Result(column="recommend", property="recommend", jdbcType= JdbcType.BIT), - @Result(column="company_id", property="companyId", jdbcType= JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType= JdbcType.VARCHAR), - @Result(column="user_name", property="userName", jdbcType= JdbcType.VARCHAR), - @Result(column="op_id", property="opId", jdbcType= JdbcType.BIGINT), - @Result(column="ext_1", property="ext1", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_2", property="ext2", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_3", property="ext3", jdbcType= JdbcType.VARCHAR) + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="category_id", property="categoryId", jdbcType=JdbcType.BIGINT), + @Result(column="category_code", property="categoryCode", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @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="tag", property="tag", jdbcType=JdbcType.VARCHAR), + @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), + @Result(column="jump_name", property="jumpName", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="sort_id", property="sortId", jdbcType=JdbcType.INTEGER), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="recommend", property="recommend", jdbcType=JdbcType.BIT), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) }) List selectByExample(CmsContentExample example); @Select({ "select", "id, category_id, category_code, title, description, create_time, `status`, has_patch, ", - "visit_count, tag, img_data, 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, 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}" }) @Results({ - @Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), - @Result(column="category_id", property="categoryId", jdbcType= JdbcType.BIGINT), - @Result(column="category_code", property="categoryCode", jdbcType= JdbcType.VARCHAR), - @Result(column="title", property="title", jdbcType= JdbcType.VARCHAR), - @Result(column="description", property="description", jdbcType= JdbcType.VARCHAR), - @Result(column="create_time", property="createTime", jdbcType= JdbcType.TIMESTAMP), - @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="tag", property="tag", jdbcType= JdbcType.VARCHAR), - @Result(column="img_data", property="imgData", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_name", property="jumpName", jdbcType= JdbcType.VARCHAR), - @Result(column="jump_url", property="jumpUrl", jdbcType= JdbcType.VARCHAR), - @Result(column="sort_id", property="sortId", jdbcType= JdbcType.INTEGER), - @Result(column="update_time", property="updateTime", jdbcType= JdbcType.TIMESTAMP), - @Result(column="recommend", property="recommend", jdbcType= JdbcType.BIT), - @Result(column="company_id", property="companyId", jdbcType= JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType= JdbcType.VARCHAR), - @Result(column="user_name", property="userName", jdbcType= JdbcType.VARCHAR), - @Result(column="op_id", property="opId", jdbcType= JdbcType.BIGINT), - @Result(column="ext_1", property="ext1", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_2", property="ext2", jdbcType= JdbcType.VARCHAR), - @Result(column="ext_3", property="ext3", jdbcType= JdbcType.VARCHAR), - @Result(column="content", property="content", jdbcType= JdbcType.LONGVARCHAR) + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="category_id", property="categoryId", jdbcType=JdbcType.BIGINT), + @Result(column="category_code", property="categoryCode", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @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="tag", property="tag", jdbcType=JdbcType.VARCHAR), + @Result(column="img_data", property="imgData", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), + @Result(column="jump_name", property="jumpName", jdbcType=JdbcType.VARCHAR), + @Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="sort_id", property="sortId", jdbcType=JdbcType.INTEGER), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="recommend", property="recommend", jdbcType=JdbcType.BIT), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR), + @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR) }) CmsContent selectByPrimaryKey(Long id); - @UpdateProvider(type= CmsContentSqlProvider.class, method="updateByExampleSelective") + @UpdateProvider(type=CmsContentSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CmsContent record, @Param("example") CmsContentExample example); - @UpdateProvider(type= CmsContentSqlProvider.class, method="updateByExampleWithBLOBs") + @UpdateProvider(type=CmsContentSqlProvider.class, method="updateByExampleWithBLOBs") int updateByExampleWithBLOBs(@Param("record") CmsContent record, @Param("example") CmsContentExample example); - @UpdateProvider(type= CmsContentSqlProvider.class, method="updateByExample") + @UpdateProvider(type=CmsContentSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CmsContent record, @Param("example") CmsContentExample example); - @UpdateProvider(type= CmsContentSqlProvider.class, method="updateByPrimaryKeySelective") + @UpdateProvider(type=CmsContentSqlProvider.class, method="updateByPrimaryKeySelective") int updateByPrimaryKeySelective(CmsContent record); @Update({ @@ -174,6 +190,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "visit_count = #{visitCount,jdbcType=INTEGER},", "tag = #{tag,jdbcType=VARCHAR},", "img_data = #{imgData,jdbcType=VARCHAR},", + "jump_type = #{jumpType,jdbcType=INTEGER},", "jump_name = #{jumpName,jdbcType=VARCHAR},", "jump_url = #{jumpUrl,jdbcType=VARCHAR},", "sort_id = #{sortId,jdbcType=INTEGER},", @@ -203,6 +220,7 @@ public interface CmsContentMapper extends CmsContentMapperExt { "visit_count = #{visitCount,jdbcType=INTEGER},", "tag = #{tag,jdbcType=VARCHAR},", "img_data = #{imgData,jdbcType=VARCHAR},", + "jump_type = #{jumpType,jdbcType=INTEGER},", "jump_name = #{jumpName,jdbcType=VARCHAR},", "jump_url = #{jumpUrl,jdbcType=VARCHAR},", "sort_id = #{sortId,jdbcType=INTEGER},", @@ -218,4 +236,4 @@ public interface CmsContentMapper extends CmsContentMapperExt { "where id = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(CmsContent record); -} +} \ No newline at end of file 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 d120dc28..888a283f 100644 --- a/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/CmsContentSqlProvider.java @@ -1,13 +1,12 @@ package com.hai.dao; import com.hai.entity.CmsContent; -import com.hai.entity.CmsContentExample; import com.hai.entity.CmsContentExample.Criteria; import com.hai.entity.CmsContentExample.Criterion; -import org.apache.ibatis.jdbc.SQL; - +import com.hai.entity.CmsContentExample; import java.util.List; import java.util.Map; +import org.apache.ibatis.jdbc.SQL; public class CmsContentSqlProvider { @@ -69,6 +68,10 @@ public class CmsContentSqlProvider { sql.VALUES("img_data", "#{imgData,jdbcType=VARCHAR}"); } + if (record.getJumpType() != null) { + sql.VALUES("jump_type", "#{jumpType,jdbcType=INTEGER}"); + } + if (record.getJumpName() != null) { sql.VALUES("jump_name", "#{jumpName,jdbcType=VARCHAR}"); } @@ -141,6 +144,7 @@ public class CmsContentSqlProvider { sql.SELECT("visit_count"); sql.SELECT("tag"); sql.SELECT("img_data"); + sql.SELECT("jump_type"); sql.SELECT("jump_name"); sql.SELECT("jump_url"); sql.SELECT("sort_id"); @@ -181,6 +185,7 @@ public class CmsContentSqlProvider { sql.SELECT("visit_count"); sql.SELECT("tag"); sql.SELECT("img_data"); + sql.SELECT("jump_type"); sql.SELECT("jump_name"); sql.SELECT("jump_url"); sql.SELECT("sort_id"); @@ -254,6 +259,10 @@ public class CmsContentSqlProvider { sql.SET("img_data = #{record.imgData,jdbcType=VARCHAR}"); } + if (record.getJumpType() != null) { + sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); + } + if (record.getJumpName() != null) { sql.SET("jump_name = #{record.jumpName,jdbcType=VARCHAR}"); } @@ -325,6 +334,7 @@ public class CmsContentSqlProvider { sql.SET("visit_count = #{record.visitCount,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}"); sql.SET("jump_name = #{record.jumpName,jdbcType=VARCHAR}"); sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}"); sql.SET("sort_id = #{record.sortId,jdbcType=INTEGER}"); @@ -359,6 +369,7 @@ public class CmsContentSqlProvider { sql.SET("visit_count = #{record.visitCount,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}"); sql.SET("jump_name = #{record.jumpName,jdbcType=VARCHAR}"); sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}"); sql.SET("sort_id = #{record.sortId,jdbcType=INTEGER}"); @@ -421,6 +432,10 @@ public class CmsContentSqlProvider { sql.SET("img_data = #{imgData,jdbcType=VARCHAR}"); } + if (record.getJumpType() != null) { + sql.SET("jump_type = #{jumpType,jdbcType=INTEGER}"); + } + if (record.getJumpName() != null) { sql.SET("jump_name = #{jumpName,jdbcType=VARCHAR}"); } @@ -570,4 +585,4 @@ public class CmsContentSqlProvider { sql.WHERE(sb.toString()); } } -} +} \ No newline at end of file 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 3009a32d..49b04f38 100644 --- a/hai-service/src/main/java/com/hai/entity/CmsContent.java +++ b/hai-service/src/main/java/com/hai/entity/CmsContent.java @@ -7,7 +7,6 @@ import java.util.Date; * cms_content * @author */ - /** * * 代码由工具生成 @@ -69,6 +68,11 @@ public class CmsContent implements Serializable { */ private String imgData; + /** + * 跳转类型 1:外链 2:内链 + */ + private Integer jumpType; + /** * 跳转名称 */ @@ -215,6 +219,14 @@ public class CmsContent implements Serializable { this.imgData = imgData; } + public Integer getJumpType() { + return jumpType; + } + + public void setJumpType(Integer jumpType) { + this.jumpType = jumpType; + } + public String getJumpName() { return jumpName; } @@ -342,6 +354,7 @@ public class CmsContent implements Serializable { && (this.getVisitCount() == null ? other.getVisitCount() == null : this.getVisitCount().equals(other.getVisitCount())) && (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())) && (this.getJumpName() == null ? other.getJumpName() == null : this.getJumpName().equals(other.getJumpName())) && (this.getJumpUrl() == null ? other.getJumpUrl() == null : this.getJumpUrl().equals(other.getJumpUrl())) && (this.getSortId() == null ? other.getSortId() == null : this.getSortId().equals(other.getSortId())) @@ -372,6 +385,7 @@ public class CmsContent implements Serializable { result = prime * result + ((getVisitCount() == null) ? 0 : getVisitCount().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()); result = prime * result + ((getJumpName() == null) ? 0 : getJumpName().hashCode()); result = prime * result + ((getJumpUrl() == null) ? 0 : getJumpUrl().hashCode()); result = prime * result + ((getSortId() == null) ? 0 : getSortId().hashCode()); @@ -405,6 +419,7 @@ public class CmsContent implements Serializable { sb.append(", visitCount=").append(visitCount); sb.append(", tag=").append(tag); sb.append(", imgData=").append(imgData); + sb.append(", jumpType=").append(jumpType); sb.append(", jumpName=").append(jumpName); sb.append(", jumpUrl=").append(jumpUrl); sb.append(", sortId=").append(sortId); @@ -422,4 +437,4 @@ public class CmsContent implements Serializable { sb.append("]"); return sb.toString(); } -} +} \ No newline at end of file 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 80295e27..dd562981 100644 --- a/hai-service/src/main/java/com/hai/entity/CmsContentExample.java +++ b/hai-service/src/main/java/com/hai/entity/CmsContentExample.java @@ -835,6 +835,66 @@ public class CmsContentExample { return (Criteria) this; } + public Criteria andJumpTypeIsNull() { + addCriterion("jump_type is null"); + return (Criteria) this; + } + + public Criteria andJumpTypeIsNotNull() { + addCriterion("jump_type is not null"); + return (Criteria) this; + } + + public Criteria andJumpTypeEqualTo(Integer value) { + addCriterion("jump_type =", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeNotEqualTo(Integer value) { + addCriterion("jump_type <>", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeGreaterThan(Integer value) { + addCriterion("jump_type >", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("jump_type >=", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeLessThan(Integer value) { + addCriterion("jump_type <", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeLessThanOrEqualTo(Integer value) { + addCriterion("jump_type <=", value, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeIn(List values) { + addCriterion("jump_type in", values, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeNotIn(List values) { + addCriterion("jump_type not in", values, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeBetween(Integer value1, Integer value2) { + addCriterion("jump_type between", value1, value2, "jumpType"); + return (Criteria) this; + } + + public Criteria andJumpTypeNotBetween(Integer value1, Integer value2) { + addCriterion("jump_type not between", value1, value2, "jumpType"); + return (Criteria) this; + } + public Criteria andJumpNameIsNull() { addCriterion("jump_name is null"); return (Criteria) this; @@ -1720,4 +1780,4 @@ public class CmsContentExample { this(condition, value, secondValue, null); } } -} +} \ No newline at end of file