<?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.yd.dal.mapper.customer.AclCustomerObjectShareTrackMapper">
  <resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclCustomerObjectShareTrack">
    <!--@mbg.generated-->
    <!--@Table ag_acl_customer_object_share_track-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="share_id" jdbcType="BIGINT" property="shareId" />
    <result column="share_code" jdbcType="VARCHAR" property="shareCode" />
    <result column="nickname" jdbcType="LONGVARCHAR" property="nickname" />
    <result column="gender" jdbcType="INTEGER" property="gender" />
    <result column="image_path" jdbcType="LONGVARCHAR" property="imagePath" />
    <result column="track_in_time" jdbcType="TIMESTAMP" property="trackInTime" />
    <result column="track_out_time" jdbcType="TIMESTAMP" property="trackOutTime" />
    <result column="region" jdbcType="VARCHAR" property="region" />
    <result column="source_from" jdbcType="LONGVARCHAR" property="sourceFrom" />
    <result column="entry_page" jdbcType="LONGVARCHAR" property="entryPage" />
    <result column="button_id" jdbcType="VARCHAR" property="buttonId" />
    <result column="anchor_id" jdbcType="VARCHAR" property="anchorId" />
    <result column="action_type" jdbcType="VARCHAR" property="actionType" />
    <result column="device_type" jdbcType="VARCHAR" property="deviceType" />
    <result column="ip_address" jdbcType="VARCHAR" property="ipAddress" />
    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
    <result column="created_by" jdbcType="BIGINT" property="createdBy" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, share_id, share_code, nickname, gender, image_path, track_in_time, track_out_time, 
    region, source_from, entry_page, button_id, anchor_id, action_type, device_type, 
    ip_address, created_at, created_by
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from ag_acl_customer_object_share_track
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from ag_acl_customer_object_share_track
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerObjectShareTrack" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into ag_acl_customer_object_share_track (share_id, share_code, nickname, 
      gender, image_path, track_in_time, 
      track_out_time, region, source_from, 
      entry_page, button_id, anchor_id, 
      action_type, device_type, ip_address, 
      created_at, created_by)
    values (#{shareId,jdbcType=BIGINT}, #{shareCode,jdbcType=VARCHAR}, #{nickname,jdbcType=LONGVARCHAR}, 
      #{gender,jdbcType=INTEGER}, #{imagePath,jdbcType=LONGVARCHAR}, #{trackInTime,jdbcType=TIMESTAMP}, 
      #{trackOutTime,jdbcType=TIMESTAMP}, #{region,jdbcType=VARCHAR}, #{sourceFrom,jdbcType=LONGVARCHAR}, 
      #{entryPage,jdbcType=LONGVARCHAR}, #{buttonId,jdbcType=VARCHAR}, #{anchorId,jdbcType=VARCHAR}, 
      #{actionType,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, #{ipAddress,jdbcType=VARCHAR}, 
      #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerObjectShareTrack" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into ag_acl_customer_object_share_track
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="shareId != null">
        share_id,
      </if>
      <if test="shareCode != null">
        share_code,
      </if>
      <if test="nickname != null">
        nickname,
      </if>
      <if test="gender != null">
        gender,
      </if>
      <if test="imagePath != null">
        image_path,
      </if>
      <if test="trackInTime != null">
        track_in_time,
      </if>
      <if test="trackOutTime != null">
        track_out_time,
      </if>
      <if test="region != null">
        region,
      </if>
      <if test="sourceFrom != null">
        source_from,
      </if>
      <if test="entryPage != null">
        entry_page,
      </if>
      <if test="buttonId != null">
        button_id,
      </if>
      <if test="anchorId != null">
        anchor_id,
      </if>
      <if test="actionType != null">
        action_type,
      </if>
      <if test="deviceType != null">
        device_type,
      </if>
      <if test="ipAddress != null">
        ip_address,
      </if>
      <if test="createdAt != null">
        created_at,
      </if>
      <if test="createdBy != null">
        created_by,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="shareId != null">
        #{shareId,jdbcType=BIGINT},
      </if>
      <if test="shareCode != null">
        #{shareCode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=LONGVARCHAR},
      </if>
      <if test="gender != null">
        #{gender,jdbcType=INTEGER},
      </if>
      <if test="imagePath != null">
        #{imagePath,jdbcType=LONGVARCHAR},
      </if>
      <if test="trackInTime != null">
        #{trackInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trackOutTime != null">
        #{trackOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="region != null">
        #{region,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        #{sourceFrom,jdbcType=LONGVARCHAR},
      </if>
      <if test="entryPage != null">
        #{entryPage,jdbcType=LONGVARCHAR},
      </if>
      <if test="buttonId != null">
        #{buttonId,jdbcType=VARCHAR},
      </if>
      <if test="anchorId != null">
        #{anchorId,jdbcType=VARCHAR},
      </if>
      <if test="actionType != null">
        #{actionType,jdbcType=VARCHAR},
      </if>
      <if test="deviceType != null">
        #{deviceType,jdbcType=VARCHAR},
      </if>
      <if test="ipAddress != null">
        #{ipAddress,jdbcType=VARCHAR},
      </if>
      <if test="createdAt != null">
        #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        #{createdBy,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclCustomerObjectShareTrack">
    <!--@mbg.generated-->
    update ag_acl_customer_object_share_track
    <set>
      <if test="shareId != null">
        share_id = #{shareId,jdbcType=BIGINT},
      </if>
      <if test="shareCode != null">
        share_code = #{shareCode,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null">
        nickname = #{nickname,jdbcType=LONGVARCHAR},
      </if>
      <if test="gender != null">
        gender = #{gender,jdbcType=INTEGER},
      </if>
      <if test="imagePath != null">
        image_path = #{imagePath,jdbcType=LONGVARCHAR},
      </if>
      <if test="trackInTime != null">
        track_in_time = #{trackInTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trackOutTime != null">
        track_out_time = #{trackOutTime,jdbcType=TIMESTAMP},
      </if>
      <if test="region != null">
        region = #{region,jdbcType=VARCHAR},
      </if>
      <if test="sourceFrom != null">
        source_from = #{sourceFrom,jdbcType=LONGVARCHAR},
      </if>
      <if test="entryPage != null">
        entry_page = #{entryPage,jdbcType=LONGVARCHAR},
      </if>
      <if test="buttonId != null">
        button_id = #{buttonId,jdbcType=VARCHAR},
      </if>
      <if test="anchorId != null">
        anchor_id = #{anchorId,jdbcType=VARCHAR},
      </if>
      <if test="actionType != null">
        action_type = #{actionType,jdbcType=VARCHAR},
      </if>
      <if test="deviceType != null">
        device_type = #{deviceType,jdbcType=VARCHAR},
      </if>
      <if test="ipAddress != null">
        ip_address = #{ipAddress,jdbcType=VARCHAR},
      </if>
      <if test="createdAt != null">
        created_at = #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        created_by = #{createdBy,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclCustomerObjectShareTrack">
    <!--@mbg.generated-->
    update ag_acl_customer_object_share_track
    set share_id = #{shareId,jdbcType=BIGINT},
      share_code = #{shareCode,jdbcType=VARCHAR},
      nickname = #{nickname,jdbcType=LONGVARCHAR},
      gender = #{gender,jdbcType=INTEGER},
      image_path = #{imagePath,jdbcType=LONGVARCHAR},
      track_in_time = #{trackInTime,jdbcType=TIMESTAMP},
      track_out_time = #{trackOutTime,jdbcType=TIMESTAMP},
      region = #{region,jdbcType=VARCHAR},
      source_from = #{sourceFrom,jdbcType=LONGVARCHAR},
      entry_page = #{entryPage,jdbcType=LONGVARCHAR},
      button_id = #{buttonId,jdbcType=VARCHAR},
      anchor_id = #{anchorId,jdbcType=VARCHAR},
      action_type = #{actionType,jdbcType=VARCHAR},
      device_type = #{deviceType,jdbcType=VARCHAR},
      ip_address = #{ipAddress,jdbcType=VARCHAR},
      created_at = #{createdAt,jdbcType=TIMESTAMP},
      created_by = #{createdBy,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>