|
@@ -0,0 +1,293 @@
|
|
|
+<?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.tzld.piaoquan.longarticle.dao.mapper.LongArticlesTextMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ <id column="content_id" jdbcType="VARCHAR" property="contentId" />
|
|
|
+ <result column="article_title" jdbcType="VARCHAR" property="articleTitle" />
|
|
|
+ <result column="kimi_title" jdbcType="VARCHAR" property="kimiTitle" />
|
|
|
+ <result column="kimi_summary" jdbcType="VARCHAR" property="kimiSummary" />
|
|
|
+ <result column="kimi_keys" jdbcType="VARCHAR" property="kimiKeys" />
|
|
|
+ <result column="kimi_status" jdbcType="INTEGER" property="kimiStatus" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ <result column="article_text" jdbcType="LONGVARCHAR" property="articleText" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ content_id, article_title, kimi_title, kimi_summary, kimi_keys, kimi_status
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ article_text
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExampleWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesTextExample" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from long_articles_text
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ <if test="page != null">
|
|
|
+ limit #{page.offset} , #{page.pageSize}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesTextExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from long_articles_text
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ <if test="page != null">
|
|
|
+ limit #{page.offset} , #{page.pageSize}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from long_articles_text
|
|
|
+ where content_id = #{contentId,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from long_articles_text
|
|
|
+ where content_id = #{contentId,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesTextExample">
|
|
|
+ delete from long_articles_text
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ insert into long_articles_text (content_id, article_title, kimi_title,
|
|
|
+ kimi_summary, kimi_keys, kimi_status,
|
|
|
+ article_text)
|
|
|
+ values (#{contentId,jdbcType=VARCHAR}, #{articleTitle,jdbcType=VARCHAR}, #{kimiTitle,jdbcType=VARCHAR},
|
|
|
+ #{kimiSummary,jdbcType=VARCHAR}, #{kimiKeys,jdbcType=VARCHAR}, #{kimiStatus,jdbcType=INTEGER},
|
|
|
+ #{articleText,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ insert into long_articles_text
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="contentId != null">
|
|
|
+ content_id,
|
|
|
+ </if>
|
|
|
+ <if test="articleTitle != null">
|
|
|
+ article_title,
|
|
|
+ </if>
|
|
|
+ <if test="kimiTitle != null">
|
|
|
+ kimi_title,
|
|
|
+ </if>
|
|
|
+ <if test="kimiSummary != null">
|
|
|
+ kimi_summary,
|
|
|
+ </if>
|
|
|
+ <if test="kimiKeys != null">
|
|
|
+ kimi_keys,
|
|
|
+ </if>
|
|
|
+ <if test="kimiStatus != null">
|
|
|
+ kimi_status,
|
|
|
+ </if>
|
|
|
+ <if test="articleText != null">
|
|
|
+ article_text,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="contentId != null">
|
|
|
+ #{contentId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="articleTitle != null">
|
|
|
+ #{articleTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiTitle != null">
|
|
|
+ #{kimiTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiSummary != null">
|
|
|
+ #{kimiSummary,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiKeys != null">
|
|
|
+ #{kimiKeys,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiStatus != null">
|
|
|
+ #{kimiStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="articleText != null">
|
|
|
+ #{articleText,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesTextExample" resultType="java.lang.Long">
|
|
|
+ select count(*) from long_articles_text
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update long_articles_text
|
|
|
+ <set>
|
|
|
+ <if test="record.contentId != null">
|
|
|
+ content_id = #{record.contentId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.articleTitle != null">
|
|
|
+ article_title = #{record.articleTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.kimiTitle != null">
|
|
|
+ kimi_title = #{record.kimiTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.kimiSummary != null">
|
|
|
+ kimi_summary = #{record.kimiSummary,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.kimiKeys != null">
|
|
|
+ kimi_keys = #{record.kimiKeys,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.kimiStatus != null">
|
|
|
+ kimi_status = #{record.kimiStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.articleText != null">
|
|
|
+ article_text = #{record.articleText,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
+ update long_articles_text
|
|
|
+ set content_id = #{record.contentId,jdbcType=VARCHAR},
|
|
|
+ article_title = #{record.articleTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_title = #{record.kimiTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_summary = #{record.kimiSummary,jdbcType=VARCHAR},
|
|
|
+ kimi_keys = #{record.kimiKeys,jdbcType=VARCHAR},
|
|
|
+ kimi_status = #{record.kimiStatus,jdbcType=INTEGER},
|
|
|
+ article_text = #{record.articleText,jdbcType=LONGVARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update long_articles_text
|
|
|
+ set content_id = #{record.contentId,jdbcType=VARCHAR},
|
|
|
+ article_title = #{record.articleTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_title = #{record.kimiTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_summary = #{record.kimiSummary,jdbcType=VARCHAR},
|
|
|
+ kimi_keys = #{record.kimiKeys,jdbcType=VARCHAR},
|
|
|
+ kimi_status = #{record.kimiStatus,jdbcType=INTEGER}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ update long_articles_text
|
|
|
+ <set>
|
|
|
+ <if test="articleTitle != null">
|
|
|
+ article_title = #{articleTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiTitle != null">
|
|
|
+ kimi_title = #{kimiTitle,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiSummary != null">
|
|
|
+ kimi_summary = #{kimiSummary,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiKeys != null">
|
|
|
+ kimi_keys = #{kimiKeys,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="kimiStatus != null">
|
|
|
+ kimi_status = #{kimiStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="articleText != null">
|
|
|
+ article_text = #{articleText,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where content_id = #{contentId,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ update long_articles_text
|
|
|
+ set article_title = #{articleTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_title = #{kimiTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_summary = #{kimiSummary,jdbcType=VARCHAR},
|
|
|
+ kimi_keys = #{kimiKeys,jdbcType=VARCHAR},
|
|
|
+ kimi_status = #{kimiStatus,jdbcType=INTEGER},
|
|
|
+ article_text = #{articleText,jdbcType=LONGVARCHAR}
|
|
|
+ where content_id = #{contentId,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.LongArticlesText">
|
|
|
+ update long_articles_text
|
|
|
+ set article_title = #{articleTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_title = #{kimiTitle,jdbcType=VARCHAR},
|
|
|
+ kimi_summary = #{kimiSummary,jdbcType=VARCHAR},
|
|
|
+ kimi_keys = #{kimiKeys,jdbcType=VARCHAR},
|
|
|
+ kimi_status = #{kimiStatus,jdbcType=INTEGER}
|
|
|
+ where content_id = #{contentId,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|