UserIdentityMapper.xml 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191
  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. b.graduate_school as graduateSchool,
  849. b.major_category as majorCategory,
  850. b.qualification,
  851. b.professional_title as professionalTitle,
  852. b.expert_audit as expertAudit,
  853. b.work_unit as workUnit
  854. from
  855. user a left join user_identity b on
  856. a.id = b.uid
  857. where
  858. a.id = #{uid,jdbcType=VARCHAR}
  859. </select>
  860. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  861. select
  862. u.aid,
  863. u.mid,
  864. u.lvl,
  865. ui.id,
  866. ui.uid,
  867. ui.username,
  868. ui.sex,
  869. ui.date_of_birth_year as dateOfBirthYear,
  870. ui.date_of_birth_month as dateOfBirthMonth,
  871. ui.id_number as idNumber,
  872. ui.positive_id_url as positiveIdUrl,
  873. ui.opposite_id_url as oppositeIdUrl,
  874. ui.province,
  875. ui.city,
  876. ui.area,
  877. ui.contact_mobile as contactMobile,
  878. ui.bank_name as bankName,
  879. ui.bank_account as bankAccount,
  880. ui.bank_card_number as bankCardNumber,
  881. ui.amount_money as amountMoney,
  882. ui.audit_status as auditStatus,
  883. ui.payment_date as paymentDate,
  884. ui.expert
  885. from user u
  886. LEFT JOIN user_identity ui on u.id = ui.uid
  887. where u.id = #{uid,jdbcType=VARCHAR}
  888. </select>
  889. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  890. select u.id as uid, i.username
  891. from user u INNER JOIN
  892. user_identity i on u.id = i.uid
  893. where u.lvl = 1
  894. <if test="_parameter != null">
  895. and u.mid = #{aid,jdbcType=VARCHAR}
  896. </if>
  897. </select>
  898. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  899. select u.id as uid, i.username
  900. from user u INNER JOIN
  901. user_identity i on u.id = i.uid
  902. where u.lvl = 1
  903. <if test="_parameter != null">
  904. and u.aid = #{aid,jdbcType=VARCHAR}
  905. </if>
  906. </select>
  907. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  908. select u.id as uid, ui.username, u.mobile
  909. from user u INNER JOIN
  910. user_identity ui on u.id = ui.uid
  911. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  912. <if test="aid != null">
  913. and u.mid = #{aid,jdbcType=VARCHAR}
  914. </if>
  915. </select>
  916. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  917. select u.id as uid, ui.username, u.mobile
  918. from user u INNER JOIN
  919. user_identity ui on u.id = ui.uid
  920. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  921. <if test="aid != null">
  922. and u.aid = #{aid,jdbcType=VARCHAR}
  923. </if>
  924. </select>
  925. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  926. SELECT
  927. u.id as uid, u.identify_name as username, u.number,
  928. ui.id as identityId, ui.province,
  929. u.head_portrait_url as personPortraitUrl,
  930. u.introduction as achievementNum,
  931. adc.demand_count as demandNum,
  932. uc.engaged_field as engagedField,
  933. uc.work_unit as workUnit,
  934. ui.professional_title as position,
  935. ui.international
  936. FROM
  937. user u
  938. LEFT JOIN user_identity ui ON ui.uid = u.id
  939. LEFT JOIN user_career uc ON uc.uid = u.id
  940. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  941. WHERE
  942. ui.expert = 1 and u.source=0
  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 ui.industry= #{field,jdbcType=VARCHAR}
  963. </if>
  964. <if test="name != null">
  965. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  966. </if>
  967. order by 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(0)
  975. FROM
  976. user u
  977. LEFT JOIN user_identity ui ON ui.uid = u.id
  978. LEFT JOIN user_career uc ON uc.uid = u.id
  979. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  980. WHERE
  981. ui.expert = 1 and u.source=0
  982. <if test="null != level and level==1 ">
  983. AND u.lvl <![CDATA[ >= ]]> 1
  984. </if>
  985. <if test="null !=level and level==0">
  986. AND u.lvl = 0
  987. </if>
  988. <if test="international !=null">
  989. AND ui.international= #{international,jdbcType=INTEGER}
  990. </if>
  991. <if test="province != null">
  992. AND ui.province = #{province,jdbcType=INTEGER}
  993. </if>
  994. <if test="city != null">
  995. AND ui.city = #{city,jdbcType=INTEGER}
  996. </if>
  997. <if test="area != null">
  998. AND ui.area = #{area,jdbcType=INTEGER}
  999. </if>
  1000. <if test="field != null">
  1001. AND ui.industry= #{field,jdbcType=VARCHAR}
  1002. </if>
  1003. <if test="name != null">
  1004. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1005. </if>
  1006. </select>
  1007. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  1008. select
  1009. a.id,
  1010. b.username as ownerName,
  1011. c.ability_label as abilityLabel,
  1012. a.head_portrait_url as personPortraitUrl,
  1013. e.education
  1014. from user a
  1015. left join user_identity b
  1016. on a.id = b.uid
  1017. left join user_ability c
  1018. on a.id = c.uid
  1019. <!-- left join user_info d
  1020. on a.id = d.uid -->
  1021. left join user_edu e
  1022. on a.id = e.uid
  1023. where 1=1
  1024. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  1025. order by
  1026. a.create_time desc
  1027. limit 0,6
  1028. </select>
  1029. <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
  1030. select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
  1031. t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1032. from user_identity t left JOIN user u on t.uid = u.id
  1033. left join jpush_easemob_account j on t.uid=j.uid
  1034. left join (select count(0) as x,seller_id from t_order
  1035. where order_status != 4
  1036. group by seller_id ) o on t.uid=o.seller_id
  1037. where t.expert=1
  1038. and t.uid=#{uid,jdbcType=VARCHAR}
  1039. </select>
  1040. <select id="getExperts" resultType="com.goafanti.user.bo.UserIdentityBo">
  1041. 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,
  1042. u.type,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1043. from user_identity t left JOIN user u on t.uid = u.id
  1044. left join (select count(0) as x,seller_id from t_order
  1045. where order_status != 4
  1046. group by seller_id ) o on t.uid=o.seller_id
  1047. where expert=1
  1048. and u.status !=1
  1049. and t.expert_audit =2
  1050. and u.source=0
  1051. order by u.update_time desc
  1052. limit #{0}
  1053. </select>
  1054. <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
  1055. 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,
  1056. u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1057. from user_identity t left JOIN user u on t.uid = u.id
  1058. left join (select count(0) as x,seller_id from t_order
  1059. where order_status != 4
  1060. group by seller_id ) o on t.uid=o.seller_id
  1061. where expert=1
  1062. and u.status !=1
  1063. and t.expert_audit =2
  1064. <if test="industry != null">
  1065. and t.industry = #{industry,jdbcType=VARCHAR}
  1066. </if>
  1067. <if test="name != null">
  1068. and u.nickname like concat('%',#{name},'%')
  1069. </if>
  1070. <if test="page_sql!=null">
  1071. ${page_sql}
  1072. </if>
  1073. </select>
  1074. <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
  1075. select count(0)
  1076. from user_identity t left JOIN user u on t.uid = u.id
  1077. left join (select count(0) as x,seller_id from t_order
  1078. where order_status != 4
  1079. group by seller_id ) o on t.uid=o.seller_id
  1080. where expert=1
  1081. and u.status !=1
  1082. <if test="industry != null">
  1083. and t.industry = #{industry,jdbcType=VARCHAR}
  1084. </if>
  1085. <if test="name != null">
  1086. and u.nickname like concat('%',#{name},'%')
  1087. </if>
  1088. </select>
  1089. <select id="countInterest" resultType="java.lang.Integer">
  1090. select count(0)
  1091. from user_interest
  1092. where to_uid=#{uid,jdbcType=VARCHAR}
  1093. </select>
  1094. <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
  1095. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1096. t.expert as consultant,ifnull(x.n,0) as reservationCount
  1097. from user_identity t
  1098. left join `user` u on t.uid=u.id
  1099. left join ( select y.x as n, y.seller_id
  1100. from (select count( 0 ) as x,seller_id from t_order
  1101. where order_status != 4
  1102. group by seller_id)y)x on t.uid=x.seller_id
  1103. where t.expert=2
  1104. <if test="page_sql!=null">
  1105. ${page_sql}
  1106. </if>
  1107. </select>
  1108. <select id="findConsultantCount" resultType="java.lang.Integer">
  1109. select count(0)
  1110. from user_identity t
  1111. left join `user` u on t.uid=u.id
  1112. where t.expert=2
  1113. </select>
  1114. <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
  1115. select
  1116. t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
  1117. u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1118. from user_identity t
  1119. left join user u on t.uid =u.id
  1120. left join jpush_easemob_account j on t.uid=j.uid
  1121. left join (select count(0) as x,seller_id from t_order
  1122. where order_status != 4
  1123. group by seller_id ) o on t.uid=o.seller_id
  1124. where t.expert=2
  1125. and t.uid = #{uid,jdbcType=VARCHAR}
  1126. </select>
  1127. <select id="getAppHomeRecommended" resultType="com.goafanti.user.bo.UserIdentityRecommended">
  1128. select
  1129. ep.expert_id as id, u.identify_name as name, ui.work_unit as workUnit ,ui.professional_title as professionalTitle, u.introduction as introduction,
  1130. u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1131. from expert_publish ep
  1132. left join user_identity ui on ep.expert_id = ui.uid
  1133. left join user u on ep.expert_id = u.id
  1134. left join (select count(0) as x,seller_id from t_order
  1135. where order_status != 4
  1136. group by seller_id ) o on ep.expert_id=o.seller_id
  1137. where
  1138. ep.publish_client = '1'
  1139. and ep.publish_page = 'W01'
  1140. order by
  1141. ep.if_top, ep.top_number, ep.show_number asc
  1142. limit 0,6
  1143. </select>
  1144. <select id="getConsultantList" resultType="com.goafanti.app.bo.consultantListBo">
  1145. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1146. t.expert as consultant,ifnull(x.n,0) as reservationCount,work_unit as workUnit
  1147. from user_identity t
  1148. left join `user` u on t.uid=u.id
  1149. left join ( select y.x as n, y.seller_id
  1150. from (select count( 0 ) as x,seller_id from t_order
  1151. where order_status != 4
  1152. group by seller_id)y)x on t.uid=x.seller_id
  1153. where t.expert=2
  1154. limit #{0}
  1155. </select>
  1156. <select id="listInterestedExpert" resultType="com.goafanti.user.bo.UserIdentityBo">
  1157. 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,
  1158. u.type,u.introduction,u.head_portrait_url as headPortraitUrl
  1159. from user_identity t left JOIN user u on t.uid = u.id
  1160. left join user_interest ui on ui.to_uid=u.id
  1161. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1162. <if test="page_sql!=null">
  1163. ${page_sql}
  1164. </if>
  1165. </select>
  1166. <select id="listInterestedExpertCount" resultType="java.lang.Integer">
  1167. select count(0)
  1168. from user_identity t left JOIN user u on t.uid = u.id
  1169. left join user_interest ui on ui.to_uid=u.id
  1170. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1171. </select>
  1172. </mapper>