<?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.TbPlussIdCardCacheMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussIdCardCache">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="certNo" jdbcType="VARCHAR" property="certno" />
    <result column="certStartTime" jdbcType="VARCHAR" property="certstarttime" />
    <result column="certEndTime" jdbcType="VARCHAR" property="certendtime" />
    <result column="imgPositive" jdbcType="VARCHAR" property="imgpositive" />
    <result column="address" jdbcType="VARCHAR" property="address" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, certNo, certStartTime, certEndTime, imgPositive, address
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_id_card_cache
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_id_card_cache
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussIdCardCache">
    insert into tb_pluss_id_card_cache (id, name, certNo, 
      certStartTime, certEndTime, imgPositive, 
      address)
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{certno,jdbcType=VARCHAR}, 
      #{certstarttime,jdbcType=VARCHAR}, #{certendtime,jdbcType=VARCHAR}, #{imgpositive,jdbcType=VARCHAR}, 
      #{address,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussIdCardCache">
    insert into tb_pluss_id_card_cache
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="certno != null">
        certNo,
      </if>
      <if test="certstarttime != null">
        certStartTime,
      </if>
      <if test="certendtime != null">
        certEndTime,
      </if>
      <if test="imgpositive != null">
        imgPositive,
      </if>
      <if test="address != null">
        address,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="certno != null">
        #{certno,jdbcType=VARCHAR},
      </if>
      <if test="certstarttime != null">
        #{certstarttime,jdbcType=VARCHAR},
      </if>
      <if test="certendtime != null">
        #{certendtime,jdbcType=VARCHAR},
      </if>
      <if test="imgpositive != null">
        #{imgpositive,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussIdCardCache">
    update tb_pluss_id_card_cache
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="certno != null">
        certNo = #{certno,jdbcType=VARCHAR},
      </if>
      <if test="certstarttime != null">
        certStartTime = #{certstarttime,jdbcType=VARCHAR},
      </if>
      <if test="certendtime != null">
        certEndTime = #{certendtime,jdbcType=VARCHAR},
      </if>
      <if test="imgpositive != null">
        imgPositive = #{imgpositive,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussIdCardCache">
    update tb_pluss_id_card_cache
    set name = #{name,jdbcType=VARCHAR},
      certNo = #{certno,jdbcType=VARCHAR},
      certStartTime = #{certstarttime,jdbcType=VARCHAR},
      certEndTime = #{certendtime,jdbcType=VARCHAR},
      imgPositive = #{imgpositive,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>