UserIdentityMapper.xml 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.UserIdentityMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserIdentity">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="uid" jdbcType="VARCHAR" property="uid" />
  12. <result column="username" jdbcType="VARCHAR" property="username" />
  13. <result column="sex" jdbcType="VARCHAR" property="sex" />
  14. <result column="date_of_birth_year" jdbcType="VARCHAR" property="dateOfBirthYear" />
  15. <result column="date_of_birth_month" jdbcType="VARCHAR" property="dateOfBirthMonth" />
  16. <result column="id_number" jdbcType="VARCHAR" property="idNumber" />
  17. <result column="positive_id_url" jdbcType="VARCHAR" property="positiveIdUrl" />
  18. <result column="opposite_id_url" jdbcType="VARCHAR" property="oppositeIdUrl" />
  19. <result column="province" jdbcType="INTEGER" property="province" />
  20. <result column="city" jdbcType="INTEGER" property="city" />
  21. <result column="area" jdbcType="INTEGER" property="area" />
  22. <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
  23. <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
  24. <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
  25. <result column="bank_card_number" jdbcType="VARCHAR" property="bankCardNumber" />
  26. <result column="amount_money" jdbcType="DECIMAL" property="amountMoney" />
  27. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  28. <result column="process" jdbcType="INTEGER" property="process" />
  29. <result column="wrong_count" jdbcType="INTEGER" property="wrongCount" />
  30. <result column="payment_date" jdbcType="TIMESTAMP" property="paymentDate" />
  31. <result column="expert" jdbcType="INTEGER" property="expert" />
  32. <result column="international" jdbcType="INTEGER" property="international" />
  33. <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
  34. <result column="qq" jdbcType="VARCHAR" property="qq" />
  35. <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
  36. <result column="postcode" jdbcType="VARCHAR" property="postcode" />
  37. <result column="review_instructions" jdbcType="VARCHAR" property="reviewInstructions" />
  38. <result column="industry" jdbcType="INTEGER" property="industry" />
  39. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  40. <result column="email" jdbcType="VARCHAR" property="email" />
  41. <result column="professional_title" jdbcType="VARCHAR" property="professionalTitle" />
  42. <result column="work_unit" jdbcType="VARCHAR" property="workUnit" />
  43. <result column="education" jdbcType="VARCHAR" property="education" />
  44. <result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
  45. <result column="qualification" jdbcType="VARCHAR" property="qualification" />
  46. <result column="graduate_school" jdbcType="VARCHAR" property="graduateSchool" />
  47. <result column="consultant" jdbcType="INTEGER" property="consultant" />
  48. <result column="consultation_price" jdbcType="DECIMAL" property="consultationPrice" />
  49. <result column="expert_audit" jdbcType="INTEGER" property="expertAudit" />
  50. </resultMap>
  51. <sql id="Example_Where_Clause">
  52. <!--
  53. WARNING - @mbg.generated
  54. This element is automatically generated by MyBatis Generator, do not modify.
  55. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  56. -->
  57. <where>
  58. <foreach collection="oredCriteria" item="criteria" separator="or">
  59. <if test="criteria.valid">
  60. <trim prefix="(" prefixOverrides="and" suffix=")">
  61. <foreach collection="criteria.criteria" item="criterion">
  62. <choose>
  63. <when test="criterion.noValue">
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue">
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue">
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue">
  73. and ${criterion.condition}
  74. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Update_By_Example_Where_Clause">
  86. <!--
  87. WARNING - @mbg.generated
  88. This element is automatically generated by MyBatis Generator, do not modify.
  89. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  90. -->
  91. <where>
  92. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  93. <if test="criteria.valid">
  94. <trim prefix="(" prefixOverrides="and" suffix=")">
  95. <foreach collection="criteria.criteria" item="criterion">
  96. <choose>
  97. <when test="criterion.noValue">
  98. and ${criterion.condition}
  99. </when>
  100. <when test="criterion.singleValue">
  101. and ${criterion.condition} #{criterion.value}
  102. </when>
  103. <when test="criterion.betweenValue">
  104. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  105. </when>
  106. <when test="criterion.listValue">
  107. and ${criterion.condition}
  108. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  109. #{listItem}
  110. </foreach>
  111. </when>
  112. </choose>
  113. </foreach>
  114. </trim>
  115. </if>
  116. </foreach>
  117. </where>
  118. </sql>
  119. <sql id="Base_Column_List">
  120. <!--
  121. WARNING - @mbg.generated
  122. This element is automatically generated by MyBatis Generator, do not modify.
  123. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  124. -->
  125. id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
  126. opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number,
  127. amount_money, audit_status, process, wrong_count, payment_date, expert,
  128. international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
  129. contacts, email, professional_title, work_unit, education, major_category, qualification,
  130. graduate_school, consultation_price
  131. </sql>
  132. <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
  133. <!--
  134. WARNING - @mbg.generated
  135. This element is automatically generated by MyBatis Generator, do not modify.
  136. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  137. -->
  138. select
  139. <if test="distinct">
  140. distinct
  141. </if>
  142. <include refid="Base_Column_List" />
  143. from user_identity
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. <if test="orderByClause != null">
  148. order by ${orderByClause}
  149. </if>
  150. </select>
  151. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  152. <!--
  153. WARNING - @mbg.generated
  154. This element is automatically generated by MyBatis Generator, do not modify.
  155. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  156. -->
  157. select
  158. <include refid="Base_Column_List" />
  159. from user_identity
  160. where id = #{id,jdbcType=VARCHAR}
  161. </select>
  162. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  163. <!--
  164. WARNING - @mbg.generated
  165. This element is automatically generated by MyBatis Generator, do not modify.
  166. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  167. -->
  168. delete from user_identity
  169. where id = #{id,jdbcType=VARCHAR}
  170. </delete>
  171. <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserIdentityExample">
  172. <!--
  173. WARNING - @mbg.generated
  174. This element is automatically generated by MyBatis Generator, do not modify.
  175. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  176. -->
  177. delete from user_identity
  178. <if test="_parameter != null">
  179. <include refid="Example_Where_Clause" />
  180. </if>
  181. </delete>
  182. <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity">
  183. <!--
  184. WARNING - @mbg.generated
  185. This element is automatically generated by MyBatis Generator, do not modify.
  186. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  187. -->
  188. insert into user_identity (id, uid, username,
  189. sex, date_of_birth_year, date_of_birth_month,
  190. id_number, positive_id_url, opposite_id_url,
  191. province, city, area,
  192. contact_mobile, bank_name, bank_account,
  193. bank_card_number, amount_money, audit_status,
  194. process, wrong_count, payment_date,
  195. expert, international,
  196. fixed_tel, qq, postal_address,
  197. postcode, review_instructions, industry,
  198. contacts, email, professional_title,
  199. work_unit, education, major_category,
  200. qualification, graduate_school,
  201. consultation_price)
  202. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  203. #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
  204. #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
  205. #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
  206. #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
  207. #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER},
  208. #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
  209. #{expert,jdbcType=INTEGER}, #{international,jdbcType=INTEGER},
  210. #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
  211. #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
  212. #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR},
  213. #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR},
  214. #{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR},
  215. #{consultationPrice,jdbcType=DECIMAL})
  216. </insert>
  217. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
  218. <!--
  219. WARNING - @mbg.generated
  220. This element is automatically generated by MyBatis Generator, do not modify.
  221. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  222. -->
  223. insert into user_identity
  224. <trim prefix="(" suffix=")" suffixOverrides=",">
  225. <if test="id != null">
  226. id,
  227. </if>
  228. <if test="uid != null">
  229. uid,
  230. </if>
  231. <if test="username != null">
  232. username,
  233. </if>
  234. <if test="sex != null">
  235. sex,
  236. </if>
  237. <if test="dateOfBirthYear != null">
  238. date_of_birth_year,
  239. </if>
  240. <if test="dateOfBirthMonth != null">
  241. date_of_birth_month,
  242. </if>
  243. <if test="idNumber != null">
  244. id_number,
  245. </if>
  246. <if test="positiveIdUrl != null">
  247. positive_id_url,
  248. </if>
  249. <if test="oppositeIdUrl != null">
  250. opposite_id_url,
  251. </if>
  252. <if test="province != null">
  253. province,
  254. </if>
  255. <if test="city != null">
  256. city,
  257. </if>
  258. <if test="area != null">
  259. area,
  260. </if>
  261. <if test="contactMobile != null">
  262. contact_mobile,
  263. </if>
  264. <if test="bankName != null">
  265. bank_name,
  266. </if>
  267. <if test="bankAccount != null">
  268. bank_account,
  269. </if>
  270. <if test="bankCardNumber != null">
  271. bank_card_number,
  272. </if>
  273. <if test="amountMoney != null">
  274. amount_money,
  275. </if>
  276. <if test="auditStatus != null">
  277. audit_status,
  278. </if>
  279. <if test="process != null">
  280. process,
  281. </if>
  282. <if test="wrongCount != null">
  283. wrong_count,
  284. </if>
  285. <if test="paymentDate != null">
  286. payment_date,
  287. </if>
  288. <if test="expert != null">
  289. expert,
  290. </if>
  291. <if test="international != null">
  292. international,
  293. </if>
  294. <if test="fixedTel != null">
  295. fixed_tel,
  296. </if>
  297. <if test="qq != null">
  298. qq,
  299. </if>
  300. <if test="postalAddress != null">
  301. postal_address,
  302. </if>
  303. <if test="postcode != null">
  304. postcode,
  305. </if>
  306. <if test="reviewInstructions != null">
  307. review_instructions,
  308. </if>
  309. <if test="industry != null">
  310. industry,
  311. </if>
  312. <if test="contacts != null">
  313. contacts,
  314. </if>
  315. <if test="email != null">
  316. email,
  317. </if>
  318. <if test="professionalTitle != null">
  319. professional_title,
  320. </if>
  321. <if test="workUnit != null">
  322. work_unit,
  323. </if>
  324. <if test="education != null">
  325. education,
  326. </if>
  327. <if test="majorCategory != null">
  328. major_category,
  329. </if>
  330. <if test="qualification != null">
  331. qualification,
  332. </if>
  333. <if test="graduateSchool != null">
  334. graduate_school,
  335. </if>
  336. <if test="consultationPrice != null">
  337. consultation_price,
  338. </if>
  339. </trim>
  340. <trim prefix="values (" suffix=")" suffixOverrides=",">
  341. <if test="id != null">
  342. #{id,jdbcType=VARCHAR},
  343. </if>
  344. <if test="uid != null">
  345. #{uid,jdbcType=VARCHAR},
  346. </if>
  347. <if test="username != null">
  348. #{username,jdbcType=VARCHAR},
  349. </if>
  350. <if test="sex != null">
  351. #{sex,jdbcType=VARCHAR},
  352. </if>
  353. <if test="dateOfBirthYear != null">
  354. #{dateOfBirthYear,jdbcType=VARCHAR},
  355. </if>
  356. <if test="dateOfBirthMonth != null">
  357. #{dateOfBirthMonth,jdbcType=VARCHAR},
  358. </if>
  359. <if test="idNumber != null">
  360. #{idNumber,jdbcType=VARCHAR},
  361. </if>
  362. <if test="positiveIdUrl != null">
  363. #{positiveIdUrl,jdbcType=VARCHAR},
  364. </if>
  365. <if test="oppositeIdUrl != null">
  366. #{oppositeIdUrl,jdbcType=VARCHAR},
  367. </if>
  368. <if test="province != null">
  369. #{province,jdbcType=INTEGER},
  370. </if>
  371. <if test="city != null">
  372. #{city,jdbcType=INTEGER},
  373. </if>
  374. <if test="area != null">
  375. #{area,jdbcType=INTEGER},
  376. </if>
  377. <if test="contactMobile != null">
  378. #{contactMobile,jdbcType=VARCHAR},
  379. </if>
  380. <if test="bankName != null">
  381. #{bankName,jdbcType=VARCHAR},
  382. </if>
  383. <if test="bankAccount != null">
  384. #{bankAccount,jdbcType=VARCHAR},
  385. </if>
  386. <if test="bankCardNumber != null">
  387. #{bankCardNumber,jdbcType=VARCHAR},
  388. </if>
  389. <if test="amountMoney != null">
  390. #{amountMoney,jdbcType=DECIMAL},
  391. </if>
  392. <if test="auditStatus != null">
  393. #{auditStatus,jdbcType=INTEGER},
  394. </if>
  395. <if test="process != null">
  396. #{process,jdbcType=INTEGER},
  397. </if>
  398. <if test="wrongCount != null">
  399. #{wrongCount,jdbcType=INTEGER},
  400. </if>
  401. <if test="paymentDate != null">
  402. #{paymentDate,jdbcType=TIMESTAMP},
  403. </if>
  404. <if test="expert != null">
  405. #{expert,jdbcType=INTEGER},
  406. </if>
  407. <if test="international != null">
  408. #{international,jdbcType=INTEGER},
  409. </if>
  410. <if test="fixedTel != null">
  411. #{fixedTel,jdbcType=VARCHAR},
  412. </if>
  413. <if test="qq != null">
  414. #{qq,jdbcType=VARCHAR},
  415. </if>
  416. <if test="postalAddress != null">
  417. #{postalAddress,jdbcType=VARCHAR},
  418. </if>
  419. <if test="postcode != null">
  420. #{postcode,jdbcType=VARCHAR},
  421. </if>
  422. <if test="reviewInstructions != null">
  423. #{reviewInstructions,jdbcType=VARCHAR},
  424. </if>
  425. <if test="industry != null">
  426. #{industry,jdbcType=INTEGER},
  427. </if>
  428. <if test="contacts != null">
  429. #{contacts,jdbcType=VARCHAR},
  430. </if>
  431. <if test="email != null">
  432. #{email,jdbcType=VARCHAR},
  433. </if>
  434. <if test="professionalTitle != null">
  435. #{professionalTitle,jdbcType=VARCHAR},
  436. </if>
  437. <if test="workUnit != null">
  438. #{workUnit,jdbcType=VARCHAR},
  439. </if>
  440. <if test="education != null">
  441. #{education,jdbcType=VARCHAR},
  442. </if>
  443. <if test="majorCategory != null">
  444. #{majorCategory,jdbcType=VARCHAR},
  445. </if>
  446. <if test="qualification != null">
  447. #{qualification,jdbcType=VARCHAR},
  448. </if>
  449. <if test="graduateSchool != null">
  450. #{graduateSchool,jdbcType=VARCHAR},
  451. </if>
  452. <if test="consultationPrice != null">
  453. #{consultationPrice,jdbcType=DECIMAL},
  454. </if>
  455. </trim>
  456. </insert>
  457. <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
  458. <!--
  459. WARNING - @mbg.generated
  460. This element is automatically generated by MyBatis Generator, do not modify.
  461. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  462. -->
  463. select count(*) from user_identity
  464. <if test="_parameter != null">
  465. <include refid="Example_Where_Clause" />
  466. </if>
  467. </select>
  468. <update id="updateByExampleSelective" parameterType="map">
  469. <!--
  470. WARNING - @mbg.generated
  471. This element is automatically generated by MyBatis Generator, do not modify.
  472. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  473. -->
  474. update user_identity
  475. <set>
  476. <if test="record.id != null">
  477. id = #{record.id,jdbcType=VARCHAR},
  478. </if>
  479. <if test="record.uid != null">
  480. uid = #{record.uid,jdbcType=VARCHAR},
  481. </if>
  482. <if test="record.username != null">
  483. username = #{record.username,jdbcType=VARCHAR},
  484. </if>
  485. <if test="record.sex != null">
  486. sex = #{record.sex,jdbcType=VARCHAR},
  487. </if>
  488. <if test="record.dateOfBirthYear != null">
  489. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  490. </if>
  491. <if test="record.dateOfBirthMonth != null">
  492. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  493. </if>
  494. <if test="record.idNumber != null">
  495. id_number = #{record.idNumber,jdbcType=VARCHAR},
  496. </if>
  497. <if test="record.positiveIdUrl != null">
  498. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.oppositeIdUrl != null">
  501. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.province != null">
  504. province = #{record.province,jdbcType=INTEGER},
  505. </if>
  506. <if test="record.city != null">
  507. city = #{record.city,jdbcType=INTEGER},
  508. </if>
  509. <if test="record.area != null">
  510. area = #{record.area,jdbcType=INTEGER},
  511. </if>
  512. <if test="record.contactMobile != null">
  513. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  514. </if>
  515. <if test="record.bankName != null">
  516. bank_name = #{record.bankName,jdbcType=VARCHAR},
  517. </if>
  518. <if test="record.bankAccount != null">
  519. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  520. </if>
  521. <if test="record.bankCardNumber != null">
  522. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  523. </if>
  524. <if test="record.amountMoney != null">
  525. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  526. </if>
  527. <if test="record.auditStatus != null">
  528. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  529. </if>
  530. <if test="record.process != null">
  531. process = #{record.process,jdbcType=INTEGER},
  532. </if>
  533. <if test="record.wrongCount != null">
  534. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  535. </if>
  536. <if test="record.paymentDate != null">
  537. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  538. </if>
  539. <if test="record.expert != null">
  540. expert = #{record.expert,jdbcType=INTEGER},
  541. </if>
  542. <if test="record.international != null">
  543. international = #{record.international,jdbcType=INTEGER},
  544. </if>
  545. <if test="record.fixedTel != null">
  546. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  547. </if>
  548. <if test="record.qq != null">
  549. qq = #{record.qq,jdbcType=VARCHAR},
  550. </if>
  551. <if test="record.postalAddress != null">
  552. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  553. </if>
  554. <if test="record.postcode != null">
  555. postcode = #{record.postcode,jdbcType=VARCHAR},
  556. </if>
  557. <if test="record.reviewInstructions != null">
  558. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  559. </if>
  560. <if test="record.industry != null">
  561. industry = #{record.industry,jdbcType=INTEGER},
  562. </if>
  563. <if test="record.contacts != null">
  564. contacts = #{record.contacts,jdbcType=VARCHAR},
  565. </if>
  566. <if test="record.email != null">
  567. email = #{record.email,jdbcType=VARCHAR},
  568. </if>
  569. <if test="record.professionalTitle != null">
  570. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  571. </if>
  572. <if test="record.workUnit != null">
  573. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  574. </if>
  575. <if test="record.education != null">
  576. education = #{record.education,jdbcType=VARCHAR},
  577. </if>
  578. <if test="record.majorCategory != null">
  579. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  580. </if>
  581. <if test="record.qualification != null">
  582. qualification = #{record.qualification,jdbcType=VARCHAR},
  583. </if>
  584. <if test="record.graduateSchool != null">
  585. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
  586. </if>
  587. <if test="record.consultationPrice != null">
  588. consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
  589. </if>
  590. </set>
  591. <if test="_parameter != null">
  592. <include refid="Update_By_Example_Where_Clause" />
  593. </if>
  594. </update>
  595. <update id="updateByExample" parameterType="map">
  596. <!--
  597. WARNING - @mbg.generated
  598. This element is automatically generated by MyBatis Generator, do not modify.
  599. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  600. -->
  601. update user_identity
  602. set id = #{record.id,jdbcType=VARCHAR},
  603. uid = #{record.uid,jdbcType=VARCHAR},
  604. username = #{record.username,jdbcType=VARCHAR},
  605. sex = #{record.sex,jdbcType=VARCHAR},
  606. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  607. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  608. id_number = #{record.idNumber,jdbcType=VARCHAR},
  609. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  610. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  611. province = #{record.province,jdbcType=INTEGER},
  612. city = #{record.city,jdbcType=INTEGER},
  613. area = #{record.area,jdbcType=INTEGER},
  614. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  615. bank_name = #{record.bankName,jdbcType=VARCHAR},
  616. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  617. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  618. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  619. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  620. process = #{record.process,jdbcType=INTEGER},
  621. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  622. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  623. expert = #{record.expert,jdbcType=INTEGER},
  624. international = #{record.international,jdbcType=INTEGER},
  625. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  626. qq = #{record.qq,jdbcType=VARCHAR},
  627. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  628. postcode = #{record.postcode,jdbcType=VARCHAR},
  629. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  630. industry = #{record.industry,jdbcType=INTEGER},
  631. contacts = #{record.contacts,jdbcType=VARCHAR},
  632. email = #{record.email,jdbcType=VARCHAR},
  633. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  634. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  635. education = #{record.education,jdbcType=VARCHAR},
  636. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  637. qualification = #{record.qualification,jdbcType=VARCHAR},
  638. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
  639. consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
  640. <if test="_parameter != null">
  641. <include refid="Update_By_Example_Where_Clause" />
  642. </if>
  643. </update>
  644. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
  645. <!--
  646. WARNING - @mbg.generated
  647. This element is automatically generated by MyBatis Generator, do not modify.
  648. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  649. -->
  650. update user_identity
  651. <set>
  652. <if test="uid != null">
  653. uid = #{uid,jdbcType=VARCHAR},
  654. </if>
  655. <if test="username != null">
  656. username = #{username,jdbcType=VARCHAR},
  657. </if>
  658. <if test="sex != null">
  659. sex = #{sex,jdbcType=VARCHAR},
  660. </if>
  661. <if test="dateOfBirthYear != null">
  662. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  663. </if>
  664. <if test="dateOfBirthMonth != null">
  665. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  666. </if>
  667. <if test="idNumber != null">
  668. id_number = #{idNumber,jdbcType=VARCHAR},
  669. </if>
  670. <if test="positiveIdUrl != null">
  671. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  672. </if>
  673. <if test="oppositeIdUrl != null">
  674. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  675. </if>
  676. <if test="province != null">
  677. province = #{province,jdbcType=INTEGER},
  678. </if>
  679. <if test="city != null">
  680. city = #{city,jdbcType=INTEGER},
  681. </if>
  682. <if test="area != null">
  683. area = #{area,jdbcType=INTEGER},
  684. </if>
  685. <if test="contactMobile != null">
  686. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  687. </if>
  688. <if test="bankName != null">
  689. bank_name = #{bankName,jdbcType=VARCHAR},
  690. </if>
  691. <if test="bankAccount != null">
  692. bank_account = #{bankAccount,jdbcType=VARCHAR},
  693. </if>
  694. <if test="bankCardNumber != null">
  695. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  696. </if>
  697. <if test="amountMoney != null">
  698. amount_money = #{amountMoney,jdbcType=DECIMAL},
  699. </if>
  700. <if test="auditStatus != null">
  701. audit_status = #{auditStatus,jdbcType=INTEGER},
  702. </if>
  703. <if test="process != null">
  704. process = #{process,jdbcType=INTEGER},
  705. </if>
  706. <if test="wrongCount != null">
  707. wrong_count = #{wrongCount,jdbcType=INTEGER},
  708. </if>
  709. <if test="paymentDate != null">
  710. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  711. </if>
  712. <if test="expert != null">
  713. expert = #{expert,jdbcType=INTEGER},
  714. </if>
  715. <if test="international != null">
  716. international = #{international,jdbcType=INTEGER},
  717. </if>
  718. <if test="fixedTel != null">
  719. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  720. </if>
  721. <if test="qq != null">
  722. qq = #{qq,jdbcType=VARCHAR},
  723. </if>
  724. <if test="postalAddress != null">
  725. postal_address = #{postalAddress,jdbcType=VARCHAR},
  726. </if>
  727. <if test="postcode != null">
  728. postcode = #{postcode,jdbcType=VARCHAR},
  729. </if>
  730. <if test="reviewInstructions != null">
  731. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  732. </if>
  733. <if test="industry != null">
  734. industry = #{industry,jdbcType=INTEGER},
  735. </if>
  736. <if test="contacts != null">
  737. contacts = #{contacts,jdbcType=VARCHAR},
  738. </if>
  739. <if test="email != null">
  740. email = #{email,jdbcType=VARCHAR},
  741. </if>
  742. <if test="professionalTitle != null">
  743. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  744. </if>
  745. <if test="workUnit != null">
  746. work_unit = #{workUnit,jdbcType=VARCHAR},
  747. </if>
  748. <if test="education != null">
  749. education = #{education,jdbcType=VARCHAR},
  750. </if>
  751. <if test="majorCategory != null">
  752. major_category = #{majorCategory,jdbcType=VARCHAR},
  753. </if>
  754. <if test="qualification != null">
  755. qualification = #{qualification,jdbcType=VARCHAR},
  756. </if>
  757. <if test="graduateSchool != null">
  758. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  759. </if>
  760. <if test="consultationPrice != null">
  761. consultation_price = #{consultationPrice,jdbcType=DECIMAL},
  762. </if>
  763. <if test="expertAudit != null">
  764. audit_status = #{expertAudit,jdbcType=DECIMAL},
  765. </if>
  766. <if test="releaseStatus != null">
  767. release_status = #{releaseStatus,jdbcType=DECIMAL},
  768. </if>
  769. </set>
  770. where id = #{id,jdbcType=VARCHAR}
  771. </update>
  772. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
  773. <!--
  774. WARNING - @mbg.generated
  775. This element is automatically generated by MyBatis Generator, do not modify.
  776. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  777. -->
  778. update user_identity
  779. set uid = #{uid,jdbcType=VARCHAR},
  780. username = #{username,jdbcType=VARCHAR},
  781. sex = #{sex,jdbcType=VARCHAR},
  782. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  783. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  784. id_number = #{idNumber,jdbcType=VARCHAR},
  785. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  786. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  787. province = #{province,jdbcType=INTEGER},
  788. city = #{city,jdbcType=INTEGER},
  789. area = #{area,jdbcType=INTEGER},
  790. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  791. bank_name = #{bankName,jdbcType=VARCHAR},
  792. bank_account = #{bankAccount,jdbcType=VARCHAR},
  793. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  794. amount_money = #{amountMoney,jdbcType=DECIMAL},
  795. audit_status = #{auditStatus,jdbcType=INTEGER},
  796. process = #{process,jdbcType=INTEGER},
  797. wrong_count = #{wrongCount,jdbcType=INTEGER},
  798. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  799. expert = #{expert,jdbcType=INTEGER},
  800. international = #{international,jdbcType=INTEGER},
  801. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  802. qq = #{qq,jdbcType=VARCHAR},
  803. postal_address = #{postalAddress,jdbcType=VARCHAR},
  804. postcode = #{postcode,jdbcType=VARCHAR},
  805. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  806. industry = #{industry,jdbcType=INTEGER},
  807. contacts = #{contacts,jdbcType=VARCHAR},
  808. email = #{email,jdbcType=VARCHAR},
  809. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  810. work_unit = #{workUnit,jdbcType=VARCHAR},
  811. education = #{education,jdbcType=VARCHAR},
  812. major_category = #{majorCategory,jdbcType=VARCHAR},
  813. qualification = #{qualification,jdbcType=VARCHAR},
  814. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  815. consultation_price = #{consultationPrice,jdbcType=DECIMAL}
  816. where id = #{id,jdbcType=VARCHAR}
  817. </update>
  818. <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  819. select
  820. <include refid="Base_Column_List" />
  821. from user_identity
  822. where uid = #{uid,jdbcType=VARCHAR}
  823. </select>
  824. <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
  825. select
  826. a.id as uid,
  827. a.identify_name as identifyName,
  828. a.mobile,
  829. a.email,
  830. a.introduction,
  831. a.head_portrait_url as headPortraitUrl,
  832. a.society_tag as societyTag,
  833. a.type,
  834. a.authentication,
  835. b.id,
  836. b.industry,
  837. b.sex,
  838. b.date_of_birth_year as dateOfBirthYear,
  839. b.date_of_birth_month as dateOfBirthMonth,
  840. b.id_number as idNumber,
  841. b.positive_id_url as positiveIdUrl,
  842. b.opposite_id_url as oppositeIdUrl,
  843. b.province,
  844. b.city,
  845. b.area,
  846. b.postal_address as postalAddress,
  847. b.fixed_tel as fixedTel,
  848. b.qq,
  849. b.graduate_school as graduateSchool,
  850. b.major_category as majorCategory,
  851. b.qualification,
  852. b.professional_title as professionalTitle,
  853. b.audit_status as expertAudit,
  854. b.expert as expert,
  855. b.work_unit as workUnit
  856. from
  857. user a left join user_identity b on
  858. a.id = b.uid
  859. where
  860. a.id = #{uid,jdbcType=VARCHAR}
  861. </select>
  862. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  863. select
  864. u.aid,
  865. u.mid,
  866. u.lvl,
  867. ui.id,
  868. ui.uid,
  869. ui.username,
  870. ui.sex,
  871. ui.date_of_birth_year as dateOfBirthYear,
  872. ui.date_of_birth_month as dateOfBirthMonth,
  873. ui.id_number as idNumber,
  874. ui.positive_id_url as positiveIdUrl,
  875. ui.opposite_id_url as oppositeIdUrl,
  876. ui.province,
  877. ui.city,
  878. ui.area,
  879. ui.contact_mobile as contactMobile,
  880. ui.bank_name as bankName,
  881. ui.bank_account as bankAccount,
  882. ui.bank_card_number as bankCardNumber,
  883. ui.amount_money as amountMoney,
  884. ui.audit_status as auditStatus,
  885. ui.payment_date as paymentDate,
  886. ui.expert
  887. from user u
  888. LEFT JOIN user_identity ui on u.id = ui.uid
  889. where u.id = #{uid,jdbcType=VARCHAR}
  890. </select>
  891. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  892. select u.id as uid, i.username
  893. from user u INNER JOIN
  894. user_identity i on u.id = i.uid
  895. where u.lvl = 1
  896. <if test="_parameter != null">
  897. and u.mid = #{aid,jdbcType=VARCHAR}
  898. </if>
  899. </select>
  900. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  901. select u.id as uid, i.username
  902. from user u INNER JOIN
  903. user_identity i on u.id = i.uid
  904. where u.lvl = 1
  905. <if test="_parameter != null">
  906. and u.aid = #{aid,jdbcType=VARCHAR}
  907. </if>
  908. </select>
  909. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  910. select u.id as uid, ui.username, u.mobile
  911. from user u INNER JOIN
  912. user_identity ui on u.id = ui.uid
  913. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  914. <if test="aid != null">
  915. and u.mid = #{aid,jdbcType=VARCHAR}
  916. </if>
  917. </select>
  918. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  919. select u.id as uid, ui.username, u.mobile
  920. from user u INNER JOIN
  921. user_identity ui on u.id = ui.uid
  922. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  923. <if test="aid != null">
  924. and u.aid = #{aid,jdbcType=VARCHAR}
  925. </if>
  926. </select>
  927. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  928. SELECT
  929. u.id as uid, u.identify_name as username, u.number,
  930. ui.id as identityId, ui.province,
  931. u.head_portrait_url as personPortraitUrl,
  932. u.introduction as achievementNum,
  933. adc.demand_count as demandNum,
  934. uc.engaged_field as engagedField,
  935. uc.work_unit as workUnit,
  936. ui.professional_title as position,
  937. ui.international
  938. FROM
  939. user u
  940. LEFT JOIN user_identity ui ON ui.uid = u.id
  941. LEFT JOIN user_career uc ON uc.uid = u.id
  942. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  943. WHERE
  944. ui.expert = 1 and u.source=0
  945. <if test="null != level and level==1 ">
  946. AND u.lvl <![CDATA[ >= ]]> 1
  947. </if>
  948. <if test="null !=level and level==0">
  949. AND u.lvl = 0
  950. </if>
  951. <if test="international !=null">
  952. AND ui.international= #{international,jdbcType=INTEGER}
  953. </if>
  954. <if test="province != null">
  955. AND ui.province = #{province,jdbcType=INTEGER}
  956. </if>
  957. <if test="city != null">
  958. AND ui.city = #{city,jdbcType=INTEGER}
  959. </if>
  960. <if test="area != null">
  961. AND ui.area = #{area,jdbcType=INTEGER}
  962. </if>
  963. <if test="field != null">
  964. AND ui.industry= #{field,jdbcType=VARCHAR}
  965. </if>
  966. <if test="name != null">
  967. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  968. </if>
  969. order by u.number asc
  970. <if test="page_sql!=null">
  971. ${page_sql}
  972. </if>
  973. </select>
  974. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  975. SELECT
  976. count(0)
  977. FROM
  978. user u
  979. LEFT JOIN user_identity ui ON ui.uid = u.id
  980. LEFT JOIN user_career uc ON uc.uid = u.id
  981. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  982. WHERE
  983. ui.expert = 1 and u.source=0
  984. <if test="null != level and level==1 ">
  985. AND u.lvl <![CDATA[ >= ]]> 1
  986. </if>
  987. <if test="null !=level and level==0">
  988. AND u.lvl = 0
  989. </if>
  990. <if test="international !=null">
  991. AND ui.international= #{international,jdbcType=INTEGER}
  992. </if>
  993. <if test="province != null">
  994. AND ui.province = #{province,jdbcType=INTEGER}
  995. </if>
  996. <if test="city != null">
  997. AND ui.city = #{city,jdbcType=INTEGER}
  998. </if>
  999. <if test="area != null">
  1000. AND ui.area = #{area,jdbcType=INTEGER}
  1001. </if>
  1002. <if test="field != null">
  1003. AND ui.industry= #{field,jdbcType=VARCHAR}
  1004. </if>
  1005. <if test="name != null">
  1006. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1007. </if>
  1008. </select>
  1009. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  1010. select
  1011. a.id,
  1012. b.username as ownerName,
  1013. c.ability_label as abilityLabel,
  1014. a.head_portrait_url as personPortraitUrl,
  1015. e.education
  1016. from user a
  1017. left join user_identity b
  1018. on a.id = b.uid
  1019. left join user_ability c
  1020. on a.id = c.uid
  1021. <!-- left join user_info d
  1022. on a.id = d.uid -->
  1023. left join user_edu e
  1024. on a.id = e.uid
  1025. where 1=1
  1026. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  1027. order by
  1028. a.create_time desc
  1029. limit 0,6
  1030. </select>
  1031. <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
  1032. select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
  1033. t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1034. from user_identity t left JOIN user u on t.uid = u.id
  1035. left join jpush_easemob_account j on t.uid=j.uid
  1036. left join (select count(0) as x,seller_id from t_order
  1037. where order_status != 4
  1038. group by seller_id ) o on t.uid=o.seller_id
  1039. where t.expert=1
  1040. and t.uid=#{uid,jdbcType=VARCHAR}
  1041. </select>
  1042. <select id="getExperts" resultType="com.goafanti.user.bo.UserIdentityBo">
  1043. 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,
  1044. u.type,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1045. from user_identity t left JOIN user u on t.uid = u.id
  1046. left join (select count(0) as x,seller_id from t_order
  1047. where order_status != 4
  1048. group by seller_id ) o on t.uid=o.seller_id
  1049. where expert=1
  1050. and u.status !=1
  1051. and t.audit_status =2
  1052. and u.source=0
  1053. order by u.update_time desc
  1054. limit #{0}
  1055. </select>
  1056. <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
  1057. 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,
  1058. u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1059. from user_identity t left JOIN user u on t.uid = u.id
  1060. left join (select count(0) as x,seller_id from t_order
  1061. where order_status != 4
  1062. group by seller_id ) o on t.uid=o.seller_id
  1063. where expert=1
  1064. and u.status !=1
  1065. and t.audit_status =2
  1066. <if test="industry != null">
  1067. and t.industry = #{industry,jdbcType=VARCHAR}
  1068. </if>
  1069. <if test="name != null">
  1070. and u.nickname like concat('%',#{name},'%')
  1071. </if>
  1072. <if test="page_sql!=null">
  1073. ${page_sql}
  1074. </if>
  1075. </select>
  1076. <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
  1077. select count(0)
  1078. from user_identity t left JOIN user u on t.uid = u.id
  1079. left join (select count(0) as x,seller_id from t_order
  1080. where order_status != 4
  1081. group by seller_id ) o on t.uid=o.seller_id
  1082. where expert=1
  1083. and u.status !=1
  1084. <if test="industry != null">
  1085. and t.industry = #{industry,jdbcType=VARCHAR}
  1086. </if>
  1087. <if test="name != null">
  1088. and u.nickname like concat('%',#{name},'%')
  1089. </if>
  1090. </select>
  1091. <select id="countInterest" resultType="java.lang.Integer">
  1092. select count(0)
  1093. from user_interest
  1094. where to_uid=#{uid,jdbcType=VARCHAR}
  1095. </select>
  1096. <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
  1097. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1098. t.expert as consultant,ifnull(x.n,0) as reservationCount
  1099. from user_identity t
  1100. left join `user` u on t.uid=u.id
  1101. left join ( select y.x as n, y.seller_id
  1102. from (select count( 0 ) as x,seller_id from t_order
  1103. where order_status != 4
  1104. group by seller_id)y)x on t.uid=x.seller_id
  1105. where t.expert=2
  1106. <if test="page_sql!=null">
  1107. ${page_sql}
  1108. </if>
  1109. </select>
  1110. <select id="findConsultantCount" resultType="java.lang.Integer">
  1111. select count(0)
  1112. from user_identity t
  1113. left join `user` u on t.uid=u.id
  1114. where t.expert=2
  1115. </select>
  1116. <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
  1117. select
  1118. t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
  1119. u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1120. from user_identity t
  1121. left join user u on t.uid =u.id
  1122. left join jpush_easemob_account j on t.uid=j.uid
  1123. left join (select count(0) as x,seller_id from t_order
  1124. where order_status != 4
  1125. group by seller_id ) o on t.uid=o.seller_id
  1126. where t.expert=2
  1127. and t.uid = #{uid,jdbcType=VARCHAR}
  1128. </select>
  1129. <select id="getAppHomeRecommended" resultType="com.goafanti.user.bo.UserIdentityRecommended">
  1130. select
  1131. ep.expert_id as id, u.identify_name as name, ui.work_unit as workUnit ,ui.professional_title as professionalTitle, u.introduction as introduction,
  1132. u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1133. from expert_publish ep
  1134. left join user_identity ui on ep.expert_id = ui.uid
  1135. left join user u on ep.expert_id = u.id
  1136. left join (select count(0) as x,seller_id from t_order
  1137. where order_status != 4
  1138. group by seller_id ) o on ep.expert_id=o.seller_id
  1139. where
  1140. ep.publish_client = '1'
  1141. and ep.publish_page = 'W01'
  1142. order by
  1143. ep.if_top, ep.top_number, ep.show_number asc
  1144. limit 0,6
  1145. </select>
  1146. <select id="getConsultantList" resultType="com.goafanti.app.bo.consultantListBo">
  1147. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1148. t.expert as consultant,ifnull(x.n,0) as reservationCount,work_unit as workUnit
  1149. from user_identity t
  1150. left join `user` u on t.uid=u.id
  1151. left join ( select y.x as n, y.seller_id
  1152. from (select count( 0 ) as x,seller_id from t_order
  1153. where order_status != 4
  1154. group by seller_id)y)x on t.uid=x.seller_id
  1155. where t.expert=2
  1156. limit #{0}
  1157. </select>
  1158. <select id="listInterestedExpert" resultType="com.goafanti.user.bo.UserIdentityBo">
  1159. 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,
  1160. u.type,u.introduction,u.head_portrait_url as headPortraitUrl
  1161. from user_identity t left JOIN user u on t.uid = u.id
  1162. left join user_interest ui on ui.to_uid=u.id
  1163. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1164. <if test="page_sql!=null">
  1165. ${page_sql}
  1166. </if>
  1167. </select>
  1168. <select id="listInterestedExpertCount" resultType="java.lang.Integer">
  1169. select count(0)
  1170. from user_identity t left JOIN user u on t.uid = u.id
  1171. left join user_interest ui on ui.to_uid=u.id
  1172. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1173. </select>
  1174. <select id="appMyInterestedExpertList" resultType="com.goafanti.user.bo.MyInterestedBo">
  1175. select t.id ,t.uid,u.identify_name as name,t.work_unit as workUnit,u.introduction,
  1176. t.professional_title as professionalTitle,u.head_portrait_url as imgUrl,
  1177. if(isnull(a.count),0,a.count) as interestCount
  1178. from user_identity t left JOIN `user` u on t.uid = u.id
  1179. left join user_interest ui on ui.to_uid=u.id
  1180. left join (select to_uid,count(*) as count from user_interest
  1181. order by to_uid) a on ui.to_uid=u.id
  1182. where t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
  1183. <if test="page_sql!=null">
  1184. ${page_sql}
  1185. </if>
  1186. </select>
  1187. <select id="appMyInterestedExpertCount" resultType="java.lang.Integer">
  1188. select count(0)
  1189. from user_identity t left JOIN user u on t.uid = u.id
  1190. left join user_interest ui on ui.to_uid=u.id
  1191. where t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
  1192. </select>
  1193. <!-- 获得专家顾问审核列表数据 -->
  1194. <select id="getExpertAuditList" resultMap="BaseResultMap">
  1195. select
  1196. i.id, i.uid, i.username, id_number, positive_id_url, i.audit_status, expert, i.audit_status as expert_audit, fixed_tel, industry,
  1197. u.mobile as contact_mobile, c.name as contacts
  1198. from user_identity i
  1199. inner join user u on i.uid = u.id
  1200. inner join industry_category c on c.id = i.industry
  1201. where 1 = 1
  1202. <if test="expertAudit != null ">
  1203. and i.audit_status = #{expertAudit,jdbcType=VARCHAR}
  1204. </if>
  1205. <if test="industry != null ">
  1206. and industry = #{industry,jdbcType=INTEGER}
  1207. </if>
  1208. <if test="expert != null ">
  1209. and expert = #{expert,jdbcType=INTEGER}
  1210. </if>
  1211. <if test="expert == null ">
  1212. and expert &gt; 0
  1213. </if>
  1214. <if test="username != null">
  1215. <bind name="un" value="'%' + username + '%'"/>
  1216. 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})
  1217. </if>
  1218. <if test="page_sql!=null">
  1219. ${page_sql}
  1220. </if>
  1221. </select>
  1222. <select id="getExpertAuditListCount" resultType="java.lang.Integer">
  1223. select
  1224. count(0)
  1225. from user_identity i
  1226. inner join user u on i.uid = u.id
  1227. where 1 = 1
  1228. <if test="expertAudit != null ">
  1229. and i.audit_status = #{expertAudit,jdbcType=VARCHAR}
  1230. </if>
  1231. <if test="industry != null ">
  1232. and industry = #{industry,jdbcType=INTEGER}
  1233. </if>
  1234. <if test="expert != null ">
  1235. and expert = #{expert,jdbcType=INTEGER}
  1236. </if>
  1237. <if test="expert == null ">
  1238. and expert &gt; 0
  1239. </if>
  1240. <if test="username != null">
  1241. <bind name="un" value="'%' + username + '%'"/>
  1242. 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})
  1243. </if>
  1244. </select>
  1245. <!-- 获得用户认证信息数据 -->
  1246. <select id="getUserIdentityByUid" parameterType="java.lang.String" resultMap="BaseResultMap">
  1247. select *
  1248. from `user` u
  1249. inner join user_identity i on u.id = i.uid
  1250. where u.id = #{uid,jdbcType=VARCHAR}
  1251. </select>
  1252. </mapper>