UserIdentityMapper.xml 42 KB

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