| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467 |
- <?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 Nov 30 16:41:39 CST 2017.
- -->
- <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="aid" jdbcType="VARCHAR" property="aid" />
- <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="last_member_order_id" jdbcType="VARCHAR" property="lastMemberOrderId" />
- <result column="current_member_status" jdbcType="INTEGER" property="currentMemberStatus" />
- <result column="value_added_tag" jdbcType="VARCHAR" property="valueAddedTag" />
- <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
- <result column="share_type" jdbcType="INTEGER" property="shareType" />
- <result column="identify_name" jdbcType="VARCHAR" property="identifyName" />
- <result column="is_member" jdbcType="INTEGER" property="isMember" />
- <result column="business_audit" jdbcType="INTEGER" property="businessAudit" />
- </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 Nov 30 16:41:39 CST 2017.
- -->
- <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 Nov 30 16:41:39 CST 2017.
- -->
- <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 Nov 30 16:41:39 CST 2017.
- -->
- id, mobile, password, nickname, email, create_time, number, lvl, type, aid, mid,
- status, source, update_time, company_logo_url, head_portrait_url, society_tag, introduction,
- last_member_order_id, current_member_status, value_added_tag, organization_id, share_type,
- identify_name, is_member, business_audit
- </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 Nov 30 16:41:39 CST 2017.
- -->
- 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 Nov 30 16:41:39 CST 2017.
- -->
- 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 Nov 30 16:41:39 CST 2017.
- -->
- 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 Nov 30 16:41:39 CST 2017.
- -->
- 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 Nov 30 16:41:39 CST 2017.
- -->
- insert into user (id, mobile, password,
- nickname, email, create_time,
- number, lvl, type, aid,
- mid, status, source,
- update_time, company_logo_url, head_portrait_url,
- society_tag, introduction, last_member_order_id,
- current_member_status, value_added_tag, organization_id,
- share_type, identify_name, is_member,
- business_audit)
- 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}, #{aid,jdbcType=VARCHAR},
- #{mid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{source,jdbcType=INTEGER},
- #{updateTime,jdbcType=TIMESTAMP}, #{companyLogoUrl,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR},
- #{societyTag,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{lastMemberOrderId,jdbcType=VARCHAR},
- #{currentMemberStatus,jdbcType=INTEGER}, #{valueAddedTag,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR},
- #{shareType,jdbcType=INTEGER}, #{identifyName,jdbcType=VARCHAR}, #{isMember,jdbcType=INTEGER},
- #{businessAudit,jdbcType=INTEGER})
- </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 Nov 30 16:41:39 CST 2017.
- -->
- 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="aid != null">
- aid,
- </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="lastMemberOrderId != null">
- last_member_order_id,
- </if>
- <if test="currentMemberStatus != null">
- current_member_status,
- </if>
- <if test="valueAddedTag != null">
- value_added_tag,
- </if>
- <if test="organizationId != null">
- organization_id,
- </if>
- <if test="shareType != null">
- share_type,
- </if>
- <if test="identifyName != null">
- identify_name,
- </if>
- <if test="isMember != null">
- is_member,
- </if>
- <if test="businessAudit != null">
- business_audit,
- </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="aid != null">
- #{aid,jdbcType=VARCHAR},
- </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="lastMemberOrderId != null">
- #{lastMemberOrderId,jdbcType=VARCHAR},
- </if>
- <if test="currentMemberStatus != null">
- #{currentMemberStatus,jdbcType=INTEGER},
- </if>
- <if test="valueAddedTag != null">
- #{valueAddedTag,jdbcType=VARCHAR},
- </if>
- <if test="organizationId != null">
- #{organizationId,jdbcType=VARCHAR},
- </if>
- <if test="shareType != null">
- #{shareType,jdbcType=INTEGER},
- </if>
- <if test="identifyName != null">
- #{identifyName,jdbcType=VARCHAR},
- </if>
- <if test="isMember != null">
- #{isMember,jdbcType=INTEGER},
- </if>
- <if test="businessAudit != null">
- #{businessAudit,jdbcType=INTEGER},
- </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 Nov 30 16:41:39 CST 2017.
- -->
- 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 Nov 30 16:41:39 CST 2017.
- -->
- 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.aid != null">
- aid = #{record.aid,jdbcType=VARCHAR},
- </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.lastMemberOrderId != null">
- last_member_order_id = #{record.lastMemberOrderId,jdbcType=VARCHAR},
- </if>
- <if test="record.currentMemberStatus != null">
- current_member_status = #{record.currentMemberStatus,jdbcType=INTEGER},
- </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.shareType != null">
- share_type = #{record.shareType,jdbcType=INTEGER},
- </if>
- <if test="record.identifyName != null">
- identify_name = #{record.identifyName,jdbcType=VARCHAR},
- </if>
- <if test="record.isMember != null">
- is_member = #{record.isMember,jdbcType=INTEGER},
- </if>
- <if test="record.businessAudit != null">
- business_audit = #{record.businessAudit,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 Nov 30 16:41:39 CST 2017.
- -->
- 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},
- aid = #{record.aid,jdbcType=VARCHAR},
- 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},
- last_member_order_id = #{record.lastMemberOrderId,jdbcType=VARCHAR},
- current_member_status = #{record.currentMemberStatus,jdbcType=INTEGER},
- value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
- organization_id = #{record.organizationId,jdbcType=VARCHAR},
- share_type = #{record.shareType,jdbcType=INTEGER},
- identify_name = #{record.identifyName,jdbcType=VARCHAR},
- is_member = #{record.isMember,jdbcType=INTEGER},
- business_audit = #{record.businessAudit,jdbcType=INTEGER}
- <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 Nov 30 16:41:39 CST 2017.
- -->
- 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="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </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="lastMemberOrderId != null">
- last_member_order_id = #{lastMemberOrderId,jdbcType=VARCHAR},
- </if>
- <if test="currentMemberStatus != null">
- current_member_status = #{currentMemberStatus,jdbcType=INTEGER},
- </if>
- <if test="valueAddedTag != null">
- value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
- </if>
- <if test="organizationId != null">
- organization_id = #{organizationId,jdbcType=VARCHAR},
- </if>
- <if test="shareType != null">
- share_type = #{shareType,jdbcType=INTEGER},
- </if>
- <if test="identifyName != null">
- identify_name = #{identifyName,jdbcType=VARCHAR},
- </if>
- <if test="isMember != null">
- is_member = #{isMember,jdbcType=INTEGER},
- </if>
- <if test="businessAudit != null">
- business_audit = #{businessAudit,jdbcType=INTEGER},
- </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 Nov 30 16:41:39 CST 2017.
- -->
- 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},
- aid = #{aid,jdbcType=VARCHAR},
- 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},
- last_member_order_id = #{lastMemberOrderId,jdbcType=VARCHAR},
- current_member_status = #{currentMemberStatus,jdbcType=INTEGER},
- value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
- organization_id = #{organizationId,jdbcType=VARCHAR},
- share_type = #{shareType,jdbcType=INTEGER},
- identify_name = #{identifyName,jdbcType=VARCHAR},
- is_member = #{isMember,jdbcType=INTEGER},
- business_audit = #{businessAudit,jdbcType=INTEGER}
- 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="email" jdbcType="VARCHAR" property="email" />
- <result column="number" jdbcType="INTEGER" property="number" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="person_portrait_url" jdbcType="VARCHAR" property="personPortraitUrl" />
- <result column="logo_url" jdbcType="VARCHAR" property="logoUrl" />
- <result column="grade_name" jdbcType="VARCHAR" property="gradeName" />
- </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 = #{0} and type=#{1} and source = 0
- </select>
-
- <select id="selectUserPageHomeBoByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
- select
- u.lvl,mg.grade_name , u.nickname, u.email,
- u.number, u.type, u.head_portrait_url as person_portrait_url,
- u.company_logo_url as logo_url, u.id as uid, adc.achievement_count as achievementNum,
- adc.demand_count as demandNum
- from user u
- LEFT JOIN achievement_demand_count adc on adc.uid = u.id
- LEFT JOIN member_grade mg ON mg.member_rank=u.lvl
- where u.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="findAreaManagerUserListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserListBo">
- select
- u.id ,
- u.mobile,
- u.email,
- u.create_time as createTime,
- u.number ,
- i.audit_status as auditStatus,
- i.username,
- 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>
-
- <if test="provinceList != null">
- and i.province in
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
- #{plist}
- </foreach>
- </if>
- <if test="cityList != null">
- and i.city in
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
- #{clist}
- </foreach>
- </if>
-
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findAreaManagerUserCount" 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>
-
- <if test="provinceList != null">
- and i.province in
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
- #{plist}
- </foreach>
- </if>
- <if test="cityList != null">
- and i.city in
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
- #{clist}
- </foreach>
- </if>
- </select>
-
- <select id="findAreaManagerOrgListByPage" 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 like '%'#{unitName,jdbcType=VARCHAR}'%'
- </if>
- <if test="auditStatus != null">
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="provinceList != null">
- and o.licence_province in
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
- #{plist}
- </foreach>
- </if>
- <if test="cityList != null">
- and o.licence_city in
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
- #{clist}
- </foreach>
- </if>
- order by u.number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findAreaManagerOrgCount" 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 like '%'#{unitName,jdbcType=VARCHAR}'%'
- </if>
- <if test="auditStatus != null">
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="provinceList != null">
- and i.province in
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
- #{plist}
- </foreach>
- </if>
- <if test="cityList != null">
- and i.city in
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
- #{clist}
- </foreach>
- </if>
- </select>
-
- <select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
- select
- u.id,i.username,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
- u.head_portrait_url as personPortraitUrl,
- 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.type = 0
- <if test="_parameter!= null">
- and u.id= #{_parameter,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="findOrgPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgPartnerDetailBo">
- select
- u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
- u.head_portrait_url as personPortraitUrl,
- i.province,u.introduction as personalProfile,
- ua.ability_label as abilityLabel
- 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.type = 1
- <if test="_parameter!= null">
- and u.id= #{_parameter,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="findStarListByPage" parameterType="String" resultType="com.goafanti.user.bo.StarListBo">
- select
- u.id as uid,
- u.number,
- ui.username,
- uc.engaged_field as engagedField,
- uc.professional_title as professionalTitle,
- uc.work_unit as workUnit,
- adc.achievement_count as achievementNum
- from user u
- left join user_identity ui on ui.uid = u.id
- left join user_career uc on uc.uid = u.id
- left join achievement_demand_count adc on adc.uid = u.id
- where
- ui.celebrity = 1
- <if test="number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="engagedField != null">
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="professionalTitle != null">
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
- </if>
- <if test="workUnit != null">
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
- </if>
- ORDER BY adc.achievement_count DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
-
- </select>
-
- <select id="findStarCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from user u
- left join user_identity ui on ui.uid = u.id
- left join user_career uc on uc.uid = u.id
- where
- ui.celebrity = 1
- <if test="number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="engagedField != null">
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="professionalTitle != null">
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
- </if>
- <if test="workUnit != null">
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
- </if>
- </select>
-
- <select id="findStarAndExpertListByPage" parameterType="String" resultType="com.goafanti.user.bo.StarAndExpertListBo">
- select
- u.id as uid,
- u.number,
- ui.username,
- uc.engaged_field as engagedField,
- uc.professional_title as professionalTitle,
- uc.work_unit as workUnit,
- adc.achievement_count as achievementNum
- from user u
- left join user_identity ui on ui.uid = u.id
- left join user_career uc on uc.uid = u.id
- left join achievement_demand_count adc on adc.uid = u.id
- where
- (ui.celebrity = 1 or ui.expert = 1)
- <if test="number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="engagedField != null">
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="professionalTitle != null">
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
- </if>
- <if test="workUnit != null">
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
- </if>
- ORDER BY adc.achievement_count DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
-
- </select>
-
- <select id="findStarAndExpertCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from user u
- left join user_identity ui on ui.uid = u.id
- left join user_career uc on uc.uid = u.id
- where
- (ui.celebrity = 1 or ui.expert = 1)
- <if test="number != null">
- and u.number = #{number,jdbcType=INTEGER}
- </if>
- <if test="engagedField != null">
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="professionalTitle != null">
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
- </if>
- <if test="workUnit != null">
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
- </if>
- </select>
-
- <select id="selectNumberByPrimaryKey" parameterType="String" resultType="java.lang.Long">
- select number
- from user
- where id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
- select
- u.id,i.username,c.work_unit as work_unit,c.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.type = 0
- limit 0,50
- </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,
- a.is_member as isMember,
- 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>
- </mapper>
|