UserIdentityMapper.xml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095
  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 Wed Dec 06 15:49:08 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="celebrity" jdbcType="INTEGER" property="celebrity" />
  33. <result column="international" jdbcType="INTEGER" property="international" />
  34. <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
  35. <result column="qq" jdbcType="VARCHAR" property="qq" />
  36. <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
  37. <result column="postcode" jdbcType="VARCHAR" property="postcode" />
  38. <result column="review_instructions" jdbcType="VARCHAR" property="reviewInstructions" />
  39. <result column="industry" jdbcType="INTEGER" property="industry" />
  40. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  41. <result column="email" jdbcType="VARCHAR" property="email" />
  42. <result column="professional_title" jdbcType="VARCHAR" property="professionalTitle" />
  43. <result column="work_unit" jdbcType="VARCHAR" property="workUnit" />
  44. <result column="education" jdbcType="VARCHAR" property="education" />
  45. <result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
  46. <result column="qualification" jdbcType="VARCHAR" property="qualification" />
  47. <result column="investment" jdbcType="INTEGER" property="investment" />
  48. <result column="graduate_school" jdbcType="VARCHAR" property="graduateSchool" />
  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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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, celebrity,
  127. international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
  128. contacts, email, professional_title, work_unit, education, major_category, qualification,
  129. investment, graduate_school
  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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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 Wed Dec 06 15:49:08 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, celebrity, 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, investment, graduate_school
  200. )
  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}, #{celebrity,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}, #{investment,jdbcType=INTEGER}, #{graduateSchool,jdbcType=VARCHAR}
  214. )
  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 Wed Dec 06 15:49:08 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="celebrity != null">
  291. celebrity,
  292. </if>
  293. <if test="international != null">
  294. international,
  295. </if>
  296. <if test="fixedTel != null">
  297. fixed_tel,
  298. </if>
  299. <if test="qq != null">
  300. qq,
  301. </if>
  302. <if test="postalAddress != null">
  303. postal_address,
  304. </if>
  305. <if test="postcode != null">
  306. postcode,
  307. </if>
  308. <if test="reviewInstructions != null">
  309. review_instructions,
  310. </if>
  311. <if test="industry != null">
  312. industry,
  313. </if>
  314. <if test="contacts != null">
  315. contacts,
  316. </if>
  317. <if test="email != null">
  318. email,
  319. </if>
  320. <if test="professionalTitle != null">
  321. professional_title,
  322. </if>
  323. <if test="workUnit != null">
  324. work_unit,
  325. </if>
  326. <if test="education != null">
  327. education,
  328. </if>
  329. <if test="majorCategory != null">
  330. major_category,
  331. </if>
  332. <if test="qualification != null">
  333. qualification,
  334. </if>
  335. <if test="investment != null">
  336. investment,
  337. </if>
  338. <if test="graduateSchool != null">
  339. graduate_school,
  340. </if>
  341. </trim>
  342. <trim prefix="values (" suffix=")" suffixOverrides=",">
  343. <if test="id != null">
  344. #{id,jdbcType=VARCHAR},
  345. </if>
  346. <if test="uid != null">
  347. #{uid,jdbcType=VARCHAR},
  348. </if>
  349. <if test="username != null">
  350. #{username,jdbcType=VARCHAR},
  351. </if>
  352. <if test="sex != null">
  353. #{sex,jdbcType=VARCHAR},
  354. </if>
  355. <if test="dateOfBirthYear != null">
  356. #{dateOfBirthYear,jdbcType=VARCHAR},
  357. </if>
  358. <if test="dateOfBirthMonth != null">
  359. #{dateOfBirthMonth,jdbcType=VARCHAR},
  360. </if>
  361. <if test="idNumber != null">
  362. #{idNumber,jdbcType=VARCHAR},
  363. </if>
  364. <if test="positiveIdUrl != null">
  365. #{positiveIdUrl,jdbcType=VARCHAR},
  366. </if>
  367. <if test="oppositeIdUrl != null">
  368. #{oppositeIdUrl,jdbcType=VARCHAR},
  369. </if>
  370. <if test="province != null">
  371. #{province,jdbcType=INTEGER},
  372. </if>
  373. <if test="city != null">
  374. #{city,jdbcType=INTEGER},
  375. </if>
  376. <if test="area != null">
  377. #{area,jdbcType=INTEGER},
  378. </if>
  379. <if test="contactMobile != null">
  380. #{contactMobile,jdbcType=VARCHAR},
  381. </if>
  382. <if test="bankName != null">
  383. #{bankName,jdbcType=VARCHAR},
  384. </if>
  385. <if test="bankAccount != null">
  386. #{bankAccount,jdbcType=VARCHAR},
  387. </if>
  388. <if test="bankCardNumber != null">
  389. #{bankCardNumber,jdbcType=VARCHAR},
  390. </if>
  391. <if test="amountMoney != null">
  392. #{amountMoney,jdbcType=DECIMAL},
  393. </if>
  394. <if test="auditStatus != null">
  395. #{auditStatus,jdbcType=INTEGER},
  396. </if>
  397. <if test="process != null">
  398. #{process,jdbcType=INTEGER},
  399. </if>
  400. <if test="wrongCount != null">
  401. #{wrongCount,jdbcType=INTEGER},
  402. </if>
  403. <if test="paymentDate != null">
  404. #{paymentDate,jdbcType=TIMESTAMP},
  405. </if>
  406. <if test="expert != null">
  407. #{expert,jdbcType=INTEGER},
  408. </if>
  409. <if test="celebrity != null">
  410. #{celebrity,jdbcType=INTEGER},
  411. </if>
  412. <if test="international != null">
  413. #{international,jdbcType=INTEGER},
  414. </if>
  415. <if test="fixedTel != null">
  416. #{fixedTel,jdbcType=VARCHAR},
  417. </if>
  418. <if test="qq != null">
  419. #{qq,jdbcType=VARCHAR},
  420. </if>
  421. <if test="postalAddress != null">
  422. #{postalAddress,jdbcType=VARCHAR},
  423. </if>
  424. <if test="postcode != null">
  425. #{postcode,jdbcType=VARCHAR},
  426. </if>
  427. <if test="reviewInstructions != null">
  428. #{reviewInstructions,jdbcType=VARCHAR},
  429. </if>
  430. <if test="industry != null">
  431. #{industry,jdbcType=INTEGER},
  432. </if>
  433. <if test="contacts != null">
  434. #{contacts,jdbcType=VARCHAR},
  435. </if>
  436. <if test="email != null">
  437. #{email,jdbcType=VARCHAR},
  438. </if>
  439. <if test="professionalTitle != null">
  440. #{professionalTitle,jdbcType=VARCHAR},
  441. </if>
  442. <if test="workUnit != null">
  443. #{workUnit,jdbcType=VARCHAR},
  444. </if>
  445. <if test="education != null">
  446. #{education,jdbcType=VARCHAR},
  447. </if>
  448. <if test="majorCategory != null">
  449. #{majorCategory,jdbcType=VARCHAR},
  450. </if>
  451. <if test="qualification != null">
  452. #{qualification,jdbcType=VARCHAR},
  453. </if>
  454. <if test="investment != null">
  455. #{investment,jdbcType=INTEGER},
  456. </if>
  457. <if test="graduateSchool != null">
  458. #{graduateSchool,jdbcType=VARCHAR},
  459. </if>
  460. </trim>
  461. </insert>
  462. <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
  463. <!--
  464. WARNING - @mbg.generated
  465. This element is automatically generated by MyBatis Generator, do not modify.
  466. This element was generated on Wed Dec 06 15:49:08 CST 2017.
  467. -->
  468. select count(*) from user_identity
  469. <if test="_parameter != null">
  470. <include refid="Example_Where_Clause" />
  471. </if>
  472. </select>
  473. <update id="updateByExampleSelective" parameterType="map">
  474. <!--
  475. WARNING - @mbg.generated
  476. This element is automatically generated by MyBatis Generator, do not modify.
  477. This element was generated on Wed Dec 06 15:49:08 CST 2017.
  478. -->
  479. update user_identity
  480. <set>
  481. <if test="record.id != null">
  482. id = #{record.id,jdbcType=VARCHAR},
  483. </if>
  484. <if test="record.uid != null">
  485. uid = #{record.uid,jdbcType=VARCHAR},
  486. </if>
  487. <if test="record.username != null">
  488. username = #{record.username,jdbcType=VARCHAR},
  489. </if>
  490. <if test="record.sex != null">
  491. sex = #{record.sex,jdbcType=VARCHAR},
  492. </if>
  493. <if test="record.dateOfBirthYear != null">
  494. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  495. </if>
  496. <if test="record.dateOfBirthMonth != null">
  497. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  498. </if>
  499. <if test="record.idNumber != null">
  500. id_number = #{record.idNumber,jdbcType=VARCHAR},
  501. </if>
  502. <if test="record.positiveIdUrl != null">
  503. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  504. </if>
  505. <if test="record.oppositeIdUrl != null">
  506. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  507. </if>
  508. <if test="record.province != null">
  509. province = #{record.province,jdbcType=INTEGER},
  510. </if>
  511. <if test="record.city != null">
  512. city = #{record.city,jdbcType=INTEGER},
  513. </if>
  514. <if test="record.area != null">
  515. area = #{record.area,jdbcType=INTEGER},
  516. </if>
  517. <if test="record.contactMobile != null">
  518. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  519. </if>
  520. <if test="record.bankName != null">
  521. bank_name = #{record.bankName,jdbcType=VARCHAR},
  522. </if>
  523. <if test="record.bankAccount != null">
  524. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  525. </if>
  526. <if test="record.bankCardNumber != null">
  527. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  528. </if>
  529. <if test="record.amountMoney != null">
  530. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  531. </if>
  532. <if test="record.auditStatus != null">
  533. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  534. </if>
  535. <if test="record.process != null">
  536. process = #{record.process,jdbcType=INTEGER},
  537. </if>
  538. <if test="record.wrongCount != null">
  539. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  540. </if>
  541. <if test="record.paymentDate != null">
  542. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  543. </if>
  544. <if test="record.expert != null">
  545. expert = #{record.expert,jdbcType=INTEGER},
  546. </if>
  547. <if test="record.celebrity != null">
  548. celebrity = #{record.celebrity,jdbcType=INTEGER},
  549. </if>
  550. <if test="record.international != null">
  551. international = #{record.international,jdbcType=INTEGER},
  552. </if>
  553. <if test="record.fixedTel != null">
  554. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  555. </if>
  556. <if test="record.qq != null">
  557. qq = #{record.qq,jdbcType=VARCHAR},
  558. </if>
  559. <if test="record.postalAddress != null">
  560. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  561. </if>
  562. <if test="record.postcode != null">
  563. postcode = #{record.postcode,jdbcType=VARCHAR},
  564. </if>
  565. <if test="record.reviewInstructions != null">
  566. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  567. </if>
  568. <if test="record.industry != null">
  569. industry = #{record.industry,jdbcType=INTEGER},
  570. </if>
  571. <if test="record.contacts != null">
  572. contacts = #{record.contacts,jdbcType=VARCHAR},
  573. </if>
  574. <if test="record.email != null">
  575. email = #{record.email,jdbcType=VARCHAR},
  576. </if>
  577. <if test="record.professionalTitle != null">
  578. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  579. </if>
  580. <if test="record.workUnit != null">
  581. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  582. </if>
  583. <if test="record.education != null">
  584. education = #{record.education,jdbcType=VARCHAR},
  585. </if>
  586. <if test="record.majorCategory != null">
  587. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  588. </if>
  589. <if test="record.qualification != null">
  590. qualification = #{record.qualification,jdbcType=VARCHAR},
  591. </if>
  592. <if test="record.investment != null">
  593. investment = #{record.investment,jdbcType=INTEGER},
  594. </if>
  595. <if test="record.graduateSchool != null">
  596. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
  597. </if>
  598. </set>
  599. <if test="_parameter != null">
  600. <include refid="Update_By_Example_Where_Clause" />
  601. </if>
  602. </update>
  603. <update id="updateByExample" parameterType="map">
  604. <!--
  605. WARNING - @mbg.generated
  606. This element is automatically generated by MyBatis Generator, do not modify.
  607. This element was generated on Wed Dec 06 15:49:08 CST 2017.
  608. -->
  609. update user_identity
  610. set id = #{record.id,jdbcType=VARCHAR},
  611. uid = #{record.uid,jdbcType=VARCHAR},
  612. username = #{record.username,jdbcType=VARCHAR},
  613. sex = #{record.sex,jdbcType=VARCHAR},
  614. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  615. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  616. id_number = #{record.idNumber,jdbcType=VARCHAR},
  617. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  618. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  619. province = #{record.province,jdbcType=INTEGER},
  620. city = #{record.city,jdbcType=INTEGER},
  621. area = #{record.area,jdbcType=INTEGER},
  622. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  623. bank_name = #{record.bankName,jdbcType=VARCHAR},
  624. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  625. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  626. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  627. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  628. process = #{record.process,jdbcType=INTEGER},
  629. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  630. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  631. expert = #{record.expert,jdbcType=INTEGER},
  632. celebrity = #{record.celebrity,jdbcType=INTEGER},
  633. international = #{record.international,jdbcType=INTEGER},
  634. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  635. qq = #{record.qq,jdbcType=VARCHAR},
  636. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  637. postcode = #{record.postcode,jdbcType=VARCHAR},
  638. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  639. industry = #{record.industry,jdbcType=INTEGER},
  640. contacts = #{record.contacts,jdbcType=VARCHAR},
  641. email = #{record.email,jdbcType=VARCHAR},
  642. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  643. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  644. education = #{record.education,jdbcType=VARCHAR},
  645. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  646. qualification = #{record.qualification,jdbcType=VARCHAR},
  647. investment = #{record.investment,jdbcType=INTEGER},
  648. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR}
  649. <if test="_parameter != null">
  650. <include refid="Update_By_Example_Where_Clause" />
  651. </if>
  652. </update>
  653. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
  654. <!--
  655. WARNING - @mbg.generated
  656. This element is automatically generated by MyBatis Generator, do not modify.
  657. This element was generated on Wed Dec 06 15:49:08 CST 2017.
  658. -->
  659. update user_identity
  660. <set>
  661. <if test="uid != null">
  662. uid = #{uid,jdbcType=VARCHAR},
  663. </if>
  664. <if test="username != null">
  665. username = #{username,jdbcType=VARCHAR},
  666. </if>
  667. <if test="sex != null">
  668. sex = #{sex,jdbcType=VARCHAR},
  669. </if>
  670. <if test="dateOfBirthYear != null">
  671. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  672. </if>
  673. <if test="dateOfBirthMonth != null">
  674. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  675. </if>
  676. <if test="idNumber != null">
  677. id_number = #{idNumber,jdbcType=VARCHAR},
  678. </if>
  679. <if test="positiveIdUrl != null">
  680. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  681. </if>
  682. <if test="oppositeIdUrl != null">
  683. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  684. </if>
  685. <if test="province != null">
  686. province = #{province,jdbcType=INTEGER},
  687. </if>
  688. <if test="city != null">
  689. city = #{city,jdbcType=INTEGER},
  690. </if>
  691. <if test="area != null">
  692. area = #{area,jdbcType=INTEGER},
  693. </if>
  694. <if test="contactMobile != null">
  695. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  696. </if>
  697. <if test="bankName != null">
  698. bank_name = #{bankName,jdbcType=VARCHAR},
  699. </if>
  700. <if test="bankAccount != null">
  701. bank_account = #{bankAccount,jdbcType=VARCHAR},
  702. </if>
  703. <if test="bankCardNumber != null">
  704. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  705. </if>
  706. <if test="amountMoney != null">
  707. amount_money = #{amountMoney,jdbcType=DECIMAL},
  708. </if>
  709. <if test="auditStatus != null">
  710. audit_status = #{auditStatus,jdbcType=INTEGER},
  711. </if>
  712. <if test="process != null">
  713. process = #{process,jdbcType=INTEGER},
  714. </if>
  715. <if test="wrongCount != null">
  716. wrong_count = #{wrongCount,jdbcType=INTEGER},
  717. </if>
  718. <if test="paymentDate != null">
  719. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  720. </if>
  721. <if test="expert != null">
  722. expert = #{expert,jdbcType=INTEGER},
  723. </if>
  724. <if test="celebrity != null">
  725. celebrity = #{celebrity,jdbcType=INTEGER},
  726. </if>
  727. <if test="international != null">
  728. international = #{international,jdbcType=INTEGER},
  729. </if>
  730. <if test="fixedTel != null">
  731. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  732. </if>
  733. <if test="qq != null">
  734. qq = #{qq,jdbcType=VARCHAR},
  735. </if>
  736. <if test="postalAddress != null">
  737. postal_address = #{postalAddress,jdbcType=VARCHAR},
  738. </if>
  739. <if test="postcode != null">
  740. postcode = #{postcode,jdbcType=VARCHAR},
  741. </if>
  742. <if test="reviewInstructions != null">
  743. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  744. </if>
  745. <if test="industry != null">
  746. industry = #{industry,jdbcType=INTEGER},
  747. </if>
  748. <if test="contacts != null">
  749. contacts = #{contacts,jdbcType=VARCHAR},
  750. </if>
  751. <if test="email != null">
  752. email = #{email,jdbcType=VARCHAR},
  753. </if>
  754. <if test="professionalTitle != null">
  755. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  756. </if>
  757. <if test="workUnit != null">
  758. work_unit = #{workUnit,jdbcType=VARCHAR},
  759. </if>
  760. <if test="education != null">
  761. education = #{education,jdbcType=VARCHAR},
  762. </if>
  763. <if test="majorCategory != null">
  764. major_category = #{majorCategory,jdbcType=VARCHAR},
  765. </if>
  766. <if test="qualification != null">
  767. qualification = #{qualification,jdbcType=VARCHAR},
  768. </if>
  769. <if test="investment != null">
  770. investment = #{investment,jdbcType=INTEGER},
  771. </if>
  772. <if test="graduateSchool != null">
  773. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  774. </if>
  775. </set>
  776. where id = #{id,jdbcType=VARCHAR}
  777. </update>
  778. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
  779. <!--
  780. WARNING - @mbg.generated
  781. This element is automatically generated by MyBatis Generator, do not modify.
  782. This element was generated on Wed Dec 06 15:49:08 CST 2017.
  783. -->
  784. update user_identity
  785. set uid = #{uid,jdbcType=VARCHAR},
  786. username = #{username,jdbcType=VARCHAR},
  787. sex = #{sex,jdbcType=VARCHAR},
  788. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  789. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  790. id_number = #{idNumber,jdbcType=VARCHAR},
  791. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  792. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  793. province = #{province,jdbcType=INTEGER},
  794. city = #{city,jdbcType=INTEGER},
  795. area = #{area,jdbcType=INTEGER},
  796. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  797. bank_name = #{bankName,jdbcType=VARCHAR},
  798. bank_account = #{bankAccount,jdbcType=VARCHAR},
  799. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  800. amount_money = #{amountMoney,jdbcType=DECIMAL},
  801. audit_status = #{auditStatus,jdbcType=INTEGER},
  802. process = #{process,jdbcType=INTEGER},
  803. wrong_count = #{wrongCount,jdbcType=INTEGER},
  804. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  805. expert = #{expert,jdbcType=INTEGER},
  806. celebrity = #{celebrity,jdbcType=INTEGER},
  807. international = #{international,jdbcType=INTEGER},
  808. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  809. qq = #{qq,jdbcType=VARCHAR},
  810. postal_address = #{postalAddress,jdbcType=VARCHAR},
  811. postcode = #{postcode,jdbcType=VARCHAR},
  812. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  813. industry = #{industry,jdbcType=INTEGER},
  814. contacts = #{contacts,jdbcType=VARCHAR},
  815. email = #{email,jdbcType=VARCHAR},
  816. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  817. work_unit = #{workUnit,jdbcType=VARCHAR},
  818. education = #{education,jdbcType=VARCHAR},
  819. major_category = #{majorCategory,jdbcType=VARCHAR},
  820. qualification = #{qualification,jdbcType=VARCHAR},
  821. investment = #{investment,jdbcType=INTEGER},
  822. graduate_school = #{graduateSchool,jdbcType=VARCHAR}
  823. where id = #{id,jdbcType=VARCHAR}
  824. </update>
  825. <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  826. select
  827. <include refid="Base_Column_List" />
  828. from user_identity
  829. where uid = #{uid,jdbcType=VARCHAR}
  830. </select>
  831. <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
  832. select
  833. t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
  834. t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
  835. u.mobile, u.number
  836. from user u left JOIN user_identity t
  837. on t.uid = u.id
  838. where t.uid=#{uid,jdbcType=VARCHAR}
  839. </select>
  840. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  841. select
  842. u.aid,
  843. u.mid,
  844. u.lvl,
  845. ui.id,
  846. ui.uid,
  847. ui.username,
  848. ui.sex,
  849. ui.date_of_birth_year as dateOfBirthYear,
  850. ui.date_of_birth_month as dateOfBirthMonth,
  851. ui.id_number as idNumber,
  852. ui.positive_id_url as positiveIdUrl,
  853. ui.opposite_id_url as oppositeIdUrl,
  854. ui.province,
  855. ui.city,
  856. ui.area,
  857. ui.contact_mobile as contactMobile,
  858. ui.bank_name as bankName,
  859. ui.bank_account as bankAccount,
  860. ui.bank_card_number as bankCardNumber,
  861. ui.amount_money as amountMoney,
  862. ui.audit_status as auditStatus,
  863. ui.payment_date as paymentDate,
  864. ui.expert,
  865. ui.celebrity
  866. from user u
  867. LEFT JOIN user_identity ui on u.id = ui.uid
  868. where u.id = #{uid,jdbcType=VARCHAR}
  869. </select>
  870. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  871. select u.id as uid, i.username
  872. from user u INNER JOIN
  873. user_identity i on u.id = i.uid
  874. where u.lvl = 1
  875. <if test="_parameter != null">
  876. and u.mid = #{aid,jdbcType=VARCHAR}
  877. </if>
  878. </select>
  879. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  880. select u.id as uid, i.username
  881. from user u INNER JOIN
  882. user_identity i on u.id = i.uid
  883. where u.lvl = 1
  884. <if test="_parameter != null">
  885. and u.aid = #{aid,jdbcType=VARCHAR}
  886. </if>
  887. </select>
  888. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  889. select u.id as uid, ui.username, u.mobile
  890. from user u INNER JOIN
  891. user_identity ui on u.id = ui.uid
  892. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  893. <if test="aid != null">
  894. and u.mid = #{aid,jdbcType=VARCHAR}
  895. </if>
  896. </select>
  897. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  898. select u.id as uid, ui.username, u.mobile
  899. from user u INNER JOIN
  900. user_identity ui on u.id = ui.uid
  901. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  902. <if test="aid != null">
  903. and u.aid = #{aid,jdbcType=VARCHAR}
  904. </if>
  905. </select>
  906. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  907. SELECT
  908. u.id as uid, ui.username, u.number,
  909. ui.id as identityId, ui.province,
  910. u.head_portrait_url as personPortraitUrl,
  911. u.introduction as achievementNum,
  912. adc.demand_count as demandNum,
  913. uc.engaged_field as engagedField,
  914. uc.work_unit as workUnit,
  915. ui.professional_title as position,
  916. ui.international
  917. FROM
  918. <![CDATA[ user ]]> u
  919. LEFT JOIN user_identity ui ON ui.uid = u.id
  920. LEFT JOIN user_career uc ON uc.uid = u.id
  921. <!-- LEFT JOIN user_info info ON info.uid = u.id -->
  922. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  923. WHERE
  924. u.type = 0 and ui.expert = 1
  925. <if test="null != level and level==1 ">
  926. AND u.lvl <![CDATA[ >= ]]> 1
  927. </if>
  928. <if test="null !=level and level==0">
  929. AND u.lvl = 0
  930. </if>
  931. <if test="international !=null">
  932. AND ui.international= #{international,jdbcType=INTEGER}
  933. </if>
  934. <if test="province != null">
  935. AND ui.province = #{province,jdbcType=INTEGER}
  936. </if>
  937. <if test="city != null">
  938. AND ui.city = #{city,jdbcType=INTEGER}
  939. </if>
  940. <if test="area != null">
  941. AND ui.area = #{area,jdbcType=INTEGER}
  942. </if>
  943. <if test="field != null">
  944. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  945. </if>
  946. <if test="name != null">
  947. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  948. </if>
  949. ORDER BY
  950. u.number
  951. <if test="page_sql!=null">
  952. ${page_sql}
  953. </if>
  954. </select>
  955. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  956. SELECT
  957. count(1)
  958. FROM
  959. <![CDATA[ user ]]> u
  960. LEFT JOIN user_identity ui ON ui.uid = u.id
  961. LEFT JOIN user_career uc ON uc.uid = u.id
  962. WHERE
  963. u.type = 0 and ui.expert = 1
  964. <if test="null != level and level==1 ">
  965. AND u.lvl <![CDATA[ >= ]]> 1
  966. </if>
  967. <if test="null != level and level==0">
  968. AND u.lvl = 0
  969. </if>
  970. <if test="international !=null">
  971. AND ui.international= #{international,jdbcType=INTEGER}
  972. </if>
  973. <if test="province != null">
  974. AND ui.province = #{province,jdbcType=INTEGER}
  975. </if>
  976. <if test="city != null">
  977. AND ui.city = #{city,jdbcType=INTEGER}
  978. </if>
  979. <if test="area != null">
  980. AND ui.area = #{area,jdbcType=INTEGER}
  981. </if>
  982. <if test="field != null">
  983. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  984. </if>
  985. <if test="name != null">
  986. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  987. </if>
  988. </select>
  989. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  990. select
  991. a.id,
  992. b.username as ownerName,
  993. c.ability_label as abilityLabel,
  994. a.head_portrait_url as personPortraitUrl,
  995. e.education
  996. from user a
  997. left join user_identity b
  998. on a.id = b.uid
  999. left join user_ability c
  1000. on a.id = c.uid
  1001. <!-- left join user_info d
  1002. on a.id = d.uid -->
  1003. left join user_edu e
  1004. on a.id = e.uid
  1005. where 1=1
  1006. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  1007. order by
  1008. a.create_time desc
  1009. limit 0,6
  1010. </select>
  1011. <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
  1012. select t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
  1013. t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1014. from user_identity t left JOIN user u on t.uid = u.id
  1015. left join jpush_easemob_account j on t.uid=j.uid
  1016. left join (select count(0) as x,seller_id from t_order
  1017. where order_status != 4
  1018. group by seller_id ) o on t.uid=o.seller_id
  1019. where t.uid=#{uid,jdbcType=VARCHAR}
  1020. </select>
  1021. <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
  1022. select t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
  1023. u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1024. from user_identity t left JOIN user u on t.uid = u.id
  1025. left join (select count(0) as x,seller_id from t_order
  1026. where order_status != 4
  1027. group by seller_id ) o on t.uid=o.seller_id
  1028. where expert=1
  1029. <if test="industry != null">
  1030. and t.industry = #{industry,jdbcType=VARCHAR}
  1031. </if>
  1032. <if test="page_sql!=null">
  1033. ${page_sql}
  1034. </if>
  1035. </select>
  1036. <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
  1037. select count(0)
  1038. from user u left JOIN user_identity t
  1039. on t.uid = u.id
  1040. where 1=1
  1041. <if test="industry != null">
  1042. and t.industry = #{industry,jdbcType=VARCHAR}
  1043. </if>
  1044. </select>
  1045. <select id="countInterest" resultType="java.lang.Integer">
  1046. select count(0)
  1047. from user_interest
  1048. where to_uid=#{uid,jdbcType=VARCHAR}
  1049. </select>
  1050. <select id= "findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo" >
  1051. select t.uid as id,t.username ,u.head_portrait_url as headPortraitUrl,u.introduction ,t.consultant
  1052. from user_identity t
  1053. left join `user` u on t.uid=u.id
  1054. where t.consultant=1
  1055. <if test="page_sql!=null">
  1056. ${page_sql}
  1057. </if>
  1058. </select>
  1059. <select id = "findConsultantCount" resultType="java.lang.Integer">
  1060. select count(0)
  1061. from user_identity t
  1062. left join `user` u on t.uid=u.id
  1063. where t.consultant=1
  1064. </select>
  1065. <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
  1066. select
  1067. t.uid as id ,t.username ,t.consultant,u.head_portrait_url as headPortraitUrl,u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1068. from user_identity t
  1069. left join user u on t.uid =u.id
  1070. left join jpush_easemob_account j on t.uid=j.uid
  1071. left join (select count(0) as x,seller_id from t_order
  1072. where order_status != 4
  1073. group by seller_id ) o on t.uid=o.seller_id
  1074. where t.consultant = 1
  1075. and t.uid = #{uid,jdbcType=VARCHAR}
  1076. </select>
  1077. </mapper>