<?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.chaozhanggui.dao.system.dao.TbPlussNoticeMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="VARCHAR" property="userid" />
    <result column="userName" jdbcType="VARCHAR" property="username" />
    <result column="typeFirst" jdbcType="INTEGER" property="typefirst" />
    <result column="typeSecond" jdbcType="INTEGER" property="typesecond" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="desc" jdbcType="VARCHAR" property="desc" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="noticeCode" jdbcType="VARCHAR" property="noticecode" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="isDeal" jdbcType="INTEGER" property="isdeal" />
    <result column="isApply" jdbcType="INTEGER" property="isapply" />
    <result column="uniqueKey" jdbcType="VARCHAR" property="uniquekey" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    <result column="conrtent" jdbcType="LONGVARCHAR" property="conrtent" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, userName, typeFirst, typeSecond, title, desc, url, createDt, noticeCode, 
    orderNumber, isDeal, isApply, uniqueKey
  </sql>
  <sql id="Blob_Column_List">
    conrtent
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_notice
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_notice
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    insert into tb_pluss_notice (id, userId, userName, 
      typeFirst, typeSecond, title, 
      desc, url, createDt, 
      noticeCode, orderNumber, isDeal, 
      isApply, uniqueKey, conrtent
      )
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
      #{typefirst,jdbcType=INTEGER}, #{typesecond,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, 
      #{desc,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{noticecode,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, #{isdeal,jdbcType=INTEGER}, 
      #{isapply,jdbcType=INTEGER}, #{uniquekey,jdbcType=VARCHAR}, #{conrtent,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    insert into tb_pluss_notice
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="username != null">
        userName,
      </if>
      <if test="typefirst != null">
        typeFirst,
      </if>
      <if test="typesecond != null">
        typeSecond,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="desc != null">
        desc,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="noticecode != null">
        noticeCode,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="isdeal != null">
        isDeal,
      </if>
      <if test="isapply != null">
        isApply,
      </if>
      <if test="uniquekey != null">
        uniqueKey,
      </if>
      <if test="conrtent != null">
        conrtent,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        #{username,jdbcType=VARCHAR},
      </if>
      <if test="typefirst != null">
        #{typefirst,jdbcType=INTEGER},
      </if>
      <if test="typesecond != null">
        #{typesecond,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        #{desc,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="noticecode != null">
        #{noticecode,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="isdeal != null">
        #{isdeal,jdbcType=INTEGER},
      </if>
      <if test="isapply != null">
        #{isapply,jdbcType=INTEGER},
      </if>
      <if test="uniquekey != null">
        #{uniquekey,jdbcType=VARCHAR},
      </if>
      <if test="conrtent != null">
        #{conrtent,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    update tb_pluss_notice
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        userName = #{username,jdbcType=VARCHAR},
      </if>
      <if test="typefirst != null">
        typeFirst = #{typefirst,jdbcType=INTEGER},
      </if>
      <if test="typesecond != null">
        typeSecond = #{typesecond,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        desc = #{desc,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="noticecode != null">
        noticeCode = #{noticecode,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="isdeal != null">
        isDeal = #{isdeal,jdbcType=INTEGER},
      </if>
      <if test="isapply != null">
        isApply = #{isapply,jdbcType=INTEGER},
      </if>
      <if test="uniquekey != null">
        uniqueKey = #{uniquekey,jdbcType=VARCHAR},
      </if>
      <if test="conrtent != null">
        conrtent = #{conrtent,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    update tb_pluss_notice
    set userId = #{userid,jdbcType=VARCHAR},
      userName = #{username,jdbcType=VARCHAR},
      typeFirst = #{typefirst,jdbcType=INTEGER},
      typeSecond = #{typesecond,jdbcType=INTEGER},
      title = #{title,jdbcType=VARCHAR},
      desc = #{desc,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      noticeCode = #{noticecode,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      isDeal = #{isdeal,jdbcType=INTEGER},
      isApply = #{isapply,jdbcType=INTEGER},
      uniqueKey = #{uniquekey,jdbcType=VARCHAR},
      conrtent = #{conrtent,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
    update tb_pluss_notice
    set userId = #{userid,jdbcType=VARCHAR},
      userName = #{username,jdbcType=VARCHAR},
      typeFirst = #{typefirst,jdbcType=INTEGER},
      typeSecond = #{typesecond,jdbcType=INTEGER},
      title = #{title,jdbcType=VARCHAR},
      desc = #{desc,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      noticeCode = #{noticecode,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      isDeal = #{isdeal,jdbcType=INTEGER},
      isApply = #{isapply,jdbcType=INTEGER},
      uniqueKey = #{uniquekey,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>