123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843 |
- <?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.juxiao.xchat.module.xbd.mapper.users.UsersMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.Users" >
- <id column="uid" property="uid" jdbcType="BIGINT" />
- <result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
- <result column="has_pretty_erban_no" property="hasPrettyErbanNo" jdbcType="BIT" />
- <result column="phone" property="phone" jdbcType="VARCHAR" />
- <result column="birth" property="birth" jdbcType="DATE" />
- <result column="star" property="star" jdbcType="TINYINT" />
- <result column="nick" property="nick" jdbcType="VARCHAR" />
- <result column="email" property="email" jdbcType="VARCHAR" />
- <result column="signture" property="signture" jdbcType="VARCHAR" />
- <result column="user_voice" property="userVoice" jdbcType="VARCHAR" />
- <result column="voice_dura" property="voiceDura" jdbcType="INTEGER" />
- <result column="follow_num" property="followNum" jdbcType="INTEGER" />
- <result column="fans_num" property="fansNum" jdbcType="INTEGER" />
- <result column="def_user" property="defUser" jdbcType="TINYINT" />
- <result column="fortune" property="fortune" jdbcType="BIGINT" />
- <result column="channel_type" property="channelType" jdbcType="TINYINT" />
- <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" />
- <result column="last_login_ip" property="lastLoginIp" jdbcType="VARCHAR" />
- <result column="gender" property="gender" jdbcType="TINYINT" />
- <result column="avatar" property="avatar" jdbcType="VARCHAR" />
- <result column="region" property="region" jdbcType="VARCHAR" />
- <result column="user_desc" property="userDesc" jdbcType="VARCHAR" />
- <result column="alipay_account" property="alipayAccount" jdbcType="VARCHAR" />
- <result column="alipay_account_name" property="alipayAccountName" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
- <result column="wx_pub_fans_openid" property="wxPubFansOpenid" jdbcType="VARCHAR" />
- <result column="wx_pub_fans_gender" property="wxPubFansGender" jdbcType="TINYINT" />
- <result column="room_uid" property="roomUid" jdbcType="BIGINT" />
- <result column="share_uid" property="shareUid" jdbcType="BIGINT" />
- <result column="share_channel" property="shareChannel" jdbcType="TINYINT" />
- <result column="wx_openId" property="wxOpenId" jdbcType="VARCHAR" />
- <result column="os" property="os" jdbcType="VARCHAR" />
- <result column="osVersion" property="osVersion" jdbcType="VARCHAR" />
- <result column="app" property="app" jdbcType="VARCHAR" />
- <result column="imei" property="imei" jdbcType="VARCHAR" />
- <result column="channel" property="channel" jdbcType="VARCHAR" />
- <result column="linkedme_channel" property="linkedmeChannel" jdbcType="VARCHAR" />
- <result column="isp_type" property="ispType" jdbcType="VARCHAR" />
- <result column="net_type" property="netType" jdbcType="VARCHAR" />
- <result column="model" property="model" jdbcType="VARCHAR" />
- <result column="device_id" property="deviceId" jdbcType="VARCHAR" />
- <result column="app_version" property="appVersion" jdbcType="VARCHAR" />
- <result column="noble_id" property="nobleId" jdbcType="INTEGER" />
- <result column="noble_name" property="nobleName" jdbcType="VARCHAR" />
- <result column="withdraw_status" property="withdrawStatus" jdbcType="TINYINT" />
- </resultMap>
- <resultMap id="UsersGoldResultMap" type="com.juxiao.xchat.module.xbd.vo.UsersGoldVO" >
- <id column="uid" property="uid" jdbcType="BIGINT" />
- <result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
- <result column="phone" property="phone" jdbcType="VARCHAR" />
- <result column="birth" property="birth" jdbcType="DATE" />
- <result column="star" property="star" jdbcType="TINYINT" />
- <result column="nick" property="nick" jdbcType="VARCHAR" />
- <result column="email" property="email" jdbcType="VARCHAR" />
- <result column="signture" property="signture" jdbcType="VARCHAR" />
- <result column="user_voice" property="userVoice" jdbcType="VARCHAR" />
- <result column="voice_dura" property="voiceDura" jdbcType="INTEGER" />
- <result column="follow_num" property="followNum" jdbcType="INTEGER" />
- <result column="fans_num" property="fansNum" jdbcType="INTEGER" />
- <result column="def_user" property="defUser" jdbcType="TINYINT" />
- <result column="fortune" property="fortune" jdbcType="BIGINT" />
- <result column="channel_type" property="channelType" jdbcType="TINYINT" />
- <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" />
- <result column="last_login_ip" property="lastLoginIp" jdbcType="VARCHAR" />
- <result column="gender" property="gender" jdbcType="TINYINT" />
- <result column="avatar" property="avatar" jdbcType="VARCHAR" />
- <result column="region" property="region" jdbcType="VARCHAR" />
- <result column="user_desc" property="userDesc" jdbcType="VARCHAR" />
- <result column="alipay_account" property="alipayAccount" jdbcType="VARCHAR" />
- <result column="alipay_account_name" property="alipayAccountName" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
- <result column="wx_pub_fans_openid" property="wxPubFansOpenid" jdbcType="VARCHAR" />
- <result column="wx_pub_fans_gender" property="wxPubFansGender" jdbcType="TINYINT" />
- <result column="room_uid" property="roomUid" jdbcType="BIGINT" />
- <result column="share_uid" property="shareUid" jdbcType="BIGINT" />
- <result column="share_channel" property="shareChannel" jdbcType="TINYINT" />
- <result column="wx_openId" property="wxOpenId" jdbcType="VARCHAR" />
- <result column="os" property="os" jdbcType="VARCHAR" />
- <result column="osVersion" property="osVersion" jdbcType="VARCHAR" />
- <result column="app" property="app" jdbcType="VARCHAR" />
- <result column="imei" property="imei" jdbcType="VARCHAR" />
- <result column="channel" property="channel" jdbcType="VARCHAR" />
- <result column="linkedme_channel" property="linkedmeChannel" jdbcType="VARCHAR" />
- <result column="isp_type" property="ispType" jdbcType="VARCHAR" />
- <result column="net_type" property="netType" jdbcType="VARCHAR" />
- <result column="model" property="model" jdbcType="VARCHAR" />
- <result column="device_id" property="deviceId" jdbcType="VARCHAR" />
- <result column="app_version" property="appVersion" jdbcType="VARCHAR" />
- <result column="gold_num" property="goldNum" jdbcType="BIGINT" />
- </resultMap>
- <select id="listUsers" resultType="com.juxiao.xchat.module.xbd.dto.UserDTO">
- SELECT
- acn.erban_no AS erbanNo,
- usrs.avatar AS avatar,
- acn.uid AS uid,
- usrs.nick AS nick,
- up.diamond_num AS diamondNum,
- up.gold_num AS goldNum,
- acn.phone AS phone,
- usrs.birth AS birth,
- usrs.gender AS gender,
- usrs.def_user AS defUser,
- usrs.create_time AS createTime,
- usrs.app_version AS appVersion
- FROM
- `account` acn
- LEFT JOIN
- users usrs
- ON
- acn.uid = usrs.uid
- LEFT JOIN
- user_purse up
- ON
- acn.uid = up.uid
- <where>
- 1 = 1
- <choose>
- <when test="uidList != null and erBanNoList != null">
- and (acn.erban_no IN
- <foreach collection="erBanNoList" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- OR acn.uid IN
- <foreach collection="uidList" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- )
- </when>
- <otherwise>
- <if test="erBanNoList != null">
- and acn.erban_no IN
- <foreach collection="erBanNoList" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="uidList != null">
- acn.uid IN
- <foreach collection="uidList" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </otherwise>
- </choose>
- <if test="beginTime != null and beginTime != ''">
- <![CDATA[
- AND acn.sign_time >= #{beginTime}
- ]]>
- </if>
- <if test="endTime != null and endTime != ''">
- <![CDATA[AND acn.sign_time <= #{endTime}]]>
- </if>
- <if test="gender != null">
- AND usrs.gender = #{gender}
- </if>
- <if test="defUser != null">
- AND usrs.def_user = #{defUser}
- </if>
- </where>
- </select>
- <select id="getUsersByUId" resultType="com.juxiao.xchat.module.xbd.dto.UserDTO">
- SELECT
- acn.erban_no AS erbanNo,
- usrs.avatar AS avatar,
- acn.uid AS uid,
- usrs.nick AS nick,
- acn.phone AS phone,
- usrs.birth AS birth,
- usrs.gender AS gender,
- usrs.def_user AS defUser,
- usrs.create_time AS createTime,
- usrs.app_version AS appVersion
- FROM
- `account` acn
- LEFT JOIN
- users usrs
- ON
- acn.uid = usrs.uid
- WHERE acn.uid = #{uid}
- </select>
- <resultMap id="UsersDtoResultMap" type="com.juxiao.xchat.module.xbd.dto.UsersDTO">
- <id column="uid" property="uid" jdbcType="BIGINT"/>
- <result column="erban_no" property="erbanNo" jdbcType="BIGINT"/>
- <result column="has_pretty_erban_no" property="hasPrettyErbanNo" jdbcType="BIT"/>
- <result column="phone" property="phone" jdbcType="VARCHAR"/>
- <result column="birth" property="birth" jdbcType="DATE"/>
- <result column="star" property="star" jdbcType="TINYINT"/>
- <result column="nick" property="nick" jdbcType="VARCHAR"/>
- <result column="email" property="email" jdbcType="VARCHAR"/>
- <result column="signture" property="signture" jdbcType="VARCHAR"/>
- <result column="user_voice" property="userVoice" jdbcType="VARCHAR"/>
- <result column="voice_dura" property="voiceDura" jdbcType="INTEGER"/>
- <result column="follow_num" property="followNum" jdbcType="INTEGER"/>
- <result column="fans_num" property="fansNum" jdbcType="INTEGER"/>
- <result column="def_user" property="defUser" jdbcType="TINYINT"/>
- <result column="fortune" property="fortune" jdbcType="BIGINT"/>
- <result column="channel_type" property="channelType" jdbcType="TINYINT"/>
- <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP"/>
- <result column="last_login_ip" property="lastLoginIp" jdbcType="VARCHAR"/>
- <result column="gender" property="gender" jdbcType="TINYINT"/>
- <result column="avatar" property="avatar" jdbcType="VARCHAR"/>
- <result column="region" property="region" jdbcType="VARCHAR"/>
- <result column="user_desc" property="userDesc" jdbcType="VARCHAR"/>
- <result column="alipay_account" property="alipayAccount" jdbcType="VARCHAR"/>
- <result column="alipay_account_name" property="alipayAccountName" jdbcType="VARCHAR"/>
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
- <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
- <result column="wx_pub_fans_openid" property="wxPubFansOpenid" jdbcType="VARCHAR"/>
- <result column="wx_pub_fans_gender" property="wxPubFansGender" jdbcType="TINYINT"/>
- <result column="room_uid" property="roomUid" jdbcType="BIGINT"/>
- <result column="share_uid" property="shareUid" jdbcType="BIGINT"/>
- <result column="share_channel" property="shareChannel" jdbcType="TINYINT"/>
- <result column="wx_openId" property="wxOpenid" jdbcType="VARCHAR"/>
- <result column="os" property="os" jdbcType="VARCHAR"/>
- <result column="osVersion" property="osversion" jdbcType="VARCHAR"/>
- <result column="app" property="app" jdbcType="VARCHAR"/>
- <result column="imei" property="imei" jdbcType="VARCHAR"/>
- <result column="channel" property="channel" jdbcType="VARCHAR"/>
- <result column="linkedme_channel" property="linkedmeChannel" jdbcType="VARCHAR"/>
- <result column="isp_type" property="ispType" jdbcType="VARCHAR"/>
- <result column="net_type" property="netType" jdbcType="VARCHAR"/>
- <result column="model" property="model" jdbcType="VARCHAR"/>
- <result column="device_id" property="deviceId" jdbcType="VARCHAR"/>
- <result column="app_version" property="appVersion" jdbcType="VARCHAR"/>
- <result column="noble_id" property="nobleId" jdbcType="INTEGER"/>
- <result column="noble_name" property="nobleName" jdbcType="VARCHAR"/>
- <result column="withdraw_status" property="withdrawStatus" jdbcType="TINYINT"/>
- <result column="share_code" property="shareCode" jdbcType="BIGINT"/>
- </resultMap>
- <select id="getUser" parameterType="java.lang.Long" resultMap="UsersDtoResultMap">
- <![CDATA[
- SELECT
- uid,
- erban_no,
- has_pretty_erban_no,
- phone,
- birth,
- star,
- nick,
- email,
- signture,
- user_voice,
- voice_dura,
- follow_num,
- fans_num,
- def_user,
- fortune,
- channel_type,
- last_login_time,
- last_login_ip,
- gender,
- avatar,
- region,
- user_desc,
- alipay_account,
- alipay_account_name,
- create_time,
- update_time,
- wx_pub_fans_openid,
- wx_pub_fans_gender,
- room_uid,
- share_uid,
- share_channel,
- wx_openId,
- os,
- osVersion,
- app,
- imei,
- channel,
- linkedme_channel,
- isp_type,
- net_type,
- model,
- device_id,
- app_version,
- noble_id,
- noble_name,
- withdraw_status,
- share_code
- FROM
- `users`
- WHERE
- `uid` = #{uid,jdbcType=BIGINT}
- ]]>
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.Users" >
- insert into users (uid, erban_no, has_pretty_erban_no,
- phone, birth, star, nick,
- email, signture, user_voice,
- voice_dura, follow_num, fans_num,
- def_user, fortune, channel_type,
- last_login_time, last_login_ip, gender,
- avatar, region, user_desc,
- alipay_account, alipay_account_name, create_time,
- update_time, wx_pub_fans_openid, wx_pub_fans_gender,
- room_uid, share_uid, share_channel,
- wx_openId, os, osVersion,
- app, imei, channel,
- linkedme_channel, isp_type, net_type,
- model, device_id, app_version,
- noble_id, noble_name, withdraw_status
- )
- values (#{uid,jdbcType=BIGINT}, #{erbanNo,jdbcType=BIGINT}, #{hasPrettyErbanNo,jdbcType=BIT},
- #{phone,jdbcType=VARCHAR}, #{birth,jdbcType=DATE}, #{star,jdbcType=TINYINT}, #{nick,jdbcType=VARCHAR},
- #{email,jdbcType=VARCHAR}, #{signture,jdbcType=VARCHAR}, #{userVoice,jdbcType=VARCHAR},
- #{voiceDura,jdbcType=INTEGER}, #{followNum,jdbcType=INTEGER}, #{fansNum,jdbcType=INTEGER},
- #{defUser,jdbcType=TINYINT}, #{fortune,jdbcType=BIGINT}, #{channelType,jdbcType=TINYINT},
- #{lastLoginTime,jdbcType=TIMESTAMP}, #{lastLoginIp,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
- #{avatar,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, #{userDesc,jdbcType=VARCHAR},
- #{alipayAccount,jdbcType=VARCHAR}, #{alipayAccountName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{updateTime,jdbcType=TIMESTAMP}, #{wxPubFansOpenid,jdbcType=VARCHAR}, #{wxPubFansGender,jdbcType=TINYINT},
- #{roomUid,jdbcType=BIGINT}, #{shareUid,jdbcType=BIGINT}, #{shareChannel,jdbcType=TINYINT},
- #{wxOpenId,jdbcType=VARCHAR}, #{os,jdbcType=VARCHAR}, #{osVersion,jdbcType=VARCHAR},
- #{app,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR},
- #{linkedmeChannel,jdbcType=VARCHAR}, #{ispType,jdbcType=VARCHAR}, #{netType,jdbcType=VARCHAR},
- #{model,jdbcType=VARCHAR}, #{deviceId,jdbcType=VARCHAR}, #{appVersion,jdbcType=VARCHAR},
- #{nobleId,jdbcType=INTEGER}, #{nobleName,jdbcType=VARCHAR}, #{withdrawStatus,jdbcType=TINYINT}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.Users" >
- insert into users
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- uid,
- </if>
- <if test="erbanNo != null" >
- erban_no,
- </if>
- <if test="hasPrettyErbanNo != null" >
- has_pretty_erban_no,
- </if>
- <if test="phone != null" >
- phone,
- </if>
- <if test="birth != null" >
- birth,
- </if>
- <if test="star != null" >
- star,
- </if>
- <if test="nick != null" >
- nick,
- </if>
- <if test="email != null" >
- email,
- </if>
- <if test="signture != null" >
- signture,
- </if>
- <if test="userVoice != null" >
- user_voice,
- </if>
- <if test="voiceDura != null" >
- voice_dura,
- </if>
- <if test="followNum != null" >
- follow_num,
- </if>
- <if test="fansNum != null" >
- fans_num,
- </if>
- <if test="defUser != null" >
- def_user,
- </if>
- <if test="fortune != null" >
- fortune,
- </if>
- <if test="channelType != null" >
- channel_type,
- </if>
- <if test="lastLoginTime != null" >
- last_login_time,
- </if>
- <if test="lastLoginIp != null" >
- last_login_ip,
- </if>
- <if test="gender != null" >
- gender,
- </if>
- <if test="avatar != null" >
- avatar,
- </if>
- <if test="region != null" >
- region,
- </if>
- <if test="userDesc != null" >
- user_desc,
- </if>
- <if test="alipayAccount != null" >
- alipay_account,
- </if>
- <if test="alipayAccountName != null" >
- alipay_account_name,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="updateTime != null" >
- update_time,
- </if>
- <if test="wxPubFansOpenid != null" >
- wx_pub_fans_openid,
- </if>
- <if test="wxPubFansGender != null" >
- wx_pub_fans_gender,
- </if>
- <if test="roomUid != null" >
- room_uid,
- </if>
- <if test="shareUid != null" >
- share_uid,
- </if>
- <if test="shareChannel != null" >
- share_channel,
- </if>
- <if test="wxOpenId != null" >
- wx_openId,
- </if>
- <if test="os != null" >
- os,
- </if>
- <if test="osVersion != null" >
- osVersion,
- </if>
- <if test="app != null" >
- app,
- </if>
- <if test="imei != null" >
- imei,
- </if>
- <if test="channel != null" >
- channel,
- </if>
- <if test="linkedmeChannel != null" >
- linkedme_channel,
- </if>
- <if test="ispType != null" >
- isp_type,
- </if>
- <if test="netType != null" >
- net_type,
- </if>
- <if test="model != null" >
- model,
- </if>
- <if test="deviceId != null" >
- device_id,
- </if>
- <if test="appVersion != null" >
- app_version,
- </if>
- <if test="nobleId != null" >
- noble_id,
- </if>
- <if test="nobleName != null" >
- noble_name,
- </if>
- <if test="withdrawStatus != null" >
- withdraw_status,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="erbanNo != null" >
- #{erbanNo,jdbcType=BIGINT},
- </if>
- <if test="hasPrettyErbanNo != null" >
- #{hasPrettyErbanNo,jdbcType=BIT},
- </if>
- <if test="phone != null" >
- #{phone,jdbcType=VARCHAR},
- </if>
- <if test="birth != null" >
- #{birth,jdbcType=DATE},
- </if>
- <if test="star != null" >
- #{star,jdbcType=TINYINT},
- </if>
- <if test="nick != null" >
- #{nick,jdbcType=VARCHAR},
- </if>
- <if test="email != null" >
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="signture != null" >
- #{signture,jdbcType=VARCHAR},
- </if>
- <if test="userVoice != null" >
- #{userVoice,jdbcType=VARCHAR},
- </if>
- <if test="voiceDura != null" >
- #{voiceDura,jdbcType=INTEGER},
- </if>
- <if test="followNum != null" >
- #{followNum,jdbcType=INTEGER},
- </if>
- <if test="fansNum != null" >
- #{fansNum,jdbcType=INTEGER},
- </if>
- <if test="defUser != null" >
- #{defUser,jdbcType=TINYINT},
- </if>
- <if test="fortune != null" >
- #{fortune,jdbcType=BIGINT},
- </if>
- <if test="channelType != null" >
- #{channelType,jdbcType=TINYINT},
- </if>
- <if test="lastLoginTime != null" >
- #{lastLoginTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastLoginIp != null" >
- #{lastLoginIp,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- #{gender,jdbcType=TINYINT},
- </if>
- <if test="avatar != null" >
- #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="region != null" >
- #{region,jdbcType=VARCHAR},
- </if>
- <if test="userDesc != null" >
- #{userDesc,jdbcType=VARCHAR},
- </if>
- <if test="alipayAccount != null" >
- #{alipayAccount,jdbcType=VARCHAR},
- </if>
- <if test="alipayAccountName != null" >
- #{alipayAccountName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null" >
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="wxPubFansOpenid != null" >
- #{wxPubFansOpenid,jdbcType=VARCHAR},
- </if>
- <if test="wxPubFansGender != null" >
- #{wxPubFansGender,jdbcType=TINYINT},
- </if>
- <if test="roomUid != null" >
- #{roomUid,jdbcType=BIGINT},
- </if>
- <if test="shareUid != null" >
- #{shareUid,jdbcType=BIGINT},
- </if>
- <if test="shareChannel != null" >
- #{shareChannel,jdbcType=TINYINT},
- </if>
- <if test="wxOpenId != null" >
- #{wxOpenId,jdbcType=VARCHAR},
- </if>
- <if test="os != null" >
- #{os,jdbcType=VARCHAR},
- </if>
- <if test="osVersion != null" >
- #{osVersion,jdbcType=VARCHAR},
- </if>
- <if test="app != null" >
- #{app,jdbcType=VARCHAR},
- </if>
- <if test="imei != null" >
- #{imei,jdbcType=VARCHAR},
- </if>
- <if test="channel != null" >
- #{channel,jdbcType=VARCHAR},
- </if>
- <if test="linkedmeChannel != null" >
- #{linkedmeChannel,jdbcType=VARCHAR},
- </if>
- <if test="ispType != null" >
- #{ispType,jdbcType=VARCHAR},
- </if>
- <if test="netType != null" >
- #{netType,jdbcType=VARCHAR},
- </if>
- <if test="model != null" >
- #{model,jdbcType=VARCHAR},
- </if>
- <if test="deviceId != null" >
- #{deviceId,jdbcType=VARCHAR},
- </if>
- <if test="appVersion != null" >
- #{appVersion,jdbcType=VARCHAR},
- </if>
- <if test="nobleId != null" >
- #{nobleId,jdbcType=INTEGER},
- </if>
- <if test="nobleName != null" >
- #{nobleName,jdbcType=VARCHAR},
- </if>
- <if test="withdrawStatus != null" >
- #{withdrawStatus,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.Users" >
- update users
- <set >
- <if test="erbanNo != null" >
- erban_no = #{erbanNo,jdbcType=BIGINT},
- </if>
- <if test="hasPrettyErbanNo != null" >
- has_pretty_erban_no = #{hasPrettyErbanNo,jdbcType=BIT},
- </if>
- <if test="phone != null" >
- phone = #{phone,jdbcType=VARCHAR},
- </if>
- <if test="birth != null" >
- birth = #{birth,jdbcType=DATE},
- </if>
- <if test="star != null" >
- star = #{star,jdbcType=TINYINT},
- </if>
- <if test="nick != null" >
- nick = #{nick,jdbcType=VARCHAR},
- </if>
- <if test="email != null" >
- email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="signture != null" >
- signture = #{signture,jdbcType=VARCHAR},
- </if>
- <if test="userVoice != null" >
- user_voice = #{userVoice,jdbcType=VARCHAR},
- </if>
- <if test="voiceDura != null" >
- voice_dura = #{voiceDura,jdbcType=INTEGER},
- </if>
- <if test="followNum != null" >
- follow_num = #{followNum,jdbcType=INTEGER},
- </if>
- <if test="fansNum != null" >
- fans_num = #{fansNum,jdbcType=INTEGER},
- </if>
- <if test="defUser != null" >
- def_user = #{defUser,jdbcType=TINYINT},
- </if>
- <if test="fortune != null" >
- fortune = #{fortune,jdbcType=BIGINT},
- </if>
- <if test="channelType != null" >
- channel_type = #{channelType,jdbcType=TINYINT},
- </if>
- <if test="lastLoginTime != null" >
- last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastLoginIp != null" >
- last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- gender = #{gender,jdbcType=TINYINT},
- </if>
- <if test="avatar != null" >
- avatar = #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="region != null" >
- region = #{region,jdbcType=VARCHAR},
- </if>
- <if test="userDesc != null" >
- user_desc = #{userDesc,jdbcType=VARCHAR},
- </if>
- <if test="alipayAccount != null" >
- alipay_account = #{alipayAccount,jdbcType=VARCHAR},
- </if>
- <if test="alipayAccountName != null" >
- alipay_account_name = #{alipayAccountName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null" >
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="wxPubFansOpenid != null" >
- wx_pub_fans_openid = #{wxPubFansOpenid,jdbcType=VARCHAR},
- </if>
- <if test="wxPubFansGender != null" >
- wx_pub_fans_gender = #{wxPubFansGender,jdbcType=TINYINT},
- </if>
- <if test="roomUid != null" >
- room_uid = #{roomUid,jdbcType=BIGINT},
- </if>
- <if test="shareUid != null" >
- share_uid = #{shareUid,jdbcType=BIGINT},
- </if>
- <if test="shareChannel != null" >
- share_channel = #{shareChannel,jdbcType=TINYINT},
- </if>
- <if test="wxOpenId != null" >
- wx_openId = #{wxOpenId,jdbcType=VARCHAR},
- </if>
- <if test="os != null" >
- os = #{os,jdbcType=VARCHAR},
- </if>
- <if test="osVersion != null" >
- osVersion = #{osVersion,jdbcType=VARCHAR},
- </if>
- <if test="app != null" >
- app = #{app,jdbcType=VARCHAR},
- </if>
- <if test="imei != null" >
- imei = #{imei,jdbcType=VARCHAR},
- </if>
- <if test="channel != null" >
- channel = #{channel,jdbcType=VARCHAR},
- </if>
- <if test="linkedmeChannel != null" >
- linkedme_channel = #{linkedmeChannel,jdbcType=VARCHAR},
- </if>
- <if test="ispType != null" >
- isp_type = #{ispType,jdbcType=VARCHAR},
- </if>
- <if test="netType != null" >
- net_type = #{netType,jdbcType=VARCHAR},
- </if>
- <if test="model != null" >
- model = #{model,jdbcType=VARCHAR},
- </if>
- <if test="deviceId != null" >
- device_id = #{deviceId,jdbcType=VARCHAR},
- </if>
- <if test="appVersion != null" >
- app_version = #{appVersion,jdbcType=VARCHAR},
- </if>
- <if test="nobleId != null" >
- noble_id = #{nobleId,jdbcType=INTEGER},
- </if>
- <if test="nobleName != null" >
- noble_name = #{nobleName,jdbcType=VARCHAR},
- </if>
- <if test="withdrawStatus != null" >
- withdraw_status = #{withdrawStatus,jdbcType=TINYINT},
- </if>
- </set>
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.Users" >
- update users
- set erban_no = #{erbanNo,jdbcType=BIGINT},
- has_pretty_erban_no = #{hasPrettyErbanNo,jdbcType=BIT},
- phone = #{phone,jdbcType=VARCHAR},
- birth = #{birth,jdbcType=DATE},
- star = #{star,jdbcType=TINYINT},
- nick = #{nick,jdbcType=VARCHAR},
- email = #{email,jdbcType=VARCHAR},
- signture = #{signture,jdbcType=VARCHAR},
- user_voice = #{userVoice,jdbcType=VARCHAR},
- voice_dura = #{voiceDura,jdbcType=INTEGER},
- follow_num = #{followNum,jdbcType=INTEGER},
- fans_num = #{fansNum,jdbcType=INTEGER},
- def_user = #{defUser,jdbcType=TINYINT},
- fortune = #{fortune,jdbcType=BIGINT},
- channel_type = #{channelType,jdbcType=TINYINT},
- last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
- last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
- gender = #{gender,jdbcType=TINYINT},
- avatar = #{avatar,jdbcType=VARCHAR},
- region = #{region,jdbcType=VARCHAR},
- user_desc = #{userDesc,jdbcType=VARCHAR},
- alipay_account = #{alipayAccount,jdbcType=VARCHAR},
- alipay_account_name = #{alipayAccountName,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- wx_pub_fans_openid = #{wxPubFansOpenid,jdbcType=VARCHAR},
- wx_pub_fans_gender = #{wxPubFansGender,jdbcType=TINYINT},
- room_uid = #{roomUid,jdbcType=BIGINT},
- share_uid = #{shareUid,jdbcType=BIGINT},
- share_channel = #{shareChannel,jdbcType=TINYINT},
- wx_openId = #{wxOpenId,jdbcType=VARCHAR},
- os = #{os,jdbcType=VARCHAR},
- osVersion = #{osVersion,jdbcType=VARCHAR},
- app = #{app,jdbcType=VARCHAR},
- imei = #{imei,jdbcType=VARCHAR},
- channel = #{channel,jdbcType=VARCHAR},
- linkedme_channel = #{linkedmeChannel,jdbcType=VARCHAR},
- isp_type = #{ispType,jdbcType=VARCHAR},
- net_type = #{netType,jdbcType=VARCHAR},
- model = #{model,jdbcType=VARCHAR},
- device_id = #{deviceId,jdbcType=VARCHAR},
- app_version = #{appVersion,jdbcType=VARCHAR},
- noble_id = #{nobleId,jdbcType=INTEGER},
- noble_name = #{nobleName,jdbcType=VARCHAR},
- withdraw_status = #{withdrawStatus,jdbcType=TINYINT}
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <sql id="Base_Column_List" >
- uid, erban_no, has_pretty_erban_no, phone, birth, star, nick, email, signture, user_voice,
- voice_dura, follow_num, fans_num, def_user, fortune, channel_type, last_login_time,
- last_login_ip, gender, avatar, region, user_desc, alipay_account, alipay_account_name,
- create_time, update_time, wx_pub_fans_openid, wx_pub_fans_gender, room_uid, share_uid,
- share_channel, wx_openId, os, osVersion, app, imei, channel, linkedme_channel, isp_type,
- net_type, model, device_id, app_version, noble_id, noble_name, withdraw_status
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
- select
- <include refid="Base_Column_List" />
- from users
- where uid = #{uid,jdbcType=BIGINT}
- </select>
- <select id="selectUsers" resultMap="UsersGoldResultMap">
- select *
- ,(select t2.gold_num from user_purse t2 where t2.uid=t1.uid) as gold_num
- from users t1 where erban_no in
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
- #{item}
- </foreach>
- </select>
- <select id="selectByErBanNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from users
- where erban_no = #{erBanNo}
- </select>
- </mapper>
|