| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.goafanti.common.dao.UserMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.User">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
- <result column="password" jdbcType="VARCHAR" property="password" />
- <result column="nickname" jdbcType="VARCHAR" property="nickname" />
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="number" jdbcType="BIGINT" property="number" />
- <result column="lvl" jdbcType="INTEGER" property="lvl" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="mid" jdbcType="VARCHAR" property="mid" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="source" jdbcType="INTEGER" property="source" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="company_logo_url" jdbcType="VARCHAR" property="companyLogoUrl" />
- <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
- <result column="society_tag" jdbcType="VARCHAR" property="societyTag" />
- <result column="introduction" jdbcType="VARCHAR" property="introduction" />
- <result column="value_added_tag" jdbcType="VARCHAR" property="valueAddedTag" />
- <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
- <result column="identify_name" jdbcType="VARCHAR" property="identifyName" />
- <result column="background_url" jdbcType="VARCHAR" property="backgroundUrl" />
- <result column="audit_opinion" jdbcType="VARCHAR" property="auditOpinion" />
- <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
- <result column="share_type" jdbcType="INTEGER" property="shareType" />
- <result column="aid" jdbcType="VARCHAR" property="aid" />
- <result column="transfer_time" jdbcType="TIMESTAMP" property="transferTime" />
- <result column="username" jdbcType="VARCHAR" property="username" />
- <result column="authentication" jdbcType="INTEGER" property="authentication" />
- <result column="introduction" jdbcType="VARCHAR" property="introduction" />
- <result column="be_invite_code" jdbcType="VARCHAR" property="beInviteCode" />
- <result column="to_invite_code" jdbcType="VARCHAR" property="toInviteCode" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- <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.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- <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.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- id, mobile, password, nickname, email, create_time, number, lvl, type, mid, status,
- source, update_time, company_logo_url, head_portrait_url, society_tag, introduction,
- value_added_tag, organization_id, identify_name, background_url, audit_opinion, audit_status,
- share_type, aid, transfer_time, username, authentication,be_invite_code,to_invite_code
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.UserExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- select
- <include refid="Base_Column_List" />
- from user
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- delete from user
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- delete from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.User">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- insert into user (id, mobile, password,
- nickname, email, create_time,
- number, lvl, type, mid,
- status, source, update_time,
- company_logo_url, head_portrait_url, society_tag,
- introduction, value_added_tag, organization_id,
- identify_name, background_url, audit_opinion,
- audit_status, share_type, aid,
- transfer_time, username, authentication,be_invite_code,to_invite_code
-
- )
- values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
- #{nickname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{number,jdbcType=BIGINT}, #{lvl,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{mid,jdbcType=VARCHAR},
- #{status,jdbcType=INTEGER}, #{source,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
- #{companyLogoUrl,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR}, #{societyTag,jdbcType=VARCHAR},
- #{introduction,jdbcType=VARCHAR}, #{valueAddedTag,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR},
- #{identifyName,jdbcType=VARCHAR}, #{backgroundUrl,jdbcType=VARCHAR}, #{auditOpinion,jdbcType=VARCHAR},
- #{auditStatus,jdbcType=INTEGER}, #{shareType,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
- #{transferTime,jdbcType=TIMESTAMP}, #{username,jdbcType=VARCHAR}, #{authentication,jdbcType=INTEGER},
- #{beInviteCode,jdbcType=VARCHAR},#{toInviteCode,jdbcType=VARCHAR}
-
- )
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.User">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- insert into user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="mobile != null">
- mobile,
- </if>
- <if test="password != null">
- password,
- </if>
- <if test="nickname != null">
- nickname,
- </if>
- <if test="email != null">
- email,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="number != null">
- number,
- </if>
- <if test="lvl != null">
- lvl,
- </if>
- <if test="type != null">
- type,
- </if>
- <if test="mid != null">
- mid,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="source != null">
- source,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="companyLogoUrl != null">
- company_logo_url,
- </if>
- <if test="headPortraitUrl != null">
- head_portrait_url,
- </if>
- <if test="societyTag != null">
- society_tag,
- </if>
- <if test="introduction != null">
- introduction,
- </if>
- <if test="valueAddedTag != null">
- value_added_tag,
- </if>
- <if test="organizationId != null">
- organization_id,
- </if>
- <if test="identifyName != null">
- identify_name,
- </if>
- <if test="backgroundUrl != null">
- background_url,
- </if>
- <if test="auditOpinion != null">
- audit_opinion,
- </if>
- <if test="auditStatus != null">
- audit_status,
- </if>
- <if test="shareType != null">
- share_type,
- </if>
- <if test="aid != null">
- aid,
- </if>
- <if test="transferTime != null">
- transfer_time,
- </if>
- <if test="username != null">
- username,
- </if>
- <if test="authentication != null">
- authentication,
- </if>
- <if test="beInviteCode != null">
- be_invite_code,
- </if>
- <if test="toInviteCode != null">
- to_invite_code,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="mobile != null">
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="nickname != null">
- #{nickname,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="number != null">
- #{number,jdbcType=BIGINT},
- </if>
- <if test="lvl != null">
- #{lvl,jdbcType=INTEGER},
- </if>
- <if test="type != null">
- #{type,jdbcType=INTEGER},
- </if>
- <if test="mid != null">
- #{mid,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="source != null">
- #{source,jdbcType=INTEGER},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="companyLogoUrl != null">
- #{companyLogoUrl,jdbcType=VARCHAR},
- </if>
- <if test="headPortraitUrl != null">
- #{headPortraitUrl,jdbcType=VARCHAR},
- </if>
- <if test="societyTag != null">
- #{societyTag,jdbcType=VARCHAR},
- </if>
- <if test="introduction != null">
- #{introduction,jdbcType=VARCHAR},
- </if>
- <if test="valueAddedTag != null">
- #{valueAddedTag,jdbcType=VARCHAR},
- </if>
- <if test="organizationId != null">
- #{organizationId,jdbcType=VARCHAR},
- </if>
- <if test="identifyName != null">
- #{identifyName,jdbcType=VARCHAR},
- </if>
- <if test="backgroundUrl != null">
- #{backgroundUrl,jdbcType=VARCHAR},
- </if>
- <if test="auditOpinion != null">
- #{auditOpinion,jdbcType=VARCHAR},
- </if>
- <if test="auditStatus != null">
- #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="shareType != null">
- #{shareType,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- #{aid,jdbcType=VARCHAR},
- </if>
- <if test="transferTime != null">
- #{transferTime,jdbcType=TIMESTAMP},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="authentication != null">
- #{authentication,jdbcType=INTEGER},
- </if>
- <if test="beInviteCode != null">
- #{beInviteCode,jdbcType=VARCHAR},
- </if>
- <if test="toInviteCode != null">
- #{toInviteCode,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.UserExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- select count(*) from user
- <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.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- update user
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.mobile != null">
- mobile = #{record.mobile,jdbcType=VARCHAR},
- </if>
- <if test="record.password != null">
- password = #{record.password,jdbcType=VARCHAR},
- </if>
- <if test="record.nickname != null">
- nickname = #{record.nickname,jdbcType=VARCHAR},
- </if>
- <if test="record.email != null">
- email = #{record.email,jdbcType=VARCHAR},
- </if>
- <if test="record.createTime != null">
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.number != null">
- number = #{record.number,jdbcType=BIGINT},
- </if>
- <if test="record.lvl != null">
- lvl = #{record.lvl,jdbcType=INTEGER},
- </if>
- <if test="record.type != null">
- type = #{record.type,jdbcType=INTEGER},
- </if>
- <if test="record.mid != null">
- mid = #{record.mid,jdbcType=VARCHAR},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=INTEGER},
- </if>
- <if test="record.source != null">
- source = #{record.source,jdbcType=INTEGER},
- </if>
- <if test="record.updateTime != null">
- update_time = #{record.updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.companyLogoUrl != null">
- company_logo_url = #{record.companyLogoUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.headPortraitUrl != null">
- head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.societyTag != null">
- society_tag = #{record.societyTag,jdbcType=VARCHAR},
- </if>
- <if test="record.introduction != null">
- introduction = #{record.introduction,jdbcType=VARCHAR},
- </if>
- <if test="record.valueAddedTag != null">
- value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
- </if>
- <if test="record.organizationId != null">
- organization_id = #{record.organizationId,jdbcType=VARCHAR},
- </if>
- <if test="record.identifyName != null">
- identify_name = #{record.identifyName,jdbcType=VARCHAR},
- </if>
- <if test="record.backgroundUrl != null">
- background_url = #{record.backgroundUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.auditOpinion != null">
- audit_opinion = #{record.auditOpinion,jdbcType=VARCHAR},
- </if>
- <if test="record.auditStatus != null">
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- </if>
- <if test="record.shareType != null">
- share_type = #{record.shareType,jdbcType=INTEGER},
- </if>
- <if test="record.aid != null">
- aid = #{record.aid,jdbcType=VARCHAR},
- </if>
- <if test="record.transferTime != null">
- transfer_time = #{record.transferTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.username != null">
- username = #{record.username,jdbcType=VARCHAR},
- </if>
- <if test="record.authentication != null">
- authentication = #{record.authentication,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.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- update user
- set id = #{record.id,jdbcType=VARCHAR},
- mobile = #{record.mobile,jdbcType=VARCHAR},
- password = #{record.password,jdbcType=VARCHAR},
- nickname = #{record.nickname,jdbcType=VARCHAR},
- email = #{record.email,jdbcType=VARCHAR},
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- number = #{record.number,jdbcType=BIGINT},
- lvl = #{record.lvl,jdbcType=INTEGER},
- type = #{record.type,jdbcType=INTEGER},
- mid = #{record.mid,jdbcType=VARCHAR},
- status = #{record.status,jdbcType=INTEGER},
- source = #{record.source,jdbcType=INTEGER},
- update_time = #{record.updateTime,jdbcType=TIMESTAMP},
- company_logo_url = #{record.companyLogoUrl,jdbcType=VARCHAR},
- head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR},
- society_tag = #{record.societyTag,jdbcType=VARCHAR},
- introduction = #{record.introduction,jdbcType=VARCHAR},
- value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
- organization_id = #{record.organizationId,jdbcType=VARCHAR},
- identify_name = #{record.identifyName,jdbcType=VARCHAR},
- background_url = #{record.backgroundUrl,jdbcType=VARCHAR},
- audit_opinion = #{record.auditOpinion,jdbcType=VARCHAR},
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- share_type = #{record.shareType,jdbcType=INTEGER},
- aid = #{record.aid,jdbcType=VARCHAR},
- transfer_time = #{record.transferTime,jdbcType=TIMESTAMP},
- username = #{record.username,jdbcType=VARCHAR},
- authentication = #{record.authentication,jdbcType=INTEGER},
- be_invite_code = #{beInviteCode,jdbcType=VARCHAR},
- to_invite_code = #{toInviteCode,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.User">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- update user
- <set>
- <if test="mobile != null">
- mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="nickname != null">
- nickname = #{nickname,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="number != null">
- number = #{number,jdbcType=BIGINT},
- </if>
- <if test="lvl != null">
- lvl = #{lvl,jdbcType=INTEGER},
- </if>
- <if test="type != null">
- type = #{type,jdbcType=INTEGER},
- </if>
- <if test="mid != null">
- mid = #{mid,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="source != null">
- source = #{source,jdbcType=INTEGER},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="companyLogoUrl != null">
- company_logo_url = #{companyLogoUrl,jdbcType=VARCHAR},
- </if>
- <if test="headPortraitUrl != null">
- head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
- </if>
- <if test="societyTag != null">
- society_tag = #{societyTag,jdbcType=VARCHAR},
- </if>
- <if test="introduction != null">
- introduction = #{introduction,jdbcType=VARCHAR},
- </if>
- <if test="valueAddedTag != null">
- value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
- </if>
- <if test="organizationId != null">
- organization_id = #{organizationId,jdbcType=VARCHAR},
- </if>
- <if test="identifyName != null">
- identify_name = #{identifyName,jdbcType=VARCHAR},
- </if>
- <if test="backgroundUrl != null">
- background_url = #{backgroundUrl,jdbcType=VARCHAR},
- </if>
- <if test="auditOpinion != null">
- audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
- </if>
- <if test="auditStatus != null">
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="shareType != null">
- share_type = #{shareType,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="transferTime != null">
- transfer_time = #{transferTime,jdbcType=TIMESTAMP},
- </if>
- <if test="username != null">
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="authentication != null">
- authentication = #{authentication,jdbcType=INTEGER},
- </if>
- <if test="beInviteCode != null">
- be_invite_code = #{beInviteCode,jdbcType=VARCHAR},
- </if>
- <if test="toInviteCode != null">
- to_invite_code = #{toInviteCode,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.User">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu May 31 15:33:56 CST 2018.
- -->
- update user
- set mobile = #{mobile,jdbcType=VARCHAR},
- password = #{password,jdbcType=VARCHAR},
- nickname = #{nickname,jdbcType=VARCHAR},
- email = #{email,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- number = #{number,jdbcType=BIGINT},
- lvl = #{lvl,jdbcType=INTEGER},
- type = #{type,jdbcType=INTEGER},
- mid = #{mid,jdbcType=VARCHAR},
- status = #{status,jdbcType=INTEGER},
- source = #{source,jdbcType=INTEGER},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- company_logo_url = #{companyLogoUrl,jdbcType=VARCHAR},
- head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
- society_tag = #{societyTag,jdbcType=VARCHAR},
- introduction = #{introduction,jdbcType=VARCHAR},
- value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
- organization_id = #{organizationId,jdbcType=VARCHAR},
- identify_name = #{identifyName,jdbcType=VARCHAR},
- background_url = #{backgroundUrl,jdbcType=VARCHAR},
- audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- share_type = #{shareType,jdbcType=INTEGER},
- aid = #{aid,jdbcType=VARCHAR},
- transfer_time = #{transferTime,jdbcType=TIMESTAMP},
- username = #{username,jdbcType=VARCHAR},
- authentication = #{authentication,jdbcType=INTEGER},
- be_invite_code = #{beInviteCode,jdbcType=VARCHAR},
- to_invite_code = #{toInviteCode,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <resultMap id="UserPageHomeBo" type="com.goafanti.user.bo.UserPageHomeBo">
- <result column="uid" jdbcType="VARCHAR" property="uid" />
- <result column="lvl" jdbcType="INTEGER" property="lvl" />
- <result column="nickname" jdbcType="VARCHAR" property="nickname" />
- <result column="username" jdbcType="VARCHAR" property="username"/>
- <result column="identify_name" jdbcType="VARCHAR" property="identifyName"/>
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
- <result column="number" jdbcType="INTEGER" property="number" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="status" jdbcType="INTEGER" property="status"/>
- <result column="authentication" jdbcType="INTEGER" property="authentication"/>
- <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
- <result column="logo_url" jdbcType="VARCHAR" property="logoUrl" />
- <result column="expert" jdbcType="INTEGER" property="expert" />
- <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- </resultMap>
-
- <resultMap id="UserDownLoadBo" type="com.goafanti.user.bo.UserDownLoadBo">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="diploma_url" jdbcType="VARCHAR" property="diplomaUrl" />
- <result column="degree_diploma_url" jdbcType="VARCHAR" property="degreeDiplomaUrl" />
- <result column="professional_certificate_url" jdbcType="VARCHAR" property="professionalCertificateUrl" />
- <result column="qualification_certificate_url" jdbcType="VARCHAR" property="qualificationCertificateUrl" />
- <result column="positive_id_url" jdbcType="VARCHAR" property="positiveIdUrl" />
- <result column="opposite_id_url" jdbcType="VARCHAR" property="oppositeIdUrl" />
- </resultMap>
-
- <select id="selectByMobieAndType" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user
- where mobile = #{mobile}
- <if test="type != null">
- and type=#{type}
- </if>
- and source = 0
- </select>
-
- <select id="selectByNameAndType" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from
- user
- where
- source = 0
- and binary username = #{username}
- <if test="type != null">
- and type = #{type}
- </if>
- </select>
-
- <select id="selectUserBaseByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
- select
- a.id,
- a.number,
- a.type,
- a.authentication,
- a.username,
- a.identify_name,
- a.nickname,
- a.create_time,
- a.authentication,
- a.status,a.email,
- a.head_portrait_url,
- b.expert,
- b.audit_status,
- a.mobile from user a
- left join user_identity b on a.id=b.uid
- where
- a.id = #{uid,jdbcType = VARCHAR}
- </select>
-
- <select id="selectUserDownLoadBoByUserId" parameterType="java.lang.String" resultMap="UserDownLoadBo">
- select u.id,i.positive_id_url ,i.opposite_id_url,c.professional_certificate_url,c.qualification_certificate_url,
- e.diploma_url, e.degree_diploma_url
- from user u
- LEFT JOIN user_identity i on u.id = i.uid
- LEFT JOIN user_career c on u.id = c.uid
- LEFT JOIN user_edu e on u.id = e.uid
- where u.id =#{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findUserListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserListBo">
- select
- u.id ,
- u.mobile,
- u.email,
- u.create_time as createTime,
- u.number ,
- i.username,
- i.audit_status as auditStatus,
- a.name as adminName,
- ad.name as managerName
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN admin ad on ad.id = u.mid
- LEFT JOIN user_identity i
- ON u.id = i.uid where u.type = 0
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="email != null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="pStart != null">
- and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test=" number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="username != null">
- and i.username like CONCAT ('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="auditStatus != null">
- and i.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findUserCount" parameterType="String" resultType="java.lang.Integer">
- select count(1)
- from user u LEFT JOIN user_identity i
- ON u.id = i.uid
- WHERE u.type = 0
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="email != null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="pStart != null">
- and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="username != null">
- and i.username like CONCAT ('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="auditStatus != null">
- and i.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- </select>
-
- <select id="findOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
- select u.id ,u.mobile, u.email, u.create_time as createTime,
- u.number, o.audit_status as orgAuditStatus, a.name as adminName,
- o.unit_name as unitName, ad.name as managerName
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN admin ad on ad.id = u.mid
- LEFT JOIN organization_identity o
- ON u.id = o.uid
- WHERE u.type = 1
-
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="uid != null">
- and u.id = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="email != null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="pStart != null">
- and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test=" number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="unitName != null">
- and o.unit_name = #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus != null">
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findOrgCount" parameterType="String" resultType="java.lang.Integer">
- select count(1)
- from user u LEFT JOIN organization_identity o
- ON u.id = o.uid
- WHERE u.type = 1
- <if test="uid != null">
- and u.id = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="email != null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="pStart != null">
- and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test=" number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="unitName != null">
- and o.unit_name = #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus != null">
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- </select>
-
- <select id="findUserByAidWithParamsListByPage" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgListBo">
- select
- u.id ,
- u.mobile,
- u.email,
- u.create_time as createTime,
- u.number ,
- a.name as adminName,
- ma.name as managerName,
- u.type,
- i.username,
- i.audit_status as userAuditStatus
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN admin ma on ma.id = u.mid
- LEFT JOIN user_identity i on u.id = i.uid
- where u.type = 0
- <if test="aid != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
- <if test="number !=null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="mobile !=null">
- and u.mobile= #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus !=null">
- and i.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="auditName !=null">
- and i.username like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
- </if>
- <if test="email !=null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="startCreateTime !=null">
- and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
- </if>
- <if test="endCreateTime !=null">
- and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
- </if>
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findUserByAidWithParamsCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN user_identity i on u.id = i.uid
- where u.type = 0
- <if test="aid != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
- <if test="number !=null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="mobile !=null">
- and u.mobile= #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus !=null">
- and i.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="auditName !=null">
- and i.username like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
- </if>
- <if test="email !=null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="startCreateTime !=null">
- and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
- </if>
- <if test="endCreateTime !=null">
- and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
- </if>
- </select>
-
-
- <select id="findOrgByAidWithParamsListByPage" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgListBo">
- select
- u.id ,
- u.mobile,
- u.email,
- u.create_time as createTime,
- u.number ,
- a.name as adminName,
- ma.name as managerName,
- u.type,
- i.unit_name as unitName,
- i.audit_status as orgAuditStatus
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN admin ma on ma.id = u.mid
- LEFT JOIN organization_identity i on u.id = i.uid
- where u.type = 1
- <if test="aid != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
- <if test="number !=null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="mobile !=null">
- and u.mobile= #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus !=null">
- and i.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="auditName !=null">
- and i.unit_name like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
- </if>
- <if test="email !=null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="startCreateTime !=null">
- and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
- </if>
- <if test="endCreateTime !=null">
- and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
- </if>
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findOrgByAidWithParamsCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from user u
- LEFT JOIN admin a on a.id = u.aid
- LEFT JOIN organization_identity i on u.id = i.uid
- where u.type = 1
- <if test="aid != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
- <if test="number !=null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="mobile !=null">
- and u.mobile= #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus !=null">
- and i.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="auditName !=null">
- and i.unit_name like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
- </if>
- <if test="email !=null">
- and u.email = #{email,jdbcType=VARCHAR}
- </if>
- <if test="startCreateTime !=null">
- and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
- </if>
- <if test="endCreateTime !=null">
- and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
- </if>
- </select>
- <select id="findUserByNameAndMobile" resultType="java.lang.String">
- select
- ui.username
- from user u
- left join user_identity ui on u.id = ui.uid
- where u.lvl > 0 and u.type = 0 and ui.audit_status = 5
- <if test="name != null">
- and ui.username = #{name,jdbcType=VARCHAR}
- </if>
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="findOrgByNameAndMobile" resultType="java.lang.String">
- select
- oi.unit_name
- from user u
- left join organization_identity oi on u.id = oi.uid
- where u.lvl > 0 and u.type = 1 and oi.audit_status = 5
- <if test="name != null">
- and oi.unit_name = #{name,jdbcType=VARCHAR}
- </if>
- <if test="mobile != null">
- and u.mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="checkUser" resultMap="BaseResultMap">
- select
- id
- from
- user
- where status <![CDATA[!= ]]> 1
- <if test="id != null and id != ''">
- and id = #{id,jdbcType=VARCHAR}
- </if>
- <if test="identifyName != null and identifyName != ''">
- and identify_name = #{identifyName,jdbcType=VARCHAR}
- </if>
- <if test="mobile != null and mobile !=''">
- and mobile = #{mobile,jdbcType=VARCHAR}
- </if>
- <if test="type != null">
- and type = #{type,jdbcType=INTEGER}
- </if>
- <if test="source != null">
- and source = #{source,jdbcType=INTEGER}
- </if>
- <if test="nickname != null and nickname != ''">
- and nickname = #{nickname,jdbcType=INTEGER}
- </if>
-
- </select>
- <select id="userInterest" resultType="com.goafanti.user.bo.UserInterestBo">
- select
- t.to_uid as id,y.username as name,y.work_unit as workUnit,y.professional_title as professionalTitle,t.create_time as createTime
- from user_interest t
- LEFT join user_identity y on t.to_uid=y.uid
- LEFT join user u on t.to_uid=u.id
- where t.from_uid=#{uid,jdbcType=VARCHAR}
- </select>
- <select id="selectBaseInfo" parameterType="java.lang.String" resultType="com.goafanti.app.bo.UserBasicInfo">
- select
- a.id,
- a.mobile,
- a.nickname,
- a.email,
- a.number,
- a.type,
- a.company_logo_url as companyLogoUrl,
- a.head_portrait_url as headPortraitUrl,
- a.introduction,
- b.registration_id as registrationId,
- b.easemob_name as easemobName,
- b.easemob_pass as easemobPass
- from user a left join jpush_easemob_account b
- on a.id = b.uid
- where
- a.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="selectByNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
- select nickname,head_portrait_url from user where number = #{easemobName,jdbcType=VARCHAR}
- </select>
-
- <update id="updateEnteringAudit" parameterType="com.goafanti.common.model.User">
- update user
- <set>
- <if test="auditStatus != null">
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="auditOpinion != null">
- audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectUserByRoleName" parameterType="java.lang.String" resultMap="BaseResultMap">
- select c.id from role a left join user_role b on a.id = b.rid left join admin c on b.uid = c.id where a.role_name = #{roleName}
- </select>
-
- <select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
- select
- u.id,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
- u.head_portrait_url as personPortraitUrl,u.identify_name as username,
- i.province,
- u.introduction as personalProfile,
- ua.ability_label as abilityLabel,i.qualification,
- i.graduate_school,i.major_category,i.work_unit as workUnit,
- ic.name as engagedField
- from `user` u
- left join user_identity i on u.id=i.uid
- left join
- user_career c on u.id=c.uid
- <!-- left join user_info info on u.id=info.uid -->
- left join user_ability ua on u.id=ua.uid
- left join user_edu e on u.id=e.uid
- left join industry_category ic on i.industry=ic.id
- WHERE
- u.source=0 and i.expert=1
- <if test="_parameter!= null">
- and u.id= #{_parameter,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
- select
- u.id,u.identify_name as username,c.work_unit as work_unit,i.professional_title as position,c.achievement,
- u.head_portrait_url as personPortraitUrl,
- i.province,
- u.introduction as personalProfile,
- ua.ability_label as abilityLabel,i.uid,u.type
- from `user` u
- left join user_identity i on u.id=i.uid
- left join
- user_career c on u.id=c.uid
- <!-- left join user_info info on u.id=info.uid -->
- left join user_ability ua on u.id=ua.uid
- WHERE
- u.source =0 and i.expert=1
- limit 0,50
- </select>
-
- <select id="selectByMobieAndTypeCount" resultType="java.lang.Integer">
- select
- count(*)
- from user
- where mobile = #{0} and source = 0
- </select>
- <resultMap id="regUserMap" type="com.goafanti.common.model.JtMessageConsumer">
- <result column="id" jdbcType="VARCHAR" property="aid" />
- </resultMap>
- <!-- 查找所有正常的注册用户数据 -->
- <select id="getAllUser" resultMap="regUserMap">
- select id from user where status = 0 and source = 0
- </select>
-
- <!-- 获得用户数据 -->
- <select id="getUserInfoList" parameterType="Map" resultType="com.goafanti.common.model.User">
- select
- id, mobile, nickname, email, type,
- source, username, create_time as createTime
- from `user`
- where 1 = 1
- <if test="user.status != null">
- and status = #{user.status,jdbcType=INTEGER}
- </if>
- <if test="user.source != null">
- and source = #{user.source,jdbcType=INTEGER}
- </if>
- <if test="user.type != null">
- and `type` = #{user.type,jdbcType=INTEGER}
- </if>
- <if test="user.mobile != null">
- <bind name="m" value="'%' + user.mobile + '%'"/>
- and mobile like #{m,jdbcType=VARCHAR}
- </if>
- <if test="user.username != null">
- <bind name="u" value="'%' + user.username + '%'"/>
- and username like #{u,jdbcType=VARCHAR}
- </if>
- order by create_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <select id="getUserInfoCount" parameterType="Map" resultType="java.lang.Integer">
- select count(0)
- from `user`
- where 1 = 1
- <if test="user.status != null">
- and status = #{user.status,jdbcType=INTEGER}
- </if>
- <if test="user.source != null">
- and source = #{user.source,jdbcType=INTEGER}
- </if>
- <if test="user.type != null">
- and `type` = #{user.type,jdbcType=INTEGER}
- </if>
- <if test="user.mobile != null">
- <bind name="m" value="'%' + user.mobile + '%'"/>
- and mobile like #{m,jdbcType=VARCHAR}
- </if>
- <if test="user.username != null">
- <bind name="u" value="'%' + user.username + '%'"/>
- and username like #{u,jdbcType=VARCHAR}
- </if>
- </select>
- <!-- 验证手机号码是否重复 -->
- <select id="getCountByMobile" parameterType="com.goafanti.common.model.User" resultType="java.lang.Integer">
- select count(0) from user where mobile = #{mobile,jdbcType=VARCHAR}
- and source=0
- <if test="type != null">
- and type= #{type,jdbcType=INTEGER}
- </if>
- and id <> #{id,jdbcType=VARCHAR}
- </select>
- <select id="getUserListMobile" resultType="java.lang.String">
- select mobile from `user`
- where status=0
- and source=0
- </select>
- <select id="getInvitationCode" resultType="java.lang.String">
- select to_invite_code from `user` where id= #{uid,jdbcType=VARCHAR}
- </select>
- <select id="getToInviteCode" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from `user` where to_invite_code= #{toInviteCode,jdbcType=VARCHAR}
- </select>
-
- <select id="selectOrganizationList" resultType="com.goafanti.common.model.User">
- SELECT
- <include refid="Base_Column_List" />
- FROM user
- where status=0 and source=0
- and `type`=1
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <select id="selectOrganizationCount" resultType="java.lang.Integer">
- SELECT
- count(*)
- FROM user
- where status=0 and source=0
- and `type`=1
- </select>
- </mapper>
|