<?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.goafanti.common.dao.UserMidMapper">
  <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserMid">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="uid" jdbcType="VARCHAR" property="uid" />
    <result column="aid" jdbcType="VARCHAR" property="aid" />
    <result column="last_follow_time" jdbcType="TIMESTAMP" property="lastFollowTime" />
    <result column="last_sign_time" jdbcType="TIMESTAMP" property="lastSignTime" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="big_customer" jdbcType="INTEGER" property="bigCustomer" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    select 
    <include refid="Base_Column_List" />
    from user_mid
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    delete from user_mid
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.goafanti.common.model.UserMid">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    insert into user_mid (id, `uid`, aid, 
      last_follow_time, last_sign_time, create_time, 
      big_customer)
    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
      #{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
      #{bigCustomer,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    insert into user_mid
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="uid != null">
        `uid`,
      </if>
      <if test="aid != null">
        aid,
      </if>
      <if test="lastFollowTime != null">
        last_follow_time,
      </if>
      <if test="lastSignTime != null">
        last_sign_time,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="bigCustomer != null">
        big_customer,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="uid != null">
        #{uid,jdbcType=VARCHAR},
      </if>
      <if test="aid != null">
        #{aid,jdbcType=VARCHAR},
      </if>
      <if test="lastFollowTime != null">
        #{lastFollowTime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastSignTime != null">
        #{lastSignTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bigCustomer != null">
        #{bigCustomer,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserMid">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    update user_mid
    <set>
      <if test="uid != null">
        `uid` = #{uid,jdbcType=VARCHAR},
      </if>
      <if test="aid != null">
        aid = #{aid,jdbcType=VARCHAR},
      </if>
      <if test="lastFollowTime != null">
        last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastSignTime != null">
        last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bigCustomer != null">
        big_customer = #{bigCustomer,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserMid">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu May 06 15:37:38 CST 2021.
    -->
    update user_mid
    set `uid` = #{uid,jdbcType=VARCHAR},
      aid = #{aid,jdbcType=VARCHAR},
      last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
      last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      big_customer = #{bigCustomer,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  
  <update id="updateByUid" parameterType="com.goafanti.common.model.UserMid">
    update user_mid
    <set>
      <if test="aid != null">
        aid = #{aid,jdbcType=VARCHAR},
      </if>
      <if test="lastFollowTime != null">
        last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastSignTime != null">
        last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="bigCustomer != null">
        big_customer = #{bigCustomer,jdbcType=INTEGER},
      </if>
    </set>
    where `uid` = #{uid,jdbcType=VARCHAR}
  </update>
</mapper>