<?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="org.linlinjava.jz.db.dao.CustomerClientMapper">
  <resultMap id="BaseResultMap" type="org.linlinjava.jz.db.domain.CustomerClient">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="customer_no" jdbcType="VARCHAR" property="customerNo" />
    <result column="face" jdbcType="BIGINT" property="face" />
    <result column="nickname" jdbcType="VARCHAR" property="nickname" />
    <result column="tel" jdbcType="VARCHAR" property="tel" />
    <result column="customer_account" jdbcType="VARCHAR" property="customerAccount" />
    <result column="password" jdbcType="VARCHAR" property="password" />
    <result column="weixin_uinonid" jdbcType="VARCHAR" property="weixinUinonid" />
    <result column="weixin_openid" jdbcType="VARCHAR" property="weixinOpenid" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
    <result column="id_type" jdbcType="VARCHAR" property="idType" />
    <result column="customer_idcard" jdbcType="VARCHAR" property="customerIdcard" />
    <result column="idcard_expire" jdbcType="VARCHAR" property="idcardExpire" />
    <result column="gender" jdbcType="INTEGER" property="gender" />
    <result column="city" jdbcType="BIGINT" property="city" />
    <result column="area" jdbcType="VARCHAR" property="area" />
    <result column="customer_addr" jdbcType="VARCHAR" property="customerAddr" />
    <result column="idcard_front_url" jdbcType="BIGINT" property="idcardFrontUrl" />
    <result column="idcard_back_url" jdbcType="BIGINT" property="idcardBackUrl" />
    <result column="customer_level" jdbcType="VARCHAR" property="customerLevel" />
    <result column="source" jdbcType="VARCHAR" property="source" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
    <result column="oper_name" jdbcType="VARCHAR" property="operName" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_id" jdbcType="BIGINT" property="createId" />
    <result column="create_user" jdbcType="VARCHAR" property="createUser" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="oper_id" jdbcType="BIGINT" property="operId" />
    <result column="last_login_ip" jdbcType="VARCHAR" property="lastLoginIp" />
    <result column="session_key" jdbcType="VARCHAR" property="sessionKey" />
    <result column="channel_id" jdbcType="INTEGER" property="channelId" />
    <result column="is_dis" jdbcType="BIT" property="isDis" />
    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
    <result column="qr_url" jdbcType="VARCHAR" property="qrUrl" />
    <result column="birthday" jdbcType="TIMESTAMP" property="birthday" />
    <result column="customer_type" jdbcType="SMALLINT" property="customerType" />
    <result column="agent_id" jdbcType="INTEGER" property="agentId" />
    <result column="shop_id" jdbcType="INTEGER" property="shopId" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, customer_no, face, nickname, tel, customer_account, `password`, weixin_uinonid, 
    weixin_openid, `state`, customer_name, id_type, customer_idcard, idcard_expire, gender, 
    city, area, customer_addr, idcard_front_url, idcard_back_url, customer_level, `source`, 
    create_time, last_login_time, oper_name, remark, create_id, create_user, update_time, 
    oper_id, last_login_ip, session_key, channel_id, is_dis, avatar, qr_url, birthday, 
    customer_type, agent_id, shop_id
  </sql>
  <select id="selectByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClientExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from customer_client
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="example != null and example.distinct">
      distinct
    </if>
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_client
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example != null and example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from customer_client
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_client
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from customer_client
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClientExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from customer_client
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="org.linlinjava.jz.db.domain.CustomerClient">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into customer_client (customer_no, face, nickname, 
      tel, customer_account, `password`, 
      weixin_uinonid, weixin_openid, `state`, 
      customer_name, id_type, customer_idcard, 
      idcard_expire, gender, city, 
      area, customer_addr, idcard_front_url, 
      idcard_back_url, customer_level, `source`, 
      create_time, last_login_time, oper_name, 
      remark, create_id, create_user, 
      update_time, oper_id, last_login_ip, 
      session_key, channel_id, is_dis, 
      avatar, qr_url, birthday, 
      customer_type, agent_id, shop_id
      )
    values (#{customerNo,jdbcType=VARCHAR}, #{face,jdbcType=BIGINT}, #{nickname,jdbcType=VARCHAR}, 
      #{tel,jdbcType=VARCHAR}, #{customerAccount,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
      #{weixinUinonid,jdbcType=VARCHAR}, #{weixinOpenid,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, 
      #{customerName,jdbcType=VARCHAR}, #{idType,jdbcType=VARCHAR}, #{customerIdcard,jdbcType=VARCHAR}, 
      #{idcardExpire,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, #{city,jdbcType=BIGINT}, 
      #{area,jdbcType=VARCHAR}, #{customerAddr,jdbcType=VARCHAR}, #{idcardFrontUrl,jdbcType=BIGINT}, 
      #{idcardBackUrl,jdbcType=BIGINT}, #{customerLevel,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{lastLoginTime,jdbcType=TIMESTAMP}, #{operName,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{createId,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{operId,jdbcType=BIGINT}, #{lastLoginIp,jdbcType=VARCHAR}, 
      #{sessionKey,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER}, #{isDis,jdbcType=BIT}, 
      #{avatar,jdbcType=VARCHAR}, #{qrUrl,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, 
      #{customerType,jdbcType=SMALLINT}, #{agentId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="org.linlinjava.jz.db.domain.CustomerClient">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into customer_client
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="customerNo != null">
        customer_no,
      </if>
      <if test="face != null">
        face,
      </if>
      <if test="nickname != null">
        nickname,
      </if>
      <if test="tel != null">
        tel,
      </if>
      <if test="customerAccount != null">
        customer_account,
      </if>
      <if test="password != null">
        `password`,
      </if>
      <if test="weixinUinonid != null">
        weixin_uinonid,
      </if>
      <if test="weixinOpenid != null">
        weixin_openid,
      </if>
      <if test="state != null">
        `state`,
      </if>
      <if test="customerName != null">
        customer_name,
      </if>
      <if test="idType != null">
        id_type,
      </if>
      <if test="customerIdcard != null">
        customer_idcard,
      </if>
      <if test="idcardExpire != null">
        idcard_expire,
      </if>
      <if test="gender != null">
        gender,
      </if>
      <if test="city != null">
        city,
      </if>
      <if test="area != null">
        area,
      </if>
      <if test="customerAddr != null">
        customer_addr,
      </if>
      <if test="idcardFrontUrl != null">
        idcard_front_url,
      </if>
      <if test="idcardBackUrl != null">
        idcard_back_url,
      </if>
      <if test="customerLevel != null">
        customer_level,
      </if>
      <if test="source != null">
        `source`,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="lastLoginTime != null">
        last_login_time,
      </if>
      <if test="operName != null">
        oper_name,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createId != null">
        create_id,
      </if>
      <if test="createUser != null">
        create_user,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="operId != null">
        oper_id,
      </if>
      <if test="lastLoginIp != null">
        last_login_ip,
      </if>
      <if test="sessionKey != null">
        session_key,
      </if>
      <if test="channelId != null">
        channel_id,
      </if>
      <if test="isDis != null">
        is_dis,
      </if>
      <if test="avatar != null">
        avatar,
      </if>
      <if test="qrUrl != null">
        qr_url,
      </if>
      <if test="birthday != null">
        birthday,
      </if>
      <if test="customerType != null">
        customer_type,
      </if>
      <if test="agentId != null">
        agent_id,
      </if>
      <if test="shopId != null">
        shop_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="customerNo != null">
        #{customerNo,jdbcType=VARCHAR},
      </if>
      <if test="face != null">
        #{face,jdbcType=BIGINT},
      </if>
      <if test="nickname != null">
        #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="tel != null">
        #{tel,jdbcType=VARCHAR},
      </if>
      <if test="customerAccount != null">
        #{customerAccount,jdbcType=VARCHAR},
      </if>
      <if test="password != null">
        #{password,jdbcType=VARCHAR},
      </if>
      <if test="weixinUinonid != null">
        #{weixinUinonid,jdbcType=VARCHAR},
      </if>
      <if test="weixinOpenid != null">
        #{weixinOpenid,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        #{state,jdbcType=INTEGER},
      </if>
      <if test="customerName != null">
        #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="idType != null">
        #{idType,jdbcType=VARCHAR},
      </if>
      <if test="customerIdcard != null">
        #{customerIdcard,jdbcType=VARCHAR},
      </if>
      <if test="idcardExpire != null">
        #{idcardExpire,jdbcType=VARCHAR},
      </if>
      <if test="gender != null">
        #{gender,jdbcType=INTEGER},
      </if>
      <if test="city != null">
        #{city,jdbcType=BIGINT},
      </if>
      <if test="area != null">
        #{area,jdbcType=VARCHAR},
      </if>
      <if test="customerAddr != null">
        #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="idcardFrontUrl != null">
        #{idcardFrontUrl,jdbcType=BIGINT},
      </if>
      <if test="idcardBackUrl != null">
        #{idcardBackUrl,jdbcType=BIGINT},
      </if>
      <if test="customerLevel != null">
        #{customerLevel,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        #{source,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastLoginTime != null">
        #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operName != null">
        #{operName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operId != null">
        #{operId,jdbcType=BIGINT},
      </if>
      <if test="lastLoginIp != null">
        #{lastLoginIp,jdbcType=VARCHAR},
      </if>
      <if test="sessionKey != null">
        #{sessionKey,jdbcType=VARCHAR},
      </if>
      <if test="channelId != null">
        #{channelId,jdbcType=INTEGER},
      </if>
      <if test="isDis != null">
        #{isDis,jdbcType=BIT},
      </if>
      <if test="avatar != null">
        #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="qrUrl != null">
        #{qrUrl,jdbcType=VARCHAR},
      </if>
      <if test="birthday != null">
        #{birthday,jdbcType=TIMESTAMP},
      </if>
      <if test="customerType != null">
        #{customerType,jdbcType=SMALLINT},
      </if>
      <if test="agentId != null">
        #{agentId,jdbcType=INTEGER},
      </if>
      <if test="shopId != null">
        #{shopId,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClientExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from customer_client
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update customer_client
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.customerNo != null">
        customer_no = #{record.customerNo,jdbcType=VARCHAR},
      </if>
      <if test="record.face != null">
        face = #{record.face,jdbcType=BIGINT},
      </if>
      <if test="record.nickname != null">
        nickname = #{record.nickname,jdbcType=VARCHAR},
      </if>
      <if test="record.tel != null">
        tel = #{record.tel,jdbcType=VARCHAR},
      </if>
      <if test="record.customerAccount != null">
        customer_account = #{record.customerAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.password != null">
        `password` = #{record.password,jdbcType=VARCHAR},
      </if>
      <if test="record.weixinUinonid != null">
        weixin_uinonid = #{record.weixinUinonid,jdbcType=VARCHAR},
      </if>
      <if test="record.weixinOpenid != null">
        weixin_openid = #{record.weixinOpenid,jdbcType=VARCHAR},
      </if>
      <if test="record.state != null">
        `state` = #{record.state,jdbcType=INTEGER},
      </if>
      <if test="record.customerName != null">
        customer_name = #{record.customerName,jdbcType=VARCHAR},
      </if>
      <if test="record.idType != null">
        id_type = #{record.idType,jdbcType=VARCHAR},
      </if>
      <if test="record.customerIdcard != null">
        customer_idcard = #{record.customerIdcard,jdbcType=VARCHAR},
      </if>
      <if test="record.idcardExpire != null">
        idcard_expire = #{record.idcardExpire,jdbcType=VARCHAR},
      </if>
      <if test="record.gender != null">
        gender = #{record.gender,jdbcType=INTEGER},
      </if>
      <if test="record.city != null">
        city = #{record.city,jdbcType=BIGINT},
      </if>
      <if test="record.area != null">
        area = #{record.area,jdbcType=VARCHAR},
      </if>
      <if test="record.customerAddr != null">
        customer_addr = #{record.customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="record.idcardFrontUrl != null">
        idcard_front_url = #{record.idcardFrontUrl,jdbcType=BIGINT},
      </if>
      <if test="record.idcardBackUrl != null">
        idcard_back_url = #{record.idcardBackUrl,jdbcType=BIGINT},
      </if>
      <if test="record.customerLevel != null">
        customer_level = #{record.customerLevel,jdbcType=VARCHAR},
      </if>
      <if test="record.source != null">
        `source` = #{record.source,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.lastLoginTime != null">
        last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.operName != null">
        oper_name = #{record.operName,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createId != null">
        create_id = #{record.createId,jdbcType=BIGINT},
      </if>
      <if test="record.createUser != null">
        create_user = #{record.createUser,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.operId != null">
        oper_id = #{record.operId,jdbcType=BIGINT},
      </if>
      <if test="record.lastLoginIp != null">
        last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR},
      </if>
      <if test="record.sessionKey != null">
        session_key = #{record.sessionKey,jdbcType=VARCHAR},
      </if>
      <if test="record.channelId != null">
        channel_id = #{record.channelId,jdbcType=INTEGER},
      </if>
      <if test="record.isDis != null">
        is_dis = #{record.isDis,jdbcType=BIT},
      </if>
      <if test="record.avatar != null">
        avatar = #{record.avatar,jdbcType=VARCHAR},
      </if>
      <if test="record.qrUrl != null">
        qr_url = #{record.qrUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.birthday != null">
        birthday = #{record.birthday,jdbcType=TIMESTAMP},
      </if>
      <if test="record.customerType != null">
        customer_type = #{record.customerType,jdbcType=SMALLINT},
      </if>
      <if test="record.agentId != null">
        agent_id = #{record.agentId,jdbcType=INTEGER},
      </if>
      <if test="record.shopId != null">
        shop_id = #{record.shopId,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update customer_client
    set id = #{record.id,jdbcType=BIGINT},
      customer_no = #{record.customerNo,jdbcType=VARCHAR},
      face = #{record.face,jdbcType=BIGINT},
      nickname = #{record.nickname,jdbcType=VARCHAR},
      tel = #{record.tel,jdbcType=VARCHAR},
      customer_account = #{record.customerAccount,jdbcType=VARCHAR},
      `password` = #{record.password,jdbcType=VARCHAR},
      weixin_uinonid = #{record.weixinUinonid,jdbcType=VARCHAR},
      weixin_openid = #{record.weixinOpenid,jdbcType=VARCHAR},
      `state` = #{record.state,jdbcType=INTEGER},
      customer_name = #{record.customerName,jdbcType=VARCHAR},
      id_type = #{record.idType,jdbcType=VARCHAR},
      customer_idcard = #{record.customerIdcard,jdbcType=VARCHAR},
      idcard_expire = #{record.idcardExpire,jdbcType=VARCHAR},
      gender = #{record.gender,jdbcType=INTEGER},
      city = #{record.city,jdbcType=BIGINT},
      area = #{record.area,jdbcType=VARCHAR},
      customer_addr = #{record.customerAddr,jdbcType=VARCHAR},
      idcard_front_url = #{record.idcardFrontUrl,jdbcType=BIGINT},
      idcard_back_url = #{record.idcardBackUrl,jdbcType=BIGINT},
      customer_level = #{record.customerLevel,jdbcType=VARCHAR},
      `source` = #{record.source,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
      oper_name = #{record.operName,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_id = #{record.createId,jdbcType=BIGINT},
      create_user = #{record.createUser,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      oper_id = #{record.operId,jdbcType=BIGINT},
      last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR},
      session_key = #{record.sessionKey,jdbcType=VARCHAR},
      channel_id = #{record.channelId,jdbcType=INTEGER},
      is_dis = #{record.isDis,jdbcType=BIT},
      avatar = #{record.avatar,jdbcType=VARCHAR},
      qr_url = #{record.qrUrl,jdbcType=VARCHAR},
      birthday = #{record.birthday,jdbcType=TIMESTAMP},
      customer_type = #{record.customerType,jdbcType=SMALLINT},
      agent_id = #{record.agentId,jdbcType=INTEGER},
      shop_id = #{record.shopId,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.jz.db.domain.CustomerClient">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update customer_client
    <set>
      <if test="customerNo != null">
        customer_no = #{customerNo,jdbcType=VARCHAR},
      </if>
      <if test="face != null">
        face = #{face,jdbcType=BIGINT},
      </if>
      <if test="nickname != null">
        nickname = #{nickname,jdbcType=VARCHAR},
      </if>
      <if test="tel != null">
        tel = #{tel,jdbcType=VARCHAR},
      </if>
      <if test="customerAccount != null">
        customer_account = #{customerAccount,jdbcType=VARCHAR},
      </if>
      <if test="password != null">
        `password` = #{password,jdbcType=VARCHAR},
      </if>
      <if test="weixinUinonid != null">
        weixin_uinonid = #{weixinUinonid,jdbcType=VARCHAR},
      </if>
      <if test="weixinOpenid != null">
        weixin_openid = #{weixinOpenid,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        `state` = #{state,jdbcType=INTEGER},
      </if>
      <if test="customerName != null">
        customer_name = #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="idType != null">
        id_type = #{idType,jdbcType=VARCHAR},
      </if>
      <if test="customerIdcard != null">
        customer_idcard = #{customerIdcard,jdbcType=VARCHAR},
      </if>
      <if test="idcardExpire != null">
        idcard_expire = #{idcardExpire,jdbcType=VARCHAR},
      </if>
      <if test="gender != null">
        gender = #{gender,jdbcType=INTEGER},
      </if>
      <if test="city != null">
        city = #{city,jdbcType=BIGINT},
      </if>
      <if test="area != null">
        area = #{area,jdbcType=VARCHAR},
      </if>
      <if test="customerAddr != null">
        customer_addr = #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="idcardFrontUrl != null">
        idcard_front_url = #{idcardFrontUrl,jdbcType=BIGINT},
      </if>
      <if test="idcardBackUrl != null">
        idcard_back_url = #{idcardBackUrl,jdbcType=BIGINT},
      </if>
      <if test="customerLevel != null">
        customer_level = #{customerLevel,jdbcType=VARCHAR},
      </if>
      <if test="source != null">
        `source` = #{source,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastLoginTime != null">
        last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operName != null">
        oper_name = #{operName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        create_id = #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        create_user = #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operId != null">
        oper_id = #{operId,jdbcType=BIGINT},
      </if>
      <if test="lastLoginIp != null">
        last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
      </if>
      <if test="sessionKey != null">
        session_key = #{sessionKey,jdbcType=VARCHAR},
      </if>
      <if test="channelId != null">
        channel_id = #{channelId,jdbcType=INTEGER},
      </if>
      <if test="isDis != null">
        is_dis = #{isDis,jdbcType=BIT},
      </if>
      <if test="avatar != null">
        avatar = #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="qrUrl != null">
        qr_url = #{qrUrl,jdbcType=VARCHAR},
      </if>
      <if test="birthday != null">
        birthday = #{birthday,jdbcType=TIMESTAMP},
      </if>
      <if test="customerType != null">
        customer_type = #{customerType,jdbcType=SMALLINT},
      </if>
      <if test="agentId != null">
        agent_id = #{agentId,jdbcType=INTEGER},
      </if>
      <if test="shopId != null">
        shop_id = #{shopId,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="org.linlinjava.jz.db.domain.CustomerClient">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update customer_client
    set customer_no = #{customerNo,jdbcType=VARCHAR},
      face = #{face,jdbcType=BIGINT},
      nickname = #{nickname,jdbcType=VARCHAR},
      tel = #{tel,jdbcType=VARCHAR},
      customer_account = #{customerAccount,jdbcType=VARCHAR},
      `password` = #{password,jdbcType=VARCHAR},
      weixin_uinonid = #{weixinUinonid,jdbcType=VARCHAR},
      weixin_openid = #{weixinOpenid,jdbcType=VARCHAR},
      `state` = #{state,jdbcType=INTEGER},
      customer_name = #{customerName,jdbcType=VARCHAR},
      id_type = #{idType,jdbcType=VARCHAR},
      customer_idcard = #{customerIdcard,jdbcType=VARCHAR},
      idcard_expire = #{idcardExpire,jdbcType=VARCHAR},
      gender = #{gender,jdbcType=INTEGER},
      city = #{city,jdbcType=BIGINT},
      area = #{area,jdbcType=VARCHAR},
      customer_addr = #{customerAddr,jdbcType=VARCHAR},
      idcard_front_url = #{idcardFrontUrl,jdbcType=BIGINT},
      idcard_back_url = #{idcardBackUrl,jdbcType=BIGINT},
      customer_level = #{customerLevel,jdbcType=VARCHAR},
      `source` = #{source,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      oper_name = #{operName,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      create_id = #{createId,jdbcType=BIGINT},
      create_user = #{createUser,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      oper_id = #{operId,jdbcType=BIGINT},
      last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
      session_key = #{sessionKey,jdbcType=VARCHAR},
      channel_id = #{channelId,jdbcType=INTEGER},
      is_dis = #{isDis,jdbcType=BIT},
      avatar = #{avatar,jdbcType=VARCHAR},
      qr_url = #{qrUrl,jdbcType=VARCHAR},
      birthday = #{birthday,jdbcType=TIMESTAMP},
      customer_type = #{customerType,jdbcType=SMALLINT},
      agent_id = #{agentId,jdbcType=INTEGER},
      shop_id = #{shopId,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectOneByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClientExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <include refid="Base_Column_List" />
    from customer_client
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_client
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example != null and example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
    limit 1
  </select>
</mapper>