content 字段改为 text 类型
This commit is contained in:
parent
e76fd22c62
commit
d273fd9cad
|
@ -5,8 +5,8 @@
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
<result column="content_md" jdbcType="VARCHAR" property="contentMd"/>
|
<result column="content_md" jdbcType="LONGVARCHAR" property="contentMd" />
|
||||||
<result column="content_html" jdbcType="VARCHAR" property="contentHtml"/>
|
<result column="content_html" jdbcType="LONGVARCHAR" property="contentHtml" />
|
||||||
<result column="read_quantity" jdbcType="INTEGER" property="readQuantity" />
|
<result column="read_quantity" jdbcType="INTEGER" property="readQuantity" />
|
||||||
<result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
|
<result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
|
||||||
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
||||||
|
@ -125,4 +125,268 @@
|
||||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
<resultMap id="BaseResultMap" type="com.len.model.BlogArticle">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||||
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
|
<result column="read_quantity" jdbcType="INTEGER" property="readQuantity" />
|
||||||
|
<result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
|
||||||
|
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.len.model.BlogArticleWithBLOBs">
|
||||||
|
<result column="content_md" jdbcType="LONGVARCHAR" property="contentMd" />
|
||||||
|
<result column="content_html" jdbcType="LONGVARCHAR" property="contentHtml" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, title, description, read_quantity, gmt_created, gmt_modified
|
||||||
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
content_md, content_html
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from blog_art
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from blog_art
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.len.model.BlogArticleWithBLOBs">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into blog_art (title, description, read_quantity,
|
||||||
|
gmt_created, gmt_modified, content_md,
|
||||||
|
content_html)
|
||||||
|
values (#{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{readQuantity,jdbcType=INTEGER},
|
||||||
|
#{gmtCreated,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{contentMd,jdbcType=LONGVARCHAR},
|
||||||
|
#{contentHtml,jdbcType=LONGVARCHAR})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.len.model.BlogArticleWithBLOBs">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into blog_art
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">
|
||||||
|
title,
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
read_quantity,
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
gmt_created,
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
gmt_modified,
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
content_md,
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
content_html,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">
|
||||||
|
#{title,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
#{readQuantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
#{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
#{gmtModified,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
#{contentMd,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
#{contentHtml,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.len.model.BlogArticleWithBLOBs">
|
||||||
|
update blog_art
|
||||||
|
<set>
|
||||||
|
<if test="title != null">
|
||||||
|
title = #{title,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
read_quantity = #{readQuantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
content_md = #{contentMd,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
content_html = #{contentHtml,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.len.model.BlogArticleWithBLOBs">
|
||||||
|
update blog_art
|
||||||
|
set title = #{title,jdbcType=VARCHAR},
|
||||||
|
description = #{description,jdbcType=VARCHAR},
|
||||||
|
read_quantity = #{readQuantity,jdbcType=INTEGER},
|
||||||
|
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||||
|
content_md = #{contentMd,jdbcType=LONGVARCHAR},
|
||||||
|
content_html = #{contentHtml,jdbcType=LONGVARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.len.model.BlogArticle">
|
||||||
|
update blog_art
|
||||||
|
set title = #{title,jdbcType=VARCHAR},
|
||||||
|
description = #{description,jdbcType=VARCHAR},
|
||||||
|
read_quantity = #{readQuantity,jdbcType=INTEGER},
|
||||||
|
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<resultMap id="BaseResultMap" type="com.len.model.BlogArticle">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||||
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
|
<result column="content_md" jdbcType="VARCHAR" property="contentMd" />
|
||||||
|
<result column="content_html" jdbcType="VARCHAR" property="contentHtml" />
|
||||||
|
<result column="read_quantity" jdbcType="INTEGER" property="readQuantity" />
|
||||||
|
<result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
|
||||||
|
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, title, description, content_md, content_html, read_quantity, gmt_created, gmt_modified
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from blog_art
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from blog_art
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.len.model.BlogArticle">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into blog_art (title, description, content_md,
|
||||||
|
content_html, read_quantity, gmt_created,
|
||||||
|
gmt_modified)
|
||||||
|
values (#{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{contentMd,jdbcType=VARCHAR},
|
||||||
|
#{contentHtml,jdbcType=VARCHAR}, #{readQuantity,jdbcType=INTEGER}, #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
#{gmtModified,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.len.model.BlogArticle">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into blog_art
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">
|
||||||
|
title,
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
content_md,
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
content_html,
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
read_quantity,
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
gmt_created,
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
gmt_modified,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="title != null">
|
||||||
|
#{title,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
#{contentMd,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
#{contentHtml,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
#{readQuantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
#{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
#{gmtModified,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.len.model.BlogArticle">
|
||||||
|
update blog_art
|
||||||
|
<set>
|
||||||
|
<if test="title != null">
|
||||||
|
title = #{title,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentMd != null">
|
||||||
|
content_md = #{contentMd,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="contentHtml != null">
|
||||||
|
content_html = #{contentHtml,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="readQuantity != null">
|
||||||
|
read_quantity = #{readQuantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="gmtCreated != null">
|
||||||
|
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="gmtModified != null">
|
||||||
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.len.model.BlogArticle">
|
||||||
|
update blog_art
|
||||||
|
set title = #{title,jdbcType=VARCHAR},
|
||||||
|
description = #{description,jdbcType=VARCHAR},
|
||||||
|
content_md = #{contentMd,jdbcType=VARCHAR},
|
||||||
|
content_html = #{contentHtml,jdbcType=VARCHAR},
|
||||||
|
read_quantity = #{readQuantity,jdbcType=INTEGER},
|
||||||
|
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
|
||||||
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue