admin
2019-09-08 2db0485ab8aa814499adf49112c5aa9e4c9e78b2
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoExtraMapper.xml
@@ -2,191 +2,282 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserInfoExtraMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
    <id column="uie_id" property="id" jdbcType="BIGINT"/>
    <result column="uie_rank_source" property="rankSource" jdbcType="INTEGER"/>
    <result column="uie_rank_order_num" property="rankOrderNum" jdbcType="INTEGER"/>
    <result column="uie_rank_update_time" property="rankUpdateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR"/>
    <result column="uie_lottery_newbies" property="lotteryNewbies" jdbcType="INTEGER"/>
    <result column="uie_coupon_news" property="couponNews" jdbcType="INTEGER"/>
    <result column="uie_synch_navbar" property="synchNavbar" jdbcType="VARCHAR"/>
    <result column="uie_first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
    <result column="uie_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="uie_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_sex" property="sex" jdbcType="INTEGER"/>
    <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR"/>
    <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER"/>
    <association property="userInfo" column="uie_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
      <id column="uie_uid" property="id" jdbcType="BIGINT" />
   </association>
     <association property="userRank" column="uie_rank_id" javaType="com.yeshi.fanli.entity.bus.user.UserRank">
      <id column="uie_rank_id" property="id" jdbcType="BIGINT" />
   </association>
  </resultMap>
   <resultMap id="VOResultMap" type="com.yeshi.fanli.vo.user.UserInfoExtraVO">
    <id column="uie_id" property="id" jdbcType="BIGINT"/>
    <result column="uie_rank_source" property="rankSource" jdbcType="INTEGER"/>
    <result column="uie_rank_order_num" property="rankOrderNum" jdbcType="INTEGER"/>
    <result column="uie_rank_update_time" property="rankUpdateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR"/>
    <result column="uie_lottery_newbies" property="lotteryNewbies" jdbcType="INTEGER"/>
    <result column="uie_coupon_news" property="couponNews" jdbcType="INTEGER"/>
    <result column="uie_synch_navbar" property="synchNavbar" jdbcType="VARCHAR"/>
    <result column="uie_first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
    <result column="uie_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="uie_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_sex" property="sex" jdbcType="INTEGER"/>
    <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR"/>
    <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER"/>
    <association property="userInfo" column="uie_uid"
       resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap"/>
     <association property="userRank" column="uie_rank_id"
        resultMap="com.yeshi.fanli.dao.mybatis.user.UserRankMapper.BaseResultMap"/>
  </resultMap>
  <resultMap id="AllResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
  <id column="uie_id" property="id" jdbcType="BIGINT"/>
    <result column="uie_rank_source" property="rankSource" jdbcType="INTEGER"/>
    <result column="uie_rank_order_num" property="rankOrderNum" jdbcType="INTEGER"/>
    <result column="uie_rank_update_time" property="rankUpdateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR"/>
    <result column="uie_lottery_newbies" property="lotteryNewbies" jdbcType="INTEGER"/>
    <result column="uie_coupon_news" property="couponNews" jdbcType="INTEGER"/>
    <result column="uie_synch_navbar" property="synchNavbar" jdbcType="VARCHAR"/>
    <result column="uie_first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
    <result column="uie_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="uie_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="uie_sex" property="sex" jdbcType="INTEGER"/>
    <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR"/>
    <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER"/>
    <association property="userInfo" column="uie_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
      <id column="uie_uid" property="id" jdbcType="BIGINT" />
   </association>
   <association property="userRank" column="uie_rank_id"
       resultMap="com.yeshi.fanli.dao.mybatis.user.UserRankMapper.BaseResultMap"/>
  </resultMap>
  <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_info_extra (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{lotteryNewbies,jdbcType=INTEGER},#{couponNews,jdbcType=INTEGER},#{synchNavbar,jdbcType=VARCHAR},#{firstLoginTime,jdbcType=TIMESTAMP},#{sex,jdbcType=INTEGER},#{weiXin,jdbcType=VARCHAR},#{goldCoin,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_info_extra
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">uie_id,</if>
      <if test="userInfo != null">uie_uid,</if>
      <if test="userRank != null">uie_rank_id,</if>
      <if test="rankSource != null">uie_rank_source,</if>
      <if test="rankOrderNum != null">uie_rank_order_num,</if>
      <if test="rankUpdateTime != null">uie_rank_update_time,</if>
      <if test="inviteCode != null">uie_invite_code,</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies,</if>
      <if test="couponNews != null">uie_coupon_news,</if>
      <if test="synchNavbar != null">uie_synch_navbar,</if>
      <if test="firstLoginTime != null">uie_first_login_time,</if>
      <if test="sex != null">uie_sex,</if>
      <if test="weiXin != null">uie_weixin,</if>
      <if test="goldCoin != null">uie_gold_coin,</if>
      <if test="createTime != null">uie_create_time,</if>
      <if test="updateTime != null">uie_update_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="userRank != null">#{userRank.id,jdbcType=BIGINT},</if>
      <if test="rankSource != null">#{rankSource,jdbcType=INTEGER},</if>
      <if test="rankOrderNum != null">#{rankOrderNum,jdbcType=INTEGER},</if>
      <if test="rankUpdateTime != null">#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
      <if test="inviteCode != null">#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="firstLoginTime != null">#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="sex != null">#{sex,jdbcType=INTEGER},</if>
      <if test="weiXin != null">#{weiXin,jdbcType=VARCHAR},</if>
      <if test="goldCoin != null">#{goldCoin,jdbcType=INTEGER},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update yeshi_ec_user_info_extra set uie_uid = #{userInfo.id,jdbcType=BIGINT},uie_rank_id = #{userRank.id,jdbcType=BIGINT},uie_rank_source = #{rankSource,jdbcType=INTEGER},uie_rank_order_num = #{rankOrderNum,jdbcType=INTEGER},uie_rank_update_time = #{rankUpdateTime,jdbcType=TIMESTAMP},uie_invite_code = #{inviteCode,jdbcType=VARCHAR},uie_lottery_newbies = #{lotteryNewbies,jdbcType=INTEGER},uie_coupon_news = #{couponNews,jdbcType=INTEGER},uie_synch_navbar = #{synchNavbar,jdbcType=VARCHAR},uie_first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP},uie_sex = #{sex,jdbcType=INTEGER},uie_weixin = #{weiXin,jdbcType=VARCHAR},uie_gold_coin = #{goldCoin,jdbcType=INTEGER},uie_create_time = #{createTime,jdbcType=TIMESTAMP},uie_update_time = #{updateTime,jdbcType=TIMESTAMP} where uie_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update yeshi_ec_user_info_extra
    <set>
      <if test="userInfo != null">uie_uid=#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
      <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
      <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
      <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
      <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
      <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
      <if test="goldCoin != null">uie_gold_coin=#{goldCoin,jdbcType=INTEGER},</if>
      <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where uie_id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateInfoExtraByUid" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
     update yeshi_ec_user_info_extra
    <set>
      <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
      <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
      <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
      <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
      <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
      <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
      <if test="goldCoin != null">uie_gold_coin=#{goldCoin,jdbcType=INTEGER},</if>
      <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where uie_uid = #{userInfo.id,jdbcType=BIGINT}
  </update>
   <select id="getInfoExtraByUid" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_user_info_extra
   <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
      <id column="uie_id" property="id" jdbcType="BIGINT" />
      <result column="uie_rank_source" property="rankSource"
         jdbcType="INTEGER" />
      <result column="uie_rank_order_num" property="rankOrderNum"
         jdbcType="INTEGER" />
      <result column="uie_rank_update_time" property="rankUpdateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_invite_code" property="inviteCode"
         jdbcType="VARCHAR" />
      <result column="uie_lottery_newbies" property="lotteryNewbies"
         jdbcType="INTEGER" />
      <result column="uie_coupon_news" property="couponNews"
         jdbcType="INTEGER" />
      <result column="uie_synch_navbar" property="synchNavbar"
         jdbcType="VARCHAR" />
      <result column="uie_first_login_time" property="firstLoginTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_create_time" property="createTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_update_time" property="updateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_sex" property="sex" jdbcType="INTEGER" />
      <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR" />
      <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
      <result column="uie_auto_extract" property="autoExtract"
         jdbcType="BOOLEAN" />
      <association property="userInfo" column="uie_uid"
         javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
         <id column="uie_uid" property="id" jdbcType="BIGINT" />
      </association>
      <association property="userRank" column="uie_rank_id"
         javaType="com.yeshi.fanli.entity.bus.user.UserRank">
         <id column="uie_rank_id" property="id" jdbcType="BIGINT" />
      </association>
   </resultMap>
   <resultMap id="VOResultMap" type="com.yeshi.fanli.vo.user.UserInfoExtraVO">
      <id column="uie_id" property="id" jdbcType="BIGINT" />
      <result column="uie_rank_source" property="rankSource"
         jdbcType="INTEGER" />
      <result column="uie_rank_order_num" property="rankOrderNum"
         jdbcType="INTEGER" />
      <result column="uie_rank_update_time" property="rankUpdateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_invite_code" property="inviteCode"
         jdbcType="VARCHAR" />
      <result column="uie_lottery_newbies" property="lotteryNewbies"
         jdbcType="INTEGER" />
      <result column="uie_coupon_news" property="couponNews"
         jdbcType="INTEGER" />
      <result column="uie_synch_navbar" property="synchNavbar"
         jdbcType="VARCHAR" />
      <result column="uie_first_login_time" property="firstLoginTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_create_time" property="createTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_update_time" property="updateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_sex" property="sex" jdbcType="INTEGER" />
      <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR" />
      <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
      <result column="uie_auto_extract" property="autoExtract"
         jdbcType="BOOLEAN" />
      <association property="userInfo" column="uie_uid"
         resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap" />
      <association property="userRank" column="uie_rank_id"
         resultMap="com.yeshi.fanli.dao.mybatis.user.UserRankMapper.BaseResultMap" />
   </resultMap>
   <resultMap id="AllResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
      <id column="uie_id" property="id" jdbcType="BIGINT" />
      <result column="uie_rank_source" property="rankSource"
         jdbcType="INTEGER" />
      <result column="uie_rank_order_num" property="rankOrderNum"
         jdbcType="INTEGER" />
      <result column="uie_rank_update_time" property="rankUpdateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_invite_code" property="inviteCode"
         jdbcType="VARCHAR" />
      <result column="uie_lottery_newbies" property="lotteryNewbies"
         jdbcType="INTEGER" />
      <result column="uie_coupon_news" property="couponNews"
         jdbcType="INTEGER" />
      <result column="uie_synch_navbar" property="synchNavbar"
         jdbcType="VARCHAR" />
      <result column="uie_first_login_time" property="firstLoginTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_create_time" property="createTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_update_time" property="updateTime"
         jdbcType="TIMESTAMP" />
      <result column="uie_sex" property="sex" jdbcType="INTEGER" />
      <result column="uie_weixin" property="weiXin" jdbcType="VARCHAR" />
      <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
      <result column="uie_auto_extract" property="autoExtract"
         jdbcType="BOOLEAN" />
      <association property="userInfo" column="uie_uid"
         javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
         <id column="uie_uid" property="id" jdbcType="BIGINT" />
      </association>
      <association property="userRank" column="uie_rank_id"
         resultMap="com.yeshi.fanli.dao.mybatis.user.UserRankMapper.BaseResultMap" />
   </resultMap>
   <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_auto_extract
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
      yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}</delete>
   <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra"
      useGeneratedKeys="true" keyProperty="id">insert into
      yeshi_ec_user_info_extra
      (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_auto_extract)
      values
      (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{lotteryNewbies,jdbcType=INTEGER},#{couponNews,jdbcType=INTEGER},#{synchNavbar,jdbcType=VARCHAR},#{firstLoginTime,jdbcType=TIMESTAMP},#{sex,jdbcType=INTEGER},#{weiXin,jdbcType=VARCHAR},#{goldCoin,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{autoExtract,jdbcType=BOOLEAN})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra"
      useGeneratedKeys="true" keyProperty="id">
      insert into yeshi_ec_user_info_extra
      <trim prefix="(" suffix=")" suffixOverrides=",">
         <if test="id != null">uie_id,</if>
         <if test="userInfo != null">uie_uid,</if>
         <if test="userRank != null">uie_rank_id,</if>
         <if test="rankSource != null">uie_rank_source,</if>
         <if test="rankOrderNum != null">uie_rank_order_num,</if>
         <if test="rankUpdateTime != null">uie_rank_update_time,</if>
         <if test="inviteCode != null">uie_invite_code,</if>
         <if test="lotteryNewbies != null">uie_lottery_newbies,</if>
         <if test="couponNews != null">uie_coupon_news,</if>
         <if test="synchNavbar != null">uie_synch_navbar,</if>
         <if test="firstLoginTime != null">uie_first_login_time,</if>
         <if test="sex != null">uie_sex,</if>
         <if test="weiXin != null">uie_weixin,</if>
         <if test="goldCoin != null">uie_gold_coin,</if>
         <if test="createTime != null">uie_create_time,</if>
         <if test="updateTime != null">uie_update_time,</if>
         <if test="autoExtract != null">uie_auto_extract,</if>
      </trim>
      values
      <trim prefix="(" suffix=")" suffixOverrides=",">
         <if test="id != null">#{id,jdbcType=BIGINT},</if>
         <if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if>
         <if test="userRank != null">#{userRank.id,jdbcType=BIGINT},</if>
         <if test="rankSource != null">#{rankSource,jdbcType=INTEGER},</if>
         <if test="rankOrderNum != null">#{rankOrderNum,jdbcType=INTEGER},</if>
         <if test="rankUpdateTime != null">#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
         <if test="inviteCode != null">#{inviteCode,jdbcType=VARCHAR},</if>
         <if test="lotteryNewbies != null">#{lotteryNewbies,jdbcType=INTEGER},</if>
         <if test="couponNews != null">#{couponNews,jdbcType=INTEGER},</if>
         <if test="synchNavbar != null">#{synchNavbar,jdbcType=VARCHAR},</if>
         <if test="firstLoginTime != null">#{firstLoginTime,jdbcType=TIMESTAMP},</if>
         <if test="sex != null">#{sex,jdbcType=INTEGER},</if>
         <if test="weiXin != null">#{weiXin,jdbcType=VARCHAR},</if>
         <if test="goldCoin != null">#{goldCoin,jdbcType=INTEGER},</if>
         <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="autoExtract != null">#{autoExtract,jdbcType=BOOLEAN},</if>
      </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update
      yeshi_ec_user_info_extra set uie_uid =
      #{userInfo.id,jdbcType=BIGINT},uie_rank_id =
      #{userRank.id,jdbcType=BIGINT},uie_rank_source =
      #{rankSource,jdbcType=INTEGER},uie_rank_order_num =
      #{rankOrderNum,jdbcType=INTEGER},uie_rank_update_time =
      #{rankUpdateTime,jdbcType=TIMESTAMP},uie_invite_code =
      #{inviteCode,jdbcType=VARCHAR},uie_lottery_newbies =
      #{lotteryNewbies,jdbcType=INTEGER},uie_coupon_news =
      #{couponNews,jdbcType=INTEGER},uie_synch_navbar =
      #{synchNavbar,jdbcType=VARCHAR},uie_first_login_time =
      #{firstLoginTime,jdbcType=TIMESTAMP},uie_sex =
      #{sex,jdbcType=INTEGER},uie_weixin =
      #{weiXin,jdbcType=VARCHAR},uie_gold_coin =
      #{goldCoin,jdbcType=INTEGER},uie_create_time =
      #{createTime,jdbcType=TIMESTAMP},uie_update_time =
      #{updateTime,jdbcType=TIMESTAMP},uie_auto_extract =
      #{autoExtract,jdbcType=BOOLEAN}  where uie_id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
      update yeshi_ec_user_info_extra
      <set>
         <if test="userInfo != null">uie_uid=#{userInfo.id,jdbcType=BIGINT},</if>
         <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
         <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
         <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
         <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},
         </if>
         <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
         <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},
         </if>
         <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
         <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
         <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},
         </if>
         <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
         <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
         <if test="goldCoin != null">uie_gold_coin=#{goldCoin,jdbcType=INTEGER},</if>
         <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="autoExtract != null">uie_auto_extract=#{autoExtract,jdbcType=BOOLEAN},</if>
      </set>
      where uie_id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateInfoExtraByUid" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
      update yeshi_ec_user_info_extra
      <set>
         <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
         <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
         <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
         <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},
         </if>
         <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
         <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},
         </if>
         <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
         <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
         <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},
         </if>
         <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
         <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
         <if test="goldCoin != null">uie_gold_coin=#{goldCoin,jdbcType=INTEGER},</if>
         <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="autoExtract != null">uie_auto_extract=#{autoExtract,jdbcType=BOOLEAN},</if>
      </set>
      where uie_uid = #{userInfo.id,jdbcType=BIGINT}
   </update>
   <select id="getInfoExtraByUid" resultMap="BaseResultMap">
      SELECT * FROM
      yeshi_ec_user_info_extra
      WHERE uie_uid = #{uid}
   </select>
   <select id="getInfoExtraVOByUid" resultMap="VOResultMap">
      SELECT u.`id`,u.`nick_name`,u.`portrait`,ue.*,rk.*
      FROM yeshi_ec_user_info_extra ue
      LEFT JOIN yeshi_ec_user u ON ue.`uie_uid` = u.`id`
   </select>
   <select id="getInfoExtraVOByUid" resultMap="VOResultMap">
      SELECT
      u.`id`,u.`nick_name`,u.`portrait`,ue.*,rk.*
      FROM
      yeshi_ec_user_info_extra ue
      LEFT JOIN yeshi_ec_user u ON ue.`uie_uid` =
      u.`id`
      LEFT JOIN yeshi_ec_user_rank rk ON rk.`ur_id` = ue.`uie_rank_id`
      WHERE u.id = #{uid}
   </select>
   <select id="countByRankId" parameterType="java.lang.Long" resultType="java.lang.Long" >
      SELECT IFNULL(COUNT(t.`uie_id`),0)  FROM `yeshi_ec_user_info_extra` t
      WHERE  t.`uie_rank_id` = #{rankId}
   </select>
   <select id="gerUserRank" resultMap="AllResultMap">
      SELECT * FROM yeshi_ec_user_info_extra ue
      LEFT JOIN yeshi_ec_user_rank rk ON rk.`ur_id` = ue.`uie_rank_id`
      WHERE u.id
      = #{uid}
   </select>
   <select id="countByRankId" parameterType="java.lang.Long"
      resultType="java.lang.Long">
      SELECT IFNULL(COUNT(t.`uie_id`),0) FROM
      `yeshi_ec_user_info_extra` t
      WHERE t.`uie_rank_id` = #{rankId}
   </select>
   <select id="gerUserRank" resultMap="AllResultMap">
      SELECT * FROM
      yeshi_ec_user_info_extra ue
      LEFT JOIN yeshi_ec_user_rank rk ON
      rk.`ur_id` = ue.`uie_rank_id`
      WHERE ue.`uie_uid` = #{uid}
   </select>
   </select>
</mapper>