| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.goafanti.common.dao.NewsMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.News">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="edit_time" jdbcType="TIMESTAMP" property="editTime" />
- <result column="title" jdbcType="VARCHAR" property="title" />
- <result column="title_img" jdbcType="VARCHAR" property="titleImg" />
- <result column="author" jdbcType="VARCHAR" property="author" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="hot" jdbcType="INTEGER" property="hot" />
- <result column="source" jdbcType="VARCHAR" property="source" />
- <result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
- <result column="summary" jdbcType="VARCHAR" property="summary" />
- <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
- </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,jmrh_flag
- </sql>
- <sql id="Blob_Column_List">
- content
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from news
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from news
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.News">
- insert into news (id, create_time, edit_time,
- title, title_img, author,
- type, hot, source,
- source_url, summary, content,jmrh_flag
- )
- 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},
- #{jmrhFlag,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
- insert into news
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="editTime != null">
- edit_time,
- </if>
- <if test="title != null">
- title,
- </if>
- <if test="titleImg != null">
- title_img,
- </if>
- <if test="author != null">
- author,
- </if>
- <if test="type != null">
- type,
- </if>
- <if test="hot != null">
- hot,
- </if>
- <if test="source != null">
- source,
- </if>
- <if test="sourceUrl != null">
- source_url,
- </if>
- <if test="summary != null">
- summary,
- </if>
- <if test="content != null">
- content,
- </if>
- <if test="jmrhFlag != null">
- jmrhFlag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="editTime != null">
- #{editTime,jdbcType=TIMESTAMP},
- </if>
- <if test="title != null">
- #{title,jdbcType=VARCHAR},
- </if>
- <if test="titleImg != null">
- #{titleImg,jdbcType=VARCHAR},
- </if>
- <if test="author != null">
- #{author,jdbcType=VARCHAR},
- </if>
- <if test="type != null">
- #{type,jdbcType=INTEGER},
- </if>
- <if test="hot != null">
- #{hot,jdbcType=INTEGER},
- </if>
- <if test="source != null">
- #{source,jdbcType=VARCHAR},
- </if>
- <if test="sourceUrl != null">
- #{sourceUrl,jdbcType=VARCHAR},
- </if>
- <if test="summary != null">
- #{summary,jdbcType=VARCHAR},
- </if>
- <if test="content != null">
- #{content,jdbcType=LONGVARCHAR},
- </if>
- <if test="jmrhFlag != null">
- #{content,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
- update news
- <set>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="editTime != null">
- edit_time = #{editTime,jdbcType=TIMESTAMP},
- </if>
- <if test="title != null">
- title = #{title,jdbcType=VARCHAR},
- </if>
- <if test="titleImg != null">
- title_img = #{titleImg,jdbcType=VARCHAR},
- </if>
- <if test="author != null">
- author = #{author,jdbcType=VARCHAR},
- </if>
- <if test="type != null">
- type = #{type,jdbcType=INTEGER},
- </if>
- <if test="hot != null">
- hot = #{hot,jdbcType=INTEGER},
- </if>
- <if test="source != null">
- source = #{source,jdbcType=VARCHAR},
- </if>
- <if test="sourceUrl != null">
- source_url = #{sourceUrl,jdbcType=VARCHAR},
- </if>
- <if test="summary != null">
- summary = #{summary,jdbcType=VARCHAR},
- </if>
- <if test="content != null">
- content = #{content,jdbcType=LONGVARCHAR},
- </if>
- <if test="jmrhFlag != null">
- content = #{jmrhFlag,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.News">
- update news
- set create_time = #{createTime,jdbcType=TIMESTAMP},
- edit_time = #{editTime,jdbcType=TIMESTAMP},
- title = #{title,jdbcType=VARCHAR},
- title_img = #{titleImg,jdbcType=VARCHAR},
- author = #{author,jdbcType=VARCHAR},
- type = #{type,jdbcType=INTEGER},
- hot = #{hot,jdbcType=INTEGER},
- source = #{source,jdbcType=VARCHAR},
- source_url = #{sourceUrl,jdbcType=VARCHAR},
- summary = #{summary,jdbcType=VARCHAR},
- content = #{content,jdbcType=LONGVARCHAR},
- jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
- update news
- set create_time = #{createTime,jdbcType=TIMESTAMP},
- edit_time = #{editTime,jdbcType=TIMESTAMP},
- title = #{title,jdbcType=VARCHAR},
- title_img = #{titleImg,jdbcType=VARCHAR},
- author = #{author,jdbcType=VARCHAR},
- type = #{type,jdbcType=INTEGER},
- hot = #{hot,jdbcType=INTEGER},
- source = #{source,jdbcType=VARCHAR},
- source_url = #{sourceUrl,jdbcType=VARCHAR},
- summary = #{summary,jdbcType=VARCHAR},
- jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
- where id = #{id,jdbcType=BIGINT}
- </update>
-
-
- </mapper>
|