<?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.TbPlussAgreementMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="discern" jdbcType="VARCHAR" property="discern" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="createor" jdbcType="VARCHAR" property="createor" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    <result column="content" jdbcType="LONGVARCHAR" property="content" />
  </resultMap>
  <sql id="Base_Column_List">
    id, discern, name, createDt, createor
  </sql>
  <sql id="Blob_Column_List">
    content
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_agreement
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_agreement
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    insert into tb_pluss_agreement (id, discern, name, 
      createDt, createor, content
      )
    values (#{id,jdbcType=INTEGER}, #{discern,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{createdt,jdbcType=TIMESTAMP}, #{createor,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    insert into tb_pluss_agreement
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="discern != null">
        discern,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="createor != null">
        createor,
      </if>
      <if test="content != null">
        content,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="discern != null">
        #{discern,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="createor != null">
        #{createor,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        #{content,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    update tb_pluss_agreement
    <set>
      <if test="discern != null">
        discern = #{discern,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="createor != null">
        createor = #{createor,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    update tb_pluss_agreement
    set discern = #{discern,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      createor = #{createor,jdbcType=VARCHAR},
      content = #{content,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAgreement">
    update tb_pluss_agreement
    set discern = #{discern,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      createor = #{createor,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>