UserIdentityMapper.xml 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  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. t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
  826. t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
  827. u.mobile, u.number
  828. from user u left JOIN user_identity t
  829. on t.uid = u.id
  830. where t.uid=#{uid,jdbcType=VARCHAR}
  831. </select>
  832. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  833. select
  834. u.aid,
  835. u.mid,
  836. u.lvl,
  837. ui.id,
  838. ui.uid,
  839. ui.username,
  840. ui.sex,
  841. ui.date_of_birth_year as dateOfBirthYear,
  842. ui.date_of_birth_month as dateOfBirthMonth,
  843. ui.id_number as idNumber,
  844. ui.positive_id_url as positiveIdUrl,
  845. ui.opposite_id_url as oppositeIdUrl,
  846. ui.province,
  847. ui.city,
  848. ui.area,
  849. ui.contact_mobile as contactMobile,
  850. ui.bank_name as bankName,
  851. ui.bank_account as bankAccount,
  852. ui.bank_card_number as bankCardNumber,
  853. ui.amount_money as amountMoney,
  854. ui.audit_status as auditStatus,
  855. ui.payment_date as paymentDate,
  856. ui.expert
  857. from user u
  858. LEFT JOIN user_identity ui on u.id = ui.uid
  859. where u.id = #{uid,jdbcType=VARCHAR}
  860. </select>
  861. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  862. select u.id as uid, i.username
  863. from user u INNER JOIN
  864. user_identity i on u.id = i.uid
  865. where u.lvl = 1
  866. <if test="_parameter != null">
  867. and u.mid = #{aid,jdbcType=VARCHAR}
  868. </if>
  869. </select>
  870. <select id="selectAllUserNames" 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.aid = #{aid,jdbcType=VARCHAR}
  877. </if>
  878. </select>
  879. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  880. select u.id as uid, ui.username, u.mobile
  881. from user u INNER JOIN
  882. user_identity ui on u.id = ui.uid
  883. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  884. <if test="aid != null">
  885. and u.mid = #{aid,jdbcType=VARCHAR}
  886. </if>
  887. </select>
  888. <select id="selectAchievementUserOwner" 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.aid = #{aid,jdbcType=VARCHAR}
  895. </if>
  896. </select>
  897. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  898. SELECT
  899. u.id as uid, u.identify_name as username, u.number,
  900. ui.id as identityId, ui.province,
  901. u.head_portrait_url as personPortraitUrl,
  902. u.introduction as achievementNum,
  903. adc.demand_count as demandNum,
  904. uc.engaged_field as engagedField,
  905. uc.work_unit as workUnit,
  906. ui.professional_title as position,
  907. ui.international,
  908. ep.publish_page,ep.publish_platform,ep.publish_client,ep.if_top,ep.top_number,ep.show_number
  909. FROM
  910. user u
  911. right join expert_publish ep on u.id=ep.expert_id
  912. left join branch_information bi on bi.id=ep.publish_platform
  913. LEFT JOIN user_identity ui ON ui.uid = u.id
  914. LEFT JOIN user_career uc ON uc.uid = u.id
  915. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  916. WHERE
  917. u.type = 0 and ui.expert = 1
  918. and ep.publish_client=0
  919. and ep.publish_page='W02'
  920. and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
  921. <if test="null != level and level==1 ">
  922. AND u.lvl <![CDATA[ >= ]]> 1
  923. </if>
  924. <if test="null !=level and level==0">
  925. AND u.lvl = 0
  926. </if>
  927. <if test="international !=null">
  928. AND ui.international= #{international,jdbcType=INTEGER}
  929. </if>
  930. <if test="province != null">
  931. AND ui.province = #{province,jdbcType=INTEGER}
  932. </if>
  933. <if test="city != null">
  934. AND ui.city = #{city,jdbcType=INTEGER}
  935. </if>
  936. <if test="area != null">
  937. AND ui.area = #{area,jdbcType=INTEGER}
  938. </if>
  939. <if test="field != null">
  940. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  941. </if>
  942. <if test="name != null">
  943. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  944. </if>
  945. order by ep.if_top,ep.top_number,ep.show_number,u.number asc
  946. <if test="page_sql!=null">
  947. ${page_sql}
  948. </if>
  949. </select>
  950. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  951. SELECT
  952. count(1)
  953. FROM
  954. <![CDATA[ user ]]> u
  955. right join expert_publish ep on u.id=ep.expert_id
  956. LEFT JOIN user_identity ui ON ui.uid = u.id
  957. LEFT JOIN user_career uc ON uc.uid = u.id
  958. <!-- LEFT JOIN user_info info ON info.uid = u.id -->
  959. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  960. WHERE
  961. u.type = 0 and ui.expert = 1
  962. and ep.publish_client=0
  963. and ep.publish_page='W02'
  964. and ep.publish_platform='112461d9-2120-4809-b709-3cb5f5acfcc3'
  965. <if test="null != level and level==1 ">
  966. AND u.lvl <![CDATA[ >= ]]> 1
  967. </if>
  968. <if test="null != level and level==0">
  969. AND u.lvl = 0
  970. </if>
  971. <if test="international !=null">
  972. AND ui.international= #{international,jdbcType=INTEGER}
  973. </if>
  974. <if test="province != null">
  975. AND ui.province = #{province,jdbcType=INTEGER}
  976. </if>
  977. <if test="city != null">
  978. AND ui.city = #{city,jdbcType=INTEGER}
  979. </if>
  980. <if test="area != null">
  981. AND ui.area = #{area,jdbcType=INTEGER}
  982. </if>
  983. <if test="field != null">
  984. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  985. </if>
  986. <if test="name != null">
  987. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  988. </if>
  989. </select>
  990. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  991. select
  992. a.id,
  993. b.username as ownerName,
  994. c.ability_label as abilityLabel,
  995. a.head_portrait_url as personPortraitUrl,
  996. e.education
  997. from user a
  998. left join user_identity b
  999. on a.id = b.uid
  1000. left join user_ability c
  1001. on a.id = c.uid
  1002. <!-- left join user_info d
  1003. on a.id = d.uid -->
  1004. left join user_edu e
  1005. on a.id = e.uid
  1006. where 1=1
  1007. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  1008. order by
  1009. a.create_time desc
  1010. limit 0,6
  1011. </select>
  1012. <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
  1013. select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
  1014. t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1015. from user_identity t left JOIN user u on t.uid = u.id
  1016. left join jpush_easemob_account j on t.uid=j.uid
  1017. left join (select count(0) as x,seller_id from t_order
  1018. where order_status != 4
  1019. group by seller_id ) o on t.uid=o.seller_id
  1020. where t.expert=1
  1021. and t.uid=#{uid,jdbcType=VARCHAR}
  1022. </select>
  1023. <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
  1024. 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,
  1025. u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1026. from user_identity t left JOIN user u on t.uid = u.id
  1027. left join (select count(0) as x,seller_id from t_order
  1028. where order_status != 4
  1029. group by seller_id ) o on t.uid=o.seller_id
  1030. where expert=1
  1031. and u.status !=1
  1032. and t.audit_status =2
  1033. <if test="industry != null">
  1034. and t.industry = #{industry,jdbcType=VARCHAR}
  1035. </if>
  1036. <if test="name != null">
  1037. and u.nickname like concat('%',#{name},'%')
  1038. </if>
  1039. <if test="page_sql!=null">
  1040. ${page_sql}
  1041. </if>
  1042. </select>
  1043. <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
  1044. select count(0)
  1045. from user_identity t left JOIN user u on t.uid = u.id
  1046. left join (select count(0) as x,seller_id from t_order
  1047. where order_status != 4
  1048. group by seller_id ) o on t.uid=o.seller_id
  1049. where expert=1
  1050. and u.status !=1
  1051. <if test="industry != null">
  1052. and t.industry = #{industry,jdbcType=VARCHAR}
  1053. </if>
  1054. <if test="name != null">
  1055. and u.nickname like concat('%',#{name},'%')
  1056. </if>
  1057. </select>
  1058. <select id="countInterest" resultType="java.lang.Integer">
  1059. select count(0)
  1060. from user_interest
  1061. where to_uid=#{uid,jdbcType=VARCHAR}
  1062. </select>
  1063. <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
  1064. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1065. t.expert as consultant,ifnull(x.n,0) as reservationCount
  1066. from user_identity t
  1067. left join `user` u on t.uid=u.id
  1068. left join ( select y.x as n, y.seller_id
  1069. from (select count( 0 ) as x,seller_id from t_order
  1070. where order_status != 4
  1071. group by seller_id)y)x on t.uid=x.seller_id
  1072. where t.expert=2
  1073. <if test="page_sql!=null">
  1074. ${page_sql}
  1075. </if>
  1076. </select>
  1077. <select id="findConsultantCount" resultType="java.lang.Integer">
  1078. select count(0)
  1079. from user_identity t
  1080. left join `user` u on t.uid=u.id
  1081. where t.expert=2
  1082. </select>
  1083. <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
  1084. select
  1085. t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
  1086. u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1087. from user_identity t
  1088. left join user u on t.uid =u.id
  1089. left join jpush_easemob_account j on t.uid=j.uid
  1090. left join (select count(0) as x,seller_id from t_order
  1091. where order_status != 4
  1092. group by seller_id ) o on t.uid=o.seller_id
  1093. where t.expert=2
  1094. and t.uid = #{uid,jdbcType=VARCHAR}
  1095. </select>
  1096. <select id="getAppHomeRecommended" resultType="com.goafanti.user.bo.UserIdentityRecommended">
  1097. select
  1098. ep.expert_id as id, u.identify_name as name, ui.work_unit as workUnit ,ui.professional_title as professionalTitle, u.introduction as introduction,
  1099. u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1100. from expert_publish ep
  1101. left join user_identity ui on ep.expert_id = ui.uid
  1102. left join user u on ep.expert_id = u.id
  1103. left join (select count(0) as x,seller_id from t_order
  1104. where order_status != 4
  1105. group by seller_id ) o on ep.expert_id=o.seller_id
  1106. where
  1107. ep.publish_client = '1'
  1108. and ep.publish_page = 'W01'
  1109. order by
  1110. ep.if_top, ep.top_number, ep.show_number asc
  1111. limit 0,6
  1112. </select>
  1113. </mapper>