<?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.api.dao.mapper.contentplatform.ContentPlatformIllegalMsgMapper">
  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="account_id" jdbcType="BIGINT" property="accountId" />
    <result column="video_id" jdbcType="BIGINT" property="videoId" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="business_type" jdbcType="VARCHAR" property="businessType" />
    <result column="illegal_title" jdbcType="VARCHAR" property="illegalTitle" />
    <result column="illegal_content" jdbcType="VARCHAR" property="illegalContent" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
    <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
  </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">
    id, account_id, video_id, title, business_type, illegal_title, illegal_content, `status`, 
    create_timestamp, update_timestamp
  </sql>
  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from content_platform_illegal_msg
    <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.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from content_platform_illegal_msg
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from content_platform_illegal_msg
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample">
    delete from content_platform_illegal_msg
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
    insert into content_platform_illegal_msg (id, account_id, video_id, 
      title, business_type, illegal_title, 
      illegal_content, `status`, create_timestamp, 
      update_timestamp)
    values (#{id,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
      #{title,jdbcType=VARCHAR}, #{businessType,jdbcType=VARCHAR}, #{illegalTitle,jdbcType=VARCHAR}, 
      #{illegalContent,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTimestamp,jdbcType=BIGINT}, 
      #{updateTimestamp,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
    insert into content_platform_illegal_msg
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="videoId != null">
        video_id,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="businessType != null">
        business_type,
      </if>
      <if test="illegalTitle != null">
        illegal_title,
      </if>
      <if test="illegalContent != null">
        illegal_content,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="createTimestamp != null">
        create_timestamp,
      </if>
      <if test="updateTimestamp != null">
        update_timestamp,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=BIGINT},
      </if>
      <if test="videoId != null">
        #{videoId,jdbcType=BIGINT},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="businessType != null">
        #{businessType,jdbcType=VARCHAR},
      </if>
      <if test="illegalTitle != null">
        #{illegalTitle,jdbcType=VARCHAR},
      </if>
      <if test="illegalContent != null">
        #{illegalContent,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="createTimestamp != null">
        #{createTimestamp,jdbcType=BIGINT},
      </if>
      <if test="updateTimestamp != null">
        #{updateTimestamp,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample" resultType="java.lang.Long">
    select count(*) from content_platform_illegal_msg
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update content_platform_illegal_msg
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.accountId != null">
        account_id = #{record.accountId,jdbcType=BIGINT},
      </if>
      <if test="record.videoId != null">
        video_id = #{record.videoId,jdbcType=BIGINT},
      </if>
      <if test="record.title != null">
        title = #{record.title,jdbcType=VARCHAR},
      </if>
      <if test="record.businessType != null">
        business_type = #{record.businessType,jdbcType=VARCHAR},
      </if>
      <if test="record.illegalTitle != null">
        illegal_title = #{record.illegalTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.illegalContent != null">
        illegal_content = #{record.illegalContent,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        `status` = #{record.status,jdbcType=INTEGER},
      </if>
      <if test="record.createTimestamp != null">
        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
      </if>
      <if test="record.updateTimestamp != null">
        update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update content_platform_illegal_msg
    set id = #{record.id,jdbcType=BIGINT},
      account_id = #{record.accountId,jdbcType=BIGINT},
      video_id = #{record.videoId,jdbcType=BIGINT},
      title = #{record.title,jdbcType=VARCHAR},
      business_type = #{record.businessType,jdbcType=VARCHAR},
      illegal_title = #{record.illegalTitle,jdbcType=VARCHAR},
      illegal_content = #{record.illegalContent,jdbcType=VARCHAR},
      `status` = #{record.status,jdbcType=INTEGER},
      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
    update content_platform_illegal_msg
    <set>
      <if test="accountId != null">
        account_id = #{accountId,jdbcType=BIGINT},
      </if>
      <if test="videoId != null">
        video_id = #{videoId,jdbcType=BIGINT},
      </if>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="businessType != null">
        business_type = #{businessType,jdbcType=VARCHAR},
      </if>
      <if test="illegalTitle != null">
        illegal_title = #{illegalTitle,jdbcType=VARCHAR},
      </if>
      <if test="illegalContent != null">
        illegal_content = #{illegalContent,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=INTEGER},
      </if>
      <if test="createTimestamp != null">
        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
      </if>
      <if test="updateTimestamp != null">
        update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
    update content_platform_illegal_msg
    set account_id = #{accountId,jdbcType=BIGINT},
      video_id = #{videoId,jdbcType=BIGINT},
      title = #{title,jdbcType=VARCHAR},
      business_type = #{businessType,jdbcType=VARCHAR},
      illegal_title = #{illegalTitle,jdbcType=VARCHAR},
      illegal_content = #{illegalContent,jdbcType=VARCHAR},
      `status` = #{status,jdbcType=INTEGER},
      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>