| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473 |
- <?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.UserIdentityMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserIdentity">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="uid" jdbcType="VARCHAR" property="uid" />
- <result column="username" jdbcType="VARCHAR" property="username" />
- <result column="sex" jdbcType="VARCHAR" property="sex" />
- <result column="date_of_birth_year" jdbcType="VARCHAR" property="dateOfBirthYear" />
- <result column="date_of_birth_month" jdbcType="VARCHAR" property="dateOfBirthMonth" />
- <result column="id_number" jdbcType="VARCHAR" property="idNumber" />
- <result column="positive_id_url" jdbcType="VARCHAR" property="positiveIdUrl" />
- <result column="opposite_id_url" jdbcType="VARCHAR" property="oppositeIdUrl" />
- <result column="province" jdbcType="INTEGER" property="province" />
- <result column="city" jdbcType="INTEGER" property="city" />
- <result column="area" jdbcType="INTEGER" property="area" />
- <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
- <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
- <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
- <result column="bank_card_number" jdbcType="VARCHAR" property="bankCardNumber" />
- <result column="amount_money" jdbcType="DECIMAL" property="amountMoney" />
- <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
- <result column="process" jdbcType="INTEGER" property="process" />
- <result column="wrong_count" jdbcType="INTEGER" property="wrongCount" />
- <result column="payment_date" jdbcType="TIMESTAMP" property="paymentDate" />
- <result column="expert" jdbcType="INTEGER" property="expert" />
- <result column="international" jdbcType="INTEGER" property="international" />
- <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
- <result column="qq" jdbcType="VARCHAR" property="qq" />
- <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
- <result column="postcode" jdbcType="VARCHAR" property="postcode" />
- <result column="review_instructions" jdbcType="VARCHAR" property="reviewInstructions" />
- <result column="industry" jdbcType="INTEGER" property="industry" />
- <result column="contacts" jdbcType="VARCHAR" property="contacts" />
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="professional_title" jdbcType="VARCHAR" property="professionalTitle" />
- <result column="work_unit" jdbcType="VARCHAR" property="workUnit" />
- <result column="education" jdbcType="VARCHAR" property="education" />
- <result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
- <result column="qualification" jdbcType="VARCHAR" property="qualification" />
- <result column="graduate_school" jdbcType="VARCHAR" property="graduateSchool" />
- <result column="consultant" jdbcType="INTEGER" property="consultant" />
- <result column="consultation_price" jdbcType="DECIMAL" property="consultationPrice" />
- <result column="expert_audit" jdbcType="INTEGER" property="expertAudit" />
- <result column="identify_name" jdbcType="VARCHAR" property="identifyName" />
- <result column="consultant_type" jdbcType="INTEGER" property="consultantType" />
- <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
- <result column="society_tag" jdbcType="VARCHAR" property="societyTag" />
- <result column="introduction" jdbcType="VARCHAR" property="introduction" />
- <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
- </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 Fri Dec 29 09:20:50 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 Fri Dec 29 09:20:50 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 Fri Dec 29 09:20:50 CST 2017.
- -->
- id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
- opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number,
- amount_money, audit_status, process, wrong_count, payment_date, expert,
- international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
- contacts, email, professional_title, work_unit, education, major_category, qualification,
- graduate_school, consultation_price , consultant_type
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from user_identity
- <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 Fri Dec 29 09:20:50 CST 2017.
- -->
- select
- <include refid="Base_Column_List" />
- from user_identity
- 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 Fri Dec 29 09:20:50 CST 2017.
- -->
- delete from user_identity
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserIdentityExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- delete from user_identity
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- insert into user_identity (id, uid, username,
- sex, date_of_birth_year, date_of_birth_month,
- id_number, positive_id_url, opposite_id_url,
- province, city, area,
- contact_mobile, bank_name, bank_account,
- bank_card_number, amount_money, audit_status,
- process, wrong_count, payment_date,
- expert, international,
- fixed_tel, qq, postal_address,
- postcode, review_instructions, industry,
- contacts, email, professional_title,
- work_unit, education, major_category,
- qualification, graduate_school,
- consultation_price)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
- #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
- #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
- #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
- #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
- #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER},
- #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
- #{expert,jdbcType=INTEGER}, #{international,jdbcType=INTEGER},
- #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
- #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
- #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR},
- #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR},
- #{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR},
- #{consultationPrice,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- insert into user_identity
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="uid != null">
- uid,
- </if>
- <if test="username != null">
- username,
- </if>
- <if test="sex != null">
- sex,
- </if>
- <if test="dateOfBirthYear != null">
- date_of_birth_year,
- </if>
- <if test="dateOfBirthMonth != null">
- date_of_birth_month,
- </if>
- <if test="idNumber != null">
- id_number,
- </if>
- <if test="positiveIdUrl != null">
- positive_id_url,
- </if>
- <if test="oppositeIdUrl != null">
- opposite_id_url,
- </if>
- <if test="province != null">
- province,
- </if>
- <if test="city != null">
- city,
- </if>
- <if test="area != null">
- area,
- </if>
- <if test="contactMobile != null">
- contact_mobile,
- </if>
- <if test="bankName != null">
- bank_name,
- </if>
- <if test="bankAccount != null">
- bank_account,
- </if>
- <if test="bankCardNumber != null">
- bank_card_number,
- </if>
- <if test="amountMoney != null">
- amount_money,
- </if>
- <if test="auditStatus != null">
- audit_status,
- </if>
- <if test="process != null">
- process,
- </if>
- <if test="wrongCount != null">
- wrong_count,
- </if>
- <if test="paymentDate != null">
- payment_date,
- </if>
- <if test="expert != null">
- expert,
- </if>
- <if test="international != null">
- international,
- </if>
- <if test="fixedTel != null">
- fixed_tel,
- </if>
- <if test="qq != null">
- qq,
- </if>
- <if test="postalAddress != null">
- postal_address,
- </if>
- <if test="postcode != null">
- postcode,
- </if>
- <if test="reviewInstructions != null">
- review_instructions,
- </if>
- <if test="industry != null">
- industry,
- </if>
- <if test="contacts != null">
- contacts,
- </if>
- <if test="email != null">
- email,
- </if>
- <if test="professionalTitle != null">
- professional_title,
- </if>
- <if test="workUnit != null">
- work_unit,
- </if>
- <if test="education != null">
- education,
- </if>
- <if test="majorCategory != null">
- major_category,
- </if>
- <if test="qualification != null">
- qualification,
- </if>
- <if test="graduateSchool != null">
- graduate_school,
- </if>
- <if test="consultationPrice != null">
- consultation_price,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="uid != null">
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="sex != null">
- #{sex,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthYear != null">
- #{dateOfBirthYear,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthMonth != null">
- #{dateOfBirthMonth,jdbcType=VARCHAR},
- </if>
- <if test="idNumber != null">
- #{idNumber,jdbcType=VARCHAR},
- </if>
- <if test="positiveIdUrl != null">
- #{positiveIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="oppositeIdUrl != null">
- #{oppositeIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- #{city,jdbcType=INTEGER},
- </if>
- <if test="area != null">
- #{area,jdbcType=INTEGER},
- </if>
- <if test="contactMobile != null">
- #{contactMobile,jdbcType=VARCHAR},
- </if>
- <if test="bankName != null">
- #{bankName,jdbcType=VARCHAR},
- </if>
- <if test="bankAccount != null">
- #{bankAccount,jdbcType=VARCHAR},
- </if>
- <if test="bankCardNumber != null">
- #{bankCardNumber,jdbcType=VARCHAR},
- </if>
- <if test="amountMoney != null">
- #{amountMoney,jdbcType=DECIMAL},
- </if>
- <if test="auditStatus != null">
- #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="process != null">
- #{process,jdbcType=INTEGER},
- </if>
- <if test="wrongCount != null">
- #{wrongCount,jdbcType=INTEGER},
- </if>
- <if test="paymentDate != null">
- #{paymentDate,jdbcType=TIMESTAMP},
- </if>
- <if test="expert != null">
- #{expert,jdbcType=INTEGER},
- </if>
- <if test="international != null">
- #{international,jdbcType=INTEGER},
- </if>
- <if test="fixedTel != null">
- #{fixedTel,jdbcType=VARCHAR},
- </if>
- <if test="qq != null">
- #{qq,jdbcType=VARCHAR},
- </if>
- <if test="postalAddress != null">
- #{postalAddress,jdbcType=VARCHAR},
- </if>
- <if test="postcode != null">
- #{postcode,jdbcType=VARCHAR},
- </if>
- <if test="reviewInstructions != null">
- #{reviewInstructions,jdbcType=VARCHAR},
- </if>
- <if test="industry != null">
- #{industry,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- #{contacts,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="professionalTitle != null">
- #{professionalTitle,jdbcType=VARCHAR},
- </if>
- <if test="workUnit != null">
- #{workUnit,jdbcType=VARCHAR},
- </if>
- <if test="education != null">
- #{education,jdbcType=VARCHAR},
- </if>
- <if test="majorCategory != null">
- #{majorCategory,jdbcType=VARCHAR},
- </if>
- <if test="qualification != null">
- #{qualification,jdbcType=VARCHAR},
- </if>
- <if test="graduateSchool != null">
- #{graduateSchool,jdbcType=VARCHAR},
- </if>
- <if test="consultationPrice != null">
- #{consultationPrice,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- select count(*) from user_identity
- <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 Fri Dec 29 09:20:50 CST 2017.
- -->
- update user_identity
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.uid != null">
- uid = #{record.uid,jdbcType=VARCHAR},
- </if>
- <if test="record.username != null">
- username = #{record.username,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- sex = #{record.sex,jdbcType=VARCHAR},
- </if>
- <if test="record.dateOfBirthYear != null">
- date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
- </if>
- <if test="record.dateOfBirthMonth != null">
- date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
- </if>
- <if test="record.idNumber != null">
- id_number = #{record.idNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.positiveIdUrl != null">
- positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.oppositeIdUrl != null">
- opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.province != null">
- province = #{record.province,jdbcType=INTEGER},
- </if>
- <if test="record.city != null">
- city = #{record.city,jdbcType=INTEGER},
- </if>
- <if test="record.area != null">
- area = #{record.area,jdbcType=INTEGER},
- </if>
- <if test="record.contactMobile != null">
- contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
- </if>
- <if test="record.bankName != null">
- bank_name = #{record.bankName,jdbcType=VARCHAR},
- </if>
- <if test="record.bankAccount != null">
- bank_account = #{record.bankAccount,jdbcType=VARCHAR},
- </if>
- <if test="record.bankCardNumber != null">
- bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.amountMoney != null">
- amount_money = #{record.amountMoney,jdbcType=DECIMAL},
- </if>
- <if test="record.auditStatus != null">
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- </if>
- <if test="record.process != null">
- process = #{record.process,jdbcType=INTEGER},
- </if>
- <if test="record.wrongCount != null">
- wrong_count = #{record.wrongCount,jdbcType=INTEGER},
- </if>
- <if test="record.paymentDate != null">
- payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.expert != null">
- expert = #{record.expert,jdbcType=INTEGER},
- </if>
- <if test="record.international != null">
- international = #{record.international,jdbcType=INTEGER},
- </if>
- <if test="record.fixedTel != null">
- fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
- </if>
- <if test="record.qq != null">
- qq = #{record.qq,jdbcType=VARCHAR},
- </if>
- <if test="record.postalAddress != null">
- postal_address = #{record.postalAddress,jdbcType=VARCHAR},
- </if>
- <if test="record.postcode != null">
- postcode = #{record.postcode,jdbcType=VARCHAR},
- </if>
- <if test="record.reviewInstructions != null">
- review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
- </if>
- <if test="record.industry != null">
- industry = #{record.industry,jdbcType=INTEGER},
- </if>
- <if test="record.contacts != null">
- contacts = #{record.contacts,jdbcType=VARCHAR},
- </if>
- <if test="record.email != null">
- email = #{record.email,jdbcType=VARCHAR},
- </if>
- <if test="record.professionalTitle != null">
- professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
- </if>
- <if test="record.workUnit != null">
- work_unit = #{record.workUnit,jdbcType=VARCHAR},
- </if>
- <if test="record.education != null">
- education = #{record.education,jdbcType=VARCHAR},
- </if>
- <if test="record.majorCategory != null">
- major_category = #{record.majorCategory,jdbcType=VARCHAR},
- </if>
- <if test="record.qualification != null">
- qualification = #{record.qualification,jdbcType=VARCHAR},
- </if>
- <if test="record.graduateSchool != null">
- graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
- </if>
- <if test="record.consultationPrice != null">
- consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
- </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 Fri Dec 29 09:20:50 CST 2017.
- -->
- update user_identity
- set id = #{record.id,jdbcType=VARCHAR},
- uid = #{record.uid,jdbcType=VARCHAR},
- username = #{record.username,jdbcType=VARCHAR},
- sex = #{record.sex,jdbcType=VARCHAR},
- date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
- date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
- id_number = #{record.idNumber,jdbcType=VARCHAR},
- positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
- opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
- province = #{record.province,jdbcType=INTEGER},
- city = #{record.city,jdbcType=INTEGER},
- area = #{record.area,jdbcType=INTEGER},
- contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
- bank_name = #{record.bankName,jdbcType=VARCHAR},
- bank_account = #{record.bankAccount,jdbcType=VARCHAR},
- bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
- amount_money = #{record.amountMoney,jdbcType=DECIMAL},
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- process = #{record.process,jdbcType=INTEGER},
- wrong_count = #{record.wrongCount,jdbcType=INTEGER},
- payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
- expert = #{record.expert,jdbcType=INTEGER},
- international = #{record.international,jdbcType=INTEGER},
- fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
- qq = #{record.qq,jdbcType=VARCHAR},
- postal_address = #{record.postalAddress,jdbcType=VARCHAR},
- postcode = #{record.postcode,jdbcType=VARCHAR},
- review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
- industry = #{record.industry,jdbcType=INTEGER},
- contacts = #{record.contacts,jdbcType=VARCHAR},
- email = #{record.email,jdbcType=VARCHAR},
- professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
- work_unit = #{record.workUnit,jdbcType=VARCHAR},
- education = #{record.education,jdbcType=VARCHAR},
- major_category = #{record.majorCategory,jdbcType=VARCHAR},
- qualification = #{record.qualification,jdbcType=VARCHAR},
- graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
- consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- update user_identity
- <set>
- <if test="uid != null">
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="sex != null">
- sex = #{sex,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthYear != null">
- date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthMonth != null">
- date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
- </if>
- <if test="idNumber != null">
- id_number = #{idNumber,jdbcType=VARCHAR},
- </if>
- <if test="positiveIdUrl != null">
- positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="oppositeIdUrl != null">
- opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- province = #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- city = #{city,jdbcType=INTEGER},
- </if>
- <if test="area != null">
- area = #{area,jdbcType=INTEGER},
- </if>
- <if test="contactMobile != null">
- contact_mobile = #{contactMobile,jdbcType=VARCHAR},
- </if>
- <if test="bankName != null">
- bank_name = #{bankName,jdbcType=VARCHAR},
- </if>
- <if test="bankAccount != null">
- bank_account = #{bankAccount,jdbcType=VARCHAR},
- </if>
- <if test="bankCardNumber != null">
- bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
- </if>
- <if test="amountMoney != null">
- amount_money = #{amountMoney,jdbcType=DECIMAL},
- </if>
- <if test="auditStatus != null">
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="process != null">
- process = #{process,jdbcType=INTEGER},
- </if>
- <if test="wrongCount != null">
- wrong_count = #{wrongCount,jdbcType=INTEGER},
- </if>
- <if test="paymentDate != null">
- payment_date = #{paymentDate,jdbcType=TIMESTAMP},
- </if>
- <if test="expert != null">
- expert = #{expert,jdbcType=INTEGER},
- </if>
- <if test="international != null">
- international = #{international,jdbcType=INTEGER},
- </if>
- <if test="fixedTel != null">
- fixed_tel = #{fixedTel,jdbcType=VARCHAR},
- </if>
- <if test="qq != null">
- qq = #{qq,jdbcType=VARCHAR},
- </if>
- <if test="postalAddress != null">
- postal_address = #{postalAddress,jdbcType=VARCHAR},
- </if>
- <if test="postcode != null">
- postcode = #{postcode,jdbcType=VARCHAR},
- </if>
- <if test="reviewInstructions != null">
- review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
- </if>
- <if test="industry != null">
- industry = #{industry,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- contacts = #{contacts,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="professionalTitle != null">
- professional_title = #{professionalTitle,jdbcType=VARCHAR},
- </if>
- <if test="workUnit != null">
- work_unit = #{workUnit,jdbcType=VARCHAR},
- </if>
- <if test="education != null">
- education = #{education,jdbcType=VARCHAR},
- </if>
- <if test="majorCategory != null">
- major_category = #{majorCategory,jdbcType=VARCHAR},
- </if>
- <if test="qualification != null">
- qualification = #{qualification,jdbcType=VARCHAR},
- </if>
- <if test="graduateSchool != null">
- graduate_school = #{graduateSchool,jdbcType=VARCHAR},
- </if>
- <if test="consultationPrice != null">
- consultation_price = #{consultationPrice,jdbcType=DECIMAL},
- </if>
- <if test="consultantType != null">
- consultant_type = #{consultantType,jdbcType=DECIMAL},
- </if>
- <if test="releaseStatus != null">
- release_status = #{releaseStatus,jdbcType=DECIMAL},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Dec 29 09:20:50 CST 2017.
- -->
- update user_identity
- set uid = #{uid,jdbcType=VARCHAR},
- username = #{username,jdbcType=VARCHAR},
- sex = #{sex,jdbcType=VARCHAR},
- date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
- date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
- id_number = #{idNumber,jdbcType=VARCHAR},
- positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
- opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
- province = #{province,jdbcType=INTEGER},
- city = #{city,jdbcType=INTEGER},
- area = #{area,jdbcType=INTEGER},
- contact_mobile = #{contactMobile,jdbcType=VARCHAR},
- bank_name = #{bankName,jdbcType=VARCHAR},
- bank_account = #{bankAccount,jdbcType=VARCHAR},
- bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
- amount_money = #{amountMoney,jdbcType=DECIMAL},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- process = #{process,jdbcType=INTEGER},
- wrong_count = #{wrongCount,jdbcType=INTEGER},
- payment_date = #{paymentDate,jdbcType=TIMESTAMP},
- expert = #{expert,jdbcType=INTEGER},
- international = #{international,jdbcType=INTEGER},
- fixed_tel = #{fixedTel,jdbcType=VARCHAR},
- qq = #{qq,jdbcType=VARCHAR},
- postal_address = #{postalAddress,jdbcType=VARCHAR},
- postcode = #{postcode,jdbcType=VARCHAR},
- review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
- industry = #{industry,jdbcType=INTEGER},
- contacts = #{contacts,jdbcType=VARCHAR},
- email = #{email,jdbcType=VARCHAR},
- professional_title = #{professionalTitle,jdbcType=VARCHAR},
- work_unit = #{workUnit,jdbcType=VARCHAR},
- education = #{education,jdbcType=VARCHAR},
- major_category = #{majorCategory,jdbcType=VARCHAR},
- qualification = #{qualification,jdbcType=VARCHAR},
- graduate_school = #{graduateSchool,jdbcType=VARCHAR},
- consultation_price = #{consultationPrice,jdbcType=DECIMAL}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user_identity
- where uid = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
- select
- a.id as uid,
- a.identify_name as identifyName,
- a.mobile,
- a.email,
- a.introduction,
- a.head_portrait_url as headPortraitUrl,
- a.society_tag as societyTag,
- a.type,
- a.authentication,
- b.id,
- b.industry,
- b.sex,
- b.date_of_birth_year as dateOfBirthYear,
- b.date_of_birth_month as dateOfBirthMonth,
- b.id_number as idNumber,
- b.positive_id_url as positiveIdUrl,
- b.opposite_id_url as oppositeIdUrl,
- b.province,
- b.city,
- b.area,
- b.postal_address as postalAddress,
- b.fixed_tel as fixedTel,
- b.qq,
- b.graduate_school as graduateSchool,
- b.major_category as majorCategory,
- b.qualification,
- b.professional_title as professionalTitle,
- b.audit_status as auditStatus,
- b.expert as expert,
- b.work_unit as workUnit,
- b.consultant_type as consultantType,
- b.audit_info as auditInfo
- from
- user a left join user_identity b on
- a.id = b.uid
- where
- a.id = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
- select
- u.aid,
- u.mid,
- u.lvl,
- ui.id,
- ui.uid,
- ui.username,
- ui.sex,
- ui.date_of_birth_year as dateOfBirthYear,
- ui.date_of_birth_month as dateOfBirthMonth,
- ui.id_number as idNumber,
- ui.positive_id_url as positiveIdUrl,
- ui.opposite_id_url as oppositeIdUrl,
- ui.province,
- ui.city,
- ui.area,
- ui.contact_mobile as contactMobile,
- ui.bank_name as bankName,
- ui.bank_account as bankAccount,
- ui.bank_card_number as bankCardNumber,
- ui.amount_money as amountMoney,
- ui.audit_status as auditStatus,
- ui.payment_date as paymentDate,
- ui.expert
- from user u
- LEFT JOIN user_identity ui on u.id = ui.uid
- where u.id = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
- select u.id as uid, i.username
- from user u INNER JOIN
- user_identity i on u.id = i.uid
- where u.lvl = 1
- <if test="_parameter != null">
- and u.mid = #{aid,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
- select u.id as uid, i.username
- from user u INNER JOIN
- user_identity i on u.id = i.uid
- where u.lvl = 1
- <if test="_parameter != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
- select u.id as uid, ui.username, u.mobile
- from user u INNER JOIN
- user_identity ui on u.id = ui.uid
- where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- <if test="aid != null">
- and u.mid = #{aid,jdbcType=VARCHAR}
- </if>
-
- </select>
-
- <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
- select u.id as uid, ui.username, u.mobile
- from user u INNER JOIN
- user_identity ui on u.id = ui.uid
- where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- <if test="aid != null">
- and u.aid = #{aid,jdbcType=VARCHAR}
- </if>
-
- </select>
-
- <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
- SELECT
- u.id as uid, u.identify_name as username, u.number,
- ui.id as identityId, ui.province,
- u.head_portrait_url as personPortraitUrl,
- u.introduction as achievementNum,
- adc.demand_count as demandNum,
- uc.engaged_field as engagedField,
- uc.work_unit as workUnit,
- ui.professional_title as position,
- ui.international
- 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.expert = 1 and u.source=0
- <if test="null != level and level==1 ">
- AND u.lvl <![CDATA[ >= ]]> 1
- </if>
- <if test="null !=level and level==0">
- AND u.lvl = 0
- </if>
- <if test="international !=null">
- AND ui.international= #{international,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- AND ui.province = #{province,jdbcType=INTEGER}
- </if>
- <if test="city != null">
- AND ui.city = #{city,jdbcType=INTEGER}
- </if>
- <if test="area != null">
- AND ui.area = #{area,jdbcType=INTEGER}
- </if>
- <if test="field != null">
- AND ui.industry= #{field,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus != null">
- AND ui.audit_status= #{auditStatus,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- order by u.number asc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
- SELECT
- count(0)
- 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.expert = 1 and u.source=0
- <if test="null != level and level==1 ">
- AND u.lvl <![CDATA[ >= ]]> 1
- </if>
- <if test="null !=level and level==0">
- AND u.lvl = 0
- </if>
- <if test="international !=null">
- AND ui.international= #{international,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- AND ui.province = #{province,jdbcType=INTEGER}
- </if>
- <if test="city != null">
- AND ui.city = #{city,jdbcType=INTEGER}
- </if>
- <if test="area != null">
- AND ui.area = #{area,jdbcType=INTEGER}
- </if>
- <if test="field != null">
- AND ui.industry= #{field,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- <if test="auditStatus != null">
- AND ui.audit_status= #{auditStatus,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
- select
- a.id,
- b.username as ownerName,
- c.ability_label as abilityLabel,
- a.head_portrait_url as personPortraitUrl,
- e.education
- from user a
- left join user_identity b
- on a.id = b.uid
- left join user_ability c
- on a.id = c.uid
- <!-- left join user_info d
- on a.id = d.uid -->
- left join user_edu e
- on a.id = e.uid
- where 1=1
- <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
- order by
- a.create_time desc
- limit 0,6
- </select>
- <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
- select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
- t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
- from user_identity t left JOIN user u on t.uid = u.id
- left join jpush_easemob_account j on t.uid=j.uid
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on t.uid=o.seller_id
- where t.expert=1
- and t.uid=#{uid,jdbcType=VARCHAR}
- </select>
- <select id="getExperts" resultType="com.goafanti.user.bo.UserIdentityBo">
- select t.id ,t.uid,u.identify_name as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
- u.type,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
- from user_identity t left JOIN user u on t.uid = u.id
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on t.uid=o.seller_id
- where expert=1
- and u.status !=1
- and t.audit_status =2
- and u.source=0
- order by u.update_time desc
- limit #{0}
- </select>
- <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
- select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
- u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
- from user_identity t left JOIN user u on t.uid = u.id
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on t.uid=o.seller_id
- where expert=1
- and u.status !=1
- and t.audit_status =2
- <if test="industry != null">
- and t.industry = #{industry,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and u.nickname like concat('%',#{name},'%')
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
- select count(0)
- from user_identity t left JOIN user u on t.uid = u.id
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on t.uid=o.seller_id
- where expert=1
- and u.status !=1
- <if test="industry != null">
- and t.industry = #{industry,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and u.nickname like concat('%',#{name},'%')
- </if>
- </select>
-
- <select id="countInterest" resultType="java.lang.Integer">
- select count(0)
- from user_interest
- where to_uid=#{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
- select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
- t.expert as consultant,ifnull(x.n,0) as reservationCount
- from user_identity t
- left join `user` u on t.uid=u.id
- left join ( select y.x as n, y.seller_id
- from (select count( 0 ) as x,seller_id from t_order
- where order_status != 4
- group by seller_id)y)x on t.uid=x.seller_id
- where t.expert=2
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findConsultantCount" resultType="java.lang.Integer">
- select count(0)
- from user_identity t
- left join `user` u on t.uid=u.id
- where t.expert=2
- </select>
-
-
- <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
- select
- t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
- u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
- from user_identity t
- left join user u on t.uid =u.id
- left join jpush_easemob_account j on t.uid=j.uid
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on t.uid=o.seller_id
- where t.expert=2
- and t.uid = #{uid,jdbcType=VARCHAR}
- </select>
- <select id="getAppHomeRecommended" resultType="com.goafanti.user.bo.UserIdentityRecommended">
- select
- ep.expert_id as id, u.identify_name as name, ui.work_unit as workUnit ,ui.professional_title as professionalTitle, u.introduction as introduction,
- u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
- from expert_publish ep
- left join user_identity ui on ep.expert_id = ui.uid
- left join user u on ep.expert_id = u.id
- left join (select count(0) as x,seller_id from t_order
- where order_status != 4
- group by seller_id ) o on ep.expert_id=o.seller_id
- where
- ep.publish_client = '1'
- and ep.publish_page = 'W01'
- order by
- ep.if_top, ep.top_number, ep.show_number asc
- limit 0,6
- </select>
-
- <select id="getConsultantList" resultType="com.goafanti.app.bo.consultantListBo">
- select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
- t.expert as consultant,ifnull(x.n,0) as reservationCount,work_unit as workUnit
- from user_identity t
- left join `user` u on t.uid=u.id
- left join ( select y.x as n, y.seller_id
- from (select count( 0 ) as x,seller_id from t_order
- where order_status != 4
- group by seller_id)y)x on t.uid=x.seller_id
- where t.expert=2
- limit #{0}
- </select>
-
- <select id="listInterestedExpert" resultType="com.goafanti.user.bo.UserIdentityBo">
- select t.id ,t.uid,u.identify_name as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
- u.type,u.introduction,t.expert,u.head_portrait_url as headPortraitUrl
- from user_identity t left JOIN user u on t.uid = u.id
- left join user_interest ui on ui.to_uid=u.id
- where ui.from_uid=#{uid,jdbcType=VARCHAR}
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="listInterestedExpertCount" resultType="java.lang.Integer">
- select count(0)
- from user_identity t left JOIN user u on t.uid = u.id
- left join user_interest ui on ui.to_uid=u.id
- where ui.from_uid=#{uid,jdbcType=VARCHAR}
- </select>
- <select id="appMyInterestedExpertList" resultType="com.goafanti.user.bo.MyInterestedBo">
- select t.uid as id,u.nickname as name,t.work_unit as workUnit,u.introduction,
- t.professional_title as professionalTitle,u.head_portrait_url as imgUrl,
- t.consultant_type as consultantType,
- if(isnull(a.count),0,a.count) as interestCount
- from user_interest ui left JOIN `user` u on ui.to_uid = u.id
- left join user_identity t on ui.to_uid=t.uid
- left join (select to_uid,count(*) as count from user_interest
- GROUP by to_uid)a on ui.to_uid=a.to_uid
- where 1=1
- <if test="type==0">
- and t.expert=1
- </if>
- <if test="type==1">
- and t.expert=2
- </if>
- and ui.from_uid=#{uid,jdbcType=VARCHAR}
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="appMyInterestedExpertCount" resultType="java.lang.Integer">
- select count(*)from user_interest ui
- left join user_identity t on ui.to_uid=t.uid
- where 1=1
- <if test="type==0">
- and t.expert=1
- </if>
- <if test="type==1">
- and t.expert=2
- </if>
- and ui.from_uid=#{uid,jdbcType=VARCHAR}
- </select>
- <select id="selectCustomerAuditList" resultType="com.goafanti.app.bo.ExpertsListBo">
- select u.id as uid, u.nickname as username, u.head_portrait_url as personPortraitUrl,
- u.introduction, ui.industry, ui.work_unit as workUnit, ui.professional_title as professionalTitle,
- ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
- ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
- ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
- from
- `user` u left join user_identity ui on ui.uid = u.id
- left join( select
- b.seller_id as uid, sum( case when a.star > 3 then 1 else 0 end ) as a,
- sum( case when a.star = 3 then 1 else 0 end ) as b,
- sum( case when a.star < 3 then 1 else 0 end ) as c, count(*) as d
- from jt_commodity_comment a left join jt_consult_order b on
- a.order_no = b.order_no group by b.seller_id
- ) x on u.id = x.uid
- left join( select count(*) as count, to_uid from user_interest group by to_uid) a
- on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} GROUP by to_uid) b
- on u.id = b.to_uid
- where u.status = 0 and u.source = 0
- and ui.expert = 1 and ui.audit_status = 2
- <if test="industry != null">
- and ui.industry= #{industry,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- <if test="sortType == 0">
- order by u.create_time desc
- </if>
- <if test="sortType == 1">
- order by favorableRate desc
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectCustomerAuditCount" resultType="java.lang.Integer">
- select count(0)from
- `user` u left join user_identity ui on ui.uid = u.id
- where u.status = 0 and u.source = 0 and ui.expert = 1 and ui.audit_status = 2
- <if test="industry != null">
- and ui.industry= #{industry,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- </select>
- <select id="selectAppExpertsDetail" resultType="com.goafanti.app.bo.ExpertsListBo">
- select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitUrl,b.consultant_type as consultantType,
- b.industry,b.work_unit as workUnit,b.professional_title as professionalTitle,a.introduction,
- ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
- ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
- if(isnull(d.to_uid),0,1) as interested
- from `user` a left join user_identity b on a.id=b.uid left join (select b.commodity_id as uid,
- sum(case when a.star > 3 then 1 else 0 end) as a,
- sum(case when a.star=3 then 1 else 0 end) as b,
- sum(case when a.star < 3 then 1 else 0 end) as c,count(*) as d
- from jt_commodity_comment a
- left join jt_consult_order b on a.order_no=b.order_no
- group by a.commodity_id)x on a.id=x.uid
- left join (select count(*) as count,to_uid from user_interest group by to_uid)c on a.id=c.to_uid
- left join (select to_uid from user_interest where from_uid= #{uid,jdbcType=VARCHAR} group by to_uid)d on a.id=d.to_uid
- where a.id=#{id,jdbcType=VARCHAR}
- </select>
- <select id="appConsultantList" resultType="com.goafanti.app.bo.ExpertsListBo">
- select u.id as uid, u.nickname as username, u.head_portrait_url as personPortraitUrl,ui.consultant_type as consultantType,
- u.introduction, ui.industry, ui.work_unit as workUnit, ui.professional_title as professionalTitle,
- ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
- ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
- ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
- from
- `user` u left join user_identity ui on ui.uid = u.id
- left join(select b.commodity_id as uid,
- sum(case when a.star > 3 then 1 else 0 end) as a,
- sum(case when a.star=3 then 1 else 0 end) as b,
- sum(case when a.star < 3 then 1 else 0 end) as c,count(*) as d
- from jt_commodity_comment a
- left join jt_consult_order b on a.order_no=b.order_no
- group by a.commodity_id)x on u.id=x.uid
- left join( select count(*) as count, to_uid from user_interest group by to_uid) a
- on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} ) b
- on u.id = b.to_uid
- where u.status = 0 and u.source = 0
- and ui.expert = 2 and ui.audit_status=2
- <if test="consultantType != null">
- and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- and ui.province= #{province,jdbcType=INTEGER}
- </if>
- <if test="city != null">
- and ui.city=#{city,jdbcType=INTEGER}
- </if>
- <if test="area != null">
- and ui.area=#{area,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- <if test="sortType == 0">
- order by u.create_time desc
- </if>
- <if test="sortType == 1">
- order by favorableRate desc
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="appConsultantCount" resultType="java.lang.Integer">
- select count(*)
- from
- `user` u left join user_identity ui on ui.uid = u.id
- where u.status = 0 and u.source = 0
- and ui.expert = 2 and ui.audit_status=2
- <if test="consultantType != null">
- and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- and ui.province= #{consultantType,jdbcType=INTEGER}
- </if>
- <if test="city != null">
- and ui.city=#{consultantType,jdbcType=INTEGER}
- </if>
- <if test="area != null">
- and ui.area=#{consultantType,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
- </if>
- </select>
- <!-- 获得专家顾问审核列表数据 -->
- <select id="getExpertAuditList" resultMap="BaseResultMap">
- select
- i.id, i.uid, i.username, id_number, positive_id_url, i.audit_status, expert, i.audit_status, fixed_tel, industry,
- u.mobile as contact_mobile, c.name as contacts, identify_name
- from user_identity i
- inner join user u on i.uid = u.id
- left join industry_category c on c.id = i.industry
- where u.source = 0
- <if test="auditStatus != null ">
- and i.audit_status = #{auditStatus,jdbcType=VARCHAR}
- </if>
- <if test="industry != null ">
- and industry = #{industry,jdbcType=INTEGER}
- </if>
- <if test="expert != null ">
- and expert = #{expert,jdbcType=INTEGER}
- </if>
- <if test="expert == null ">
- and expert > 0
- </if>
- <if test='username != null and username != ""'>
- <bind name="un" value="'%' + username + '%'"/>
- and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="getExpertAuditListCount" resultType="java.lang.Integer">
- select
- count(0)
- from user_identity i
- inner join user u on i.uid = u.id
- where u.source = 0
- <if test="auditStatus != null ">
- and i.audit_status = #{auditStatus,jdbcType=VARCHAR}
- </if>
- <if test="industry != null ">
- and industry = #{industry,jdbcType=INTEGER}
- </if>
- <if test="expert != null ">
- and expert = #{expert,jdbcType=INTEGER}
- </if>
- <if test="expert == null ">
- and expert > 0
- </if>
- <if test="username != null">
- <bind name="un" value="'%' + username + '%'"/>
- and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
- </if>
- </select>
- <!-- 获得用户认证信息数据 -->
- <select id="getUserIdentityByUid" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- u.identify_name as identify_name, i.industry as industry,
- u.society_tag as society_tag,
- i.sex, i.date_of_birth_year, i.date_of_birth_month,
- i.id_number, i.province, i.city, i.area, i.postal_address, i.fixed_tel, i.email, i.qq,
- u.mobile as contact_mobile,
- u.introduction, u.audit_opinion,
- i.expert, i.audit_status, i.positive_id_url, i.opposite_id_url, u.head_portrait_url,
- i.education, i.major_category, i.consultant_type, i.graduate_school, i.work_unit,
- i.qualification, i.professional_title, i.process, i.id, i.uid, i.audit_info
- from `user` u
- inner join user_identity i on u.id = i.uid
- where u.id = #{uid,jdbcType=VARCHAR}
- </select>
- <select id="expertsCommentByUid" resultType="com.goafanti.comment.bo.CommentDetailResult">
- select a.create_time as createTime,
- date_format(a.create_time,'%Y-%m-%d') as createTimeFormat,
- a.commodity_id,
- a.content,a.star,u.identify_name as commenter
- from jt_commodity_comment a
- left join user u on a.uid=u.id
- <!-- left join jt_consult_order b on a.order_no=b.order_no -->
- where 1=1
- and a.commodity_id= #{id,jdbcType=VARCHAR}
- order by a.star desc,a.create_time desc
- limit 1
- </select>
- <!-- 更改用户认证(专家/顾问审核状态) -->
- <update id="updateAuditing" parameterType="com.goafanti.common.model.UserIdentity">
- update user_identity
- set audit_status = #{auditStatus,jdbcType=VARCHAR}
- <if test="auditInfo != null">
- , audit_info = #{auditInfo,jdbcType=VARCHAR}
- </if>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="selectByIdentityId" resultType="com.goafanti.app.bo.ExpertsListBo">
- select a.id,a.uid as uid,b.nickname as username,b.society_tag as keyword,a.expert from user_identity a
- left join user b on a.uid=b.id
- where a.id=#{id,jdbcType=VARCHAR}
- </select>
- </mapper>
|