<?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.community.huiju.dao.TaPublicMonitorMapper" >
  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaPublicMonitor" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="community_id" property="communityId" jdbcType="INTEGER" />
    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, community_id, ta_user_verify_id, create_date
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from ta_public_monitor
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from ta_public_monitor
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.community.huiju.model.TaPublicMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
    insert into ta_public_monitor (id, community_id, ta_user_verify_id, 
      create_date)
    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, 
      #{createDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.community.huiju.model.TaPublicMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
    insert into ta_public_monitor
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="communityId != null" >
        community_id,
      </if>
      <if test="taUserVerifyId != null" >
        ta_user_verify_id,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="communityId != null" >
        #{communityId,jdbcType=INTEGER},
      </if>
      <if test="taUserVerifyId != null" >
        #{taUserVerifyId,jdbcType=INTEGER},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaPublicMonitor" >
    update ta_public_monitor
    <set >
      <if test="communityId != null" >
        community_id = #{communityId,jdbcType=INTEGER},
      </if>
      <if test="taUserVerifyId != null" >
        ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaPublicMonitor" >
    update ta_public_monitor
    set community_id = #{communityId,jdbcType=INTEGER},
      ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>