123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- <?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.AccountMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.Account">
- <id column="uid" property="uid" jdbcType="BIGINT"/>
- <result column="phone" property="phone" jdbcType="VARCHAR"/>
- <result column="erban_no" property="erbanNo" jdbcType="BIGINT"/>
- <result column="password" property="password" jdbcType="VARCHAR"/>
- <result column="netease_token" property="neteaseToken" jdbcType="VARCHAR"/>
- <result column="state" property="state" jdbcType="VARCHAR"/>
- <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP"/>
- <result column="last_login_ip" property="lastLoginIp" jdbcType="VARCHAR"/>
- <result column="register_ip" property="registerIp" jdbcType="VARCHAR"/>
- <result column="weixin_openid" property="weixinOpenid" jdbcType="VARCHAR"/>
- <result column="weixin_unionid" property="weixinUnionid" jdbcType="VARCHAR"/>
- <result column="qq_openid" property="qqOpenid" jdbcType="VARCHAR"/>
- <result column="qq_unionid" property="qqUnionid" 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="acc_block_start_time" property="accBlockStartTime" jdbcType="TIMESTAMP"/>
- <result column="acc_block_end_time" property="accBlockEndTime" jdbcType="TIMESTAMP"/>
- <result column="device_block_start_time" property="deviceBlockStartTime" jdbcType="TIMESTAMP"/>
- <result column="device_block_end_time" property="deviceBlockEndTime" jdbcType="TIMESTAMP"/>
- <result column="sign_time" property="signTime" jdbcType="TIMESTAMP"/>
- <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
- </resultMap>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.Account">
- <selectKey resultType="java.lang.Long" keyProperty="uid" order="AFTER">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into account (phone, erban_no, password,
- netease_token, state, last_login_time,
- last_login_ip, register_ip, weixin_openid,
- weixin_unionid, qq_openid, qq_unionid,
- os, osVersion, app,
- imei, channel, linkedme_channel,
- isp_type, net_type, model,
- device_id, app_version, acc_block_start_time,
- acc_block_end_time, device_block_start_time,
- device_block_end_time, sign_time, update_time
- )
- values (#{phone,jdbcType=VARCHAR}, #{erbanNo,jdbcType=BIGINT}, #{password,jdbcType=VARCHAR},
- #{neteaseToken,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
- #{lastLoginIp,jdbcType=VARCHAR}, #{registerIp,jdbcType=VARCHAR}, #{weixinOpenid,jdbcType=VARCHAR},
- #{weixinUnionid,jdbcType=VARCHAR}, #{qqOpenid,jdbcType=VARCHAR}, #{qqUnionid,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}, #{accBlockStartTime,jdbcType=TIMESTAMP},
- #{accBlockEndTime,jdbcType=TIMESTAMP}, #{deviceBlockStartTime,jdbcType=TIMESTAMP},
- #{deviceBlockEndTime,jdbcType=TIMESTAMP}, #{signTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.Account">
- <selectKey resultType="java.lang.Long" keyProperty="uid" order="AFTER">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into account
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="phone != null">
- phone,
- </if>
- <if test="erbanNo != null">
- erban_no,
- </if>
- <if test="password != null">
- password,
- </if>
- <if test="neteaseToken != null">
- netease_token,
- </if>
- <if test="state != null">
- state,
- </if>
- <if test="lastLoginTime != null">
- last_login_time,
- </if>
- <if test="lastLoginIp != null">
- last_login_ip,
- </if>
- <if test="registerIp != null">
- register_ip,
- </if>
- <if test="weixinOpenid != null">
- weixin_openid,
- </if>
- <if test="weixinUnionid != null">
- weixin_unionid,
- </if>
- <if test="qqOpenid != null">
- qq_openid,
- </if>
- <if test="qqUnionid != null">
- qq_unionid,
- </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="accBlockStartTime != null">
- acc_block_start_time,
- </if>
- <if test="accBlockEndTime != null">
- acc_block_end_time,
- </if>
- <if test="deviceBlockStartTime != null">
- device_block_start_time,
- </if>
- <if test="deviceBlockEndTime != null">
- device_block_end_time,
- </if>
- <if test="signTime != null">
- sign_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="phone != null">
- #{phone,jdbcType=VARCHAR},
- </if>
- <if test="erbanNo != null">
- #{erbanNo,jdbcType=BIGINT},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="neteaseToken != null">
- #{neteaseToken,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- #{state,jdbcType=VARCHAR},
- </if>
- <if test="lastLoginTime != null">
- #{lastLoginTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastLoginIp != null">
- #{lastLoginIp,jdbcType=VARCHAR},
- </if>
- <if test="registerIp != null">
- #{registerIp,jdbcType=VARCHAR},
- </if>
- <if test="weixinOpenid != null">
- #{weixinOpenid,jdbcType=VARCHAR},
- </if>
- <if test="weixinUnionid != null">
- #{weixinUnionid,jdbcType=VARCHAR},
- </if>
- <if test="qqOpenid != null">
- #{qqOpenid,jdbcType=VARCHAR},
- </if>
- <if test="qqUnionid != null">
- #{qqUnionid,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="accBlockStartTime != null">
- #{accBlockStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="accBlockEndTime != null">
- #{accBlockEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceBlockStartTime != null">
- #{deviceBlockStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceBlockEndTime != null">
- #{deviceBlockEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="signTime != null">
- #{signTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.Account">
- update account
- <set>
- <if test="phone != null">
- phone = #{phone,jdbcType=VARCHAR},
- </if>
- <if test="erbanNo != null">
- erban_no = #{erbanNo,jdbcType=BIGINT},
- </if>
- <if test="password != null">
- password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="neteaseToken != null">
- netease_token = #{neteaseToken,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- state = #{state,jdbcType=VARCHAR},
- </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="registerIp != null">
- register_ip = #{registerIp,jdbcType=VARCHAR},
- </if>
- <if test="weixinOpenid != null">
- weixin_openid = #{weixinOpenid,jdbcType=VARCHAR},
- </if>
- <if test="weixinUnionid != null">
- weixin_unionid = #{weixinUnionid,jdbcType=VARCHAR},
- </if>
- <if test="qqOpenid != null">
- qq_openid = #{qqOpenid,jdbcType=VARCHAR},
- </if>
- <if test="qqUnionid != null">
- qq_unionid = #{qqUnionid,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="accBlockStartTime != null">
- acc_block_start_time = #{accBlockStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="accBlockEndTime != null">
- acc_block_end_time = #{accBlockEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceBlockStartTime != null">
- device_block_start_time = #{deviceBlockStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceBlockEndTime != null">
- device_block_end_time = #{deviceBlockEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="signTime != null">
- sign_time = #{signTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.Account">
- update account
- set phone = #{phone,jdbcType=VARCHAR},
- erban_no = #{erbanNo,jdbcType=BIGINT},
- password = #{password,jdbcType=VARCHAR},
- netease_token = #{neteaseToken,jdbcType=VARCHAR},
- state = #{state,jdbcType=VARCHAR},
- last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
- last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
- register_ip = #{registerIp,jdbcType=VARCHAR},
- weixin_openid = #{weixinOpenid,jdbcType=VARCHAR},
- weixin_unionid = #{weixinUnionid,jdbcType=VARCHAR},
- qq_openid = #{qqOpenid,jdbcType=VARCHAR},
- qq_unionid = #{qqUnionid,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},
- acc_block_start_time = #{accBlockStartTime,jdbcType=TIMESTAMP},
- acc_block_end_time = #{accBlockEndTime,jdbcType=TIMESTAMP},
- device_block_start_time = #{deviceBlockStartTime,jdbcType=TIMESTAMP},
- device_block_end_time = #{deviceBlockEndTime,jdbcType=TIMESTAMP},
- sign_time = #{signTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP}
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <sql id="Base_Column_List">
- uid, phone, erban_no, password, netease_token, state, last_login_time, last_login_ip,
- register_ip, weixin_openid, weixin_unionid, qq_openid, qq_unionid, os, osVersion,
- app, imei, channel, linkedme_channel, isp_type, net_type, model, device_id, app_version,
- acc_block_start_time, acc_block_end_time, device_block_start_time, device_block_end_time,
- sign_time, update_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
- select
- <include refid="Base_Column_List"/>
- from account
- where uid = #{uid,jdbcType=BIGINT}
- </select>
- <select id="getAccountByErBanNo" resultMap="BaseResultMap" parameterType="java.lang.Long">
- select
- <include refid="Base_Column_List"/>
- from account
- where erban_no = #{erBanNo}
- </select>
- </mapper>
|