|
|
@@ -13,14 +13,13 @@
|
|
|
<result column="source" jdbcType="VARCHAR" property="source" />
|
|
|
<result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
|
|
|
<result column="summary" jdbcType="VARCHAR" property="summary" />
|
|
|
- <result column="news_date" jdbcType="TIMESTAMP" property="newsDate" />
|
|
|
</resultMap>
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.News">
|
|
|
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, create_time, edit_time, title, title_img, author, type, hot, source, source_url,
|
|
|
- summary, newsDate
|
|
|
+ summary
|
|
|
</sql>
|
|
|
<sql id="Blob_Column_List">
|
|
|
content
|
|
|
@@ -41,13 +40,12 @@
|
|
|
insert into news (id, create_time, edit_time,
|
|
|
title, title_img, author,
|
|
|
type, hot, source,
|
|
|
- source_url, summary, content, news_date
|
|
|
+ source_url, summary, content
|
|
|
)
|
|
|
values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP},
|
|
|
#{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
|
|
#{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR},
|
|
|
- #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR},
|
|
|
- #{newsDate,jdbcType=TIMESTAMP}
|
|
|
+ #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.News">
|
|
|
@@ -89,9 +87,6 @@
|
|
|
<if test="content != null">
|
|
|
content,
|
|
|
</if>
|
|
|
- <if test="newsDate != null">
|
|
|
- news_date,
|
|
|
- </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -130,9 +125,6 @@
|
|
|
<if test="content != null">
|
|
|
#{content,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
- <if test="newsDate != null">
|
|
|
- #{newsDate,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
|
|
|
@@ -171,9 +163,6 @@
|
|
|
<if test="content != null">
|
|
|
content = #{content,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
- <if test="newsDate != null">
|
|
|
- news_date = #{newsDate ,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -189,8 +178,7 @@
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
source_url = #{sourceUrl,jdbcType=VARCHAR},
|
|
|
summary = #{summary,jdbcType=VARCHAR},
|
|
|
- content = #{content,jdbcType=LONGVARCHAR},
|
|
|
- news_date = #{newsDate ,jdbcType=TIMESTAMP}
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
|
|
|
@@ -204,8 +192,7 @@
|
|
|
hot = #{hot,jdbcType=INTEGER},
|
|
|
source = #{source,jdbcType=VARCHAR},
|
|
|
source_url = #{sourceUrl,jdbcType=VARCHAR},
|
|
|
- summary = #{summary,jdbcType=VARCHAR},
|
|
|
- news_date = #{newsDate ,jdbcType=TIMESTAMP}
|
|
|
+ summary = #{summary,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
|