| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274 |
- <?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" />
- </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
- </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="expertAudit != null">
- audit_status = #{expertAudit,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 expertAudit,
- b.expert as expert,
- b.work_unit as workUnit
- 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="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>
- </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,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.id ,t.uid,u.identify_name as name,t.work_unit as workUnit,u.introduction,
- t.professional_title as professionalTitle,u.head_portrait_url as imgUrl,
- if(isnull(a.count),0,a.count) as interestCount
- from user_identity t left JOIN `user` u on t.uid = u.id
- left join user_interest ui on ui.to_uid=u.id
- left join (select to_uid,count(*) as count from user_interest
- order by to_uid) a on ui.to_uid=u.id
- where t.expert=1 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(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 t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
- </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 as expert_audit, fixed_tel, industry,
- u.mobile as contact_mobile, c.name as contacts
- from user_identity i
- inner join user u on i.uid = u.id
- inner join industry_category c on c.id = i.industry
- where 1 = 1
- <if test="expertAudit != null ">
- and i.audit_status = #{expertAudit,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>
- <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 1 = 1
- <if test="expertAudit != null ">
- and i.audit_status = #{expertAudit,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 *
- from `user` u
- inner join user_identity i on u.id = i.uid
- where u.id = #{uid,jdbcType=VARCHAR}
- </select>
- </mapper>
|