UserIdentityMapper.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908
  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 Sat Nov 25 15:28:31 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. </resultMap>
  43. <sql id="Example_Where_Clause">
  44. <!--
  45. WARNING - @mbg.generated
  46. This element is automatically generated by MyBatis Generator, do not modify.
  47. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  48. -->
  49. <where>
  50. <foreach collection="oredCriteria" item="criteria" separator="or">
  51. <if test="criteria.valid">
  52. <trim prefix="(" prefixOverrides="and" suffix=")">
  53. <foreach collection="criteria.criteria" item="criterion">
  54. <choose>
  55. <when test="criterion.noValue">
  56. and ${criterion.condition}
  57. </when>
  58. <when test="criterion.singleValue">
  59. and ${criterion.condition} #{criterion.value}
  60. </when>
  61. <when test="criterion.betweenValue">
  62. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  63. </when>
  64. <when test="criterion.listValue">
  65. and ${criterion.condition}
  66. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  67. #{listItem}
  68. </foreach>
  69. </when>
  70. </choose>
  71. </foreach>
  72. </trim>
  73. </if>
  74. </foreach>
  75. </where>
  76. </sql>
  77. <sql id="Update_By_Example_Where_Clause">
  78. <!--
  79. WARNING - @mbg.generated
  80. This element is automatically generated by MyBatis Generator, do not modify.
  81. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  82. -->
  83. <where>
  84. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  85. <if test="criteria.valid">
  86. <trim prefix="(" prefixOverrides="and" suffix=")">
  87. <foreach collection="criteria.criteria" item="criterion">
  88. <choose>
  89. <when test="criterion.noValue">
  90. and ${criterion.condition}
  91. </when>
  92. <when test="criterion.singleValue">
  93. and ${criterion.condition} #{criterion.value}
  94. </when>
  95. <when test="criterion.betweenValue">
  96. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  97. </when>
  98. <when test="criterion.listValue">
  99. and ${criterion.condition}
  100. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  101. #{listItem}
  102. </foreach>
  103. </when>
  104. </choose>
  105. </foreach>
  106. </trim>
  107. </if>
  108. </foreach>
  109. </where>
  110. </sql>
  111. <sql id="Base_Column_List">
  112. <!--
  113. WARNING - @mbg.generated
  114. This element is automatically generated by MyBatis Generator, do not modify.
  115. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  116. -->
  117. id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
  118. opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number,
  119. amount_money, audit_status, process, wrong_count, payment_date, expert, celebrity,
  120. international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
  121. contacts, email
  122. </sql>
  123. <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
  124. <!--
  125. WARNING - @mbg.generated
  126. This element is automatically generated by MyBatis Generator, do not modify.
  127. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  128. -->
  129. select
  130. <if test="distinct">
  131. distinct
  132. </if>
  133. <include refid="Base_Column_List" />
  134. from user_identity
  135. <if test="_parameter != null">
  136. <include refid="Example_Where_Clause" />
  137. </if>
  138. <if test="orderByClause != null">
  139. order by ${orderByClause}
  140. </if>
  141. </select>
  142. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  143. <!--
  144. WARNING - @mbg.generated
  145. This element is automatically generated by MyBatis Generator, do not modify.
  146. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  147. -->
  148. select
  149. <include refid="Base_Column_List" />
  150. from user_identity
  151. where id = #{id,jdbcType=VARCHAR}
  152. </select>
  153. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  154. <!--
  155. WARNING - @mbg.generated
  156. This element is automatically generated by MyBatis Generator, do not modify.
  157. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  158. -->
  159. delete from user_identity
  160. where id = #{id,jdbcType=VARCHAR}
  161. </delete>
  162. <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserIdentityExample">
  163. <!--
  164. WARNING - @mbg.generated
  165. This element is automatically generated by MyBatis Generator, do not modify.
  166. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  167. -->
  168. delete from user_identity
  169. <if test="_parameter != null">
  170. <include refid="Example_Where_Clause" />
  171. </if>
  172. </delete>
  173. <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity">
  174. <!--
  175. WARNING - @mbg.generated
  176. This element is automatically generated by MyBatis Generator, do not modify.
  177. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  178. -->
  179. insert into user_identity (id, uid, username,
  180. sex, date_of_birth_year, date_of_birth_month,
  181. id_number, positive_id_url, opposite_id_url,
  182. province, city, area,
  183. contact_mobile, bank_name, bank_account,
  184. bank_card_number, amount_money, audit_status,
  185. process, wrong_count, payment_date,
  186. expert, celebrity, international,
  187. fixed_tel, qq, postal_address,
  188. postcode, review_instructions, industry,
  189. contacts, email)
  190. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  191. #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
  192. #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
  193. #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
  194. #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
  195. #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER},
  196. #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
  197. #{expert,jdbcType=INTEGER}, #{celebrity,jdbcType=INTEGER}, #{international,jdbcType=INTEGER},
  198. #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
  199. #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
  200. #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR})
  201. </insert>
  202. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
  203. <!--
  204. WARNING - @mbg.generated
  205. This element is automatically generated by MyBatis Generator, do not modify.
  206. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  207. -->
  208. insert into user_identity
  209. <trim prefix="(" suffix=")" suffixOverrides=",">
  210. <if test="id != null">
  211. id,
  212. </if>
  213. <if test="uid != null">
  214. uid,
  215. </if>
  216. <if test="username != null">
  217. username,
  218. </if>
  219. <if test="sex != null">
  220. sex,
  221. </if>
  222. <if test="dateOfBirthYear != null">
  223. date_of_birth_year,
  224. </if>
  225. <if test="dateOfBirthMonth != null">
  226. date_of_birth_month,
  227. </if>
  228. <if test="idNumber != null">
  229. id_number,
  230. </if>
  231. <if test="positiveIdUrl != null">
  232. positive_id_url,
  233. </if>
  234. <if test="oppositeIdUrl != null">
  235. opposite_id_url,
  236. </if>
  237. <if test="province != null">
  238. province,
  239. </if>
  240. <if test="city != null">
  241. city,
  242. </if>
  243. <if test="area != null">
  244. area,
  245. </if>
  246. <if test="contactMobile != null">
  247. contact_mobile,
  248. </if>
  249. <if test="bankName != null">
  250. bank_name,
  251. </if>
  252. <if test="bankAccount != null">
  253. bank_account,
  254. </if>
  255. <if test="bankCardNumber != null">
  256. bank_card_number,
  257. </if>
  258. <if test="amountMoney != null">
  259. amount_money,
  260. </if>
  261. <if test="auditStatus != null">
  262. audit_status,
  263. </if>
  264. <if test="process != null">
  265. process,
  266. </if>
  267. <if test="wrongCount != null">
  268. wrong_count,
  269. </if>
  270. <if test="paymentDate != null">
  271. payment_date,
  272. </if>
  273. <if test="expert != null">
  274. expert,
  275. </if>
  276. <if test="celebrity != null">
  277. celebrity,
  278. </if>
  279. <if test="international != null">
  280. international,
  281. </if>
  282. <if test="fixedTel != null">
  283. fixed_tel,
  284. </if>
  285. <if test="qq != null">
  286. qq,
  287. </if>
  288. <if test="postalAddress != null">
  289. postal_address,
  290. </if>
  291. <if test="postcode != null">
  292. postcode,
  293. </if>
  294. <if test="reviewInstructions != null">
  295. review_instructions,
  296. </if>
  297. <if test="industry != null">
  298. industry,
  299. </if>
  300. <if test="contacts != null">
  301. contacts,
  302. </if>
  303. <if test="email != null">
  304. email,
  305. </if>
  306. </trim>
  307. <trim prefix="values (" suffix=")" suffixOverrides=",">
  308. <if test="id != null">
  309. #{id,jdbcType=VARCHAR},
  310. </if>
  311. <if test="uid != null">
  312. #{uid,jdbcType=VARCHAR},
  313. </if>
  314. <if test="username != null">
  315. #{username,jdbcType=VARCHAR},
  316. </if>
  317. <if test="sex != null">
  318. #{sex,jdbcType=VARCHAR},
  319. </if>
  320. <if test="dateOfBirthYear != null">
  321. #{dateOfBirthYear,jdbcType=VARCHAR},
  322. </if>
  323. <if test="dateOfBirthMonth != null">
  324. #{dateOfBirthMonth,jdbcType=VARCHAR},
  325. </if>
  326. <if test="idNumber != null">
  327. #{idNumber,jdbcType=VARCHAR},
  328. </if>
  329. <if test="positiveIdUrl != null">
  330. #{positiveIdUrl,jdbcType=VARCHAR},
  331. </if>
  332. <if test="oppositeIdUrl != null">
  333. #{oppositeIdUrl,jdbcType=VARCHAR},
  334. </if>
  335. <if test="province != null">
  336. #{province,jdbcType=INTEGER},
  337. </if>
  338. <if test="city != null">
  339. #{city,jdbcType=INTEGER},
  340. </if>
  341. <if test="area != null">
  342. #{area,jdbcType=INTEGER},
  343. </if>
  344. <if test="contactMobile != null">
  345. #{contactMobile,jdbcType=VARCHAR},
  346. </if>
  347. <if test="bankName != null">
  348. #{bankName,jdbcType=VARCHAR},
  349. </if>
  350. <if test="bankAccount != null">
  351. #{bankAccount,jdbcType=VARCHAR},
  352. </if>
  353. <if test="bankCardNumber != null">
  354. #{bankCardNumber,jdbcType=VARCHAR},
  355. </if>
  356. <if test="amountMoney != null">
  357. #{amountMoney,jdbcType=DECIMAL},
  358. </if>
  359. <if test="auditStatus != null">
  360. #{auditStatus,jdbcType=INTEGER},
  361. </if>
  362. <if test="process != null">
  363. #{process,jdbcType=INTEGER},
  364. </if>
  365. <if test="wrongCount != null">
  366. #{wrongCount,jdbcType=INTEGER},
  367. </if>
  368. <if test="paymentDate != null">
  369. #{paymentDate,jdbcType=TIMESTAMP},
  370. </if>
  371. <if test="expert != null">
  372. #{expert,jdbcType=INTEGER},
  373. </if>
  374. <if test="celebrity != null">
  375. #{celebrity,jdbcType=INTEGER},
  376. </if>
  377. <if test="international != null">
  378. #{international,jdbcType=INTEGER},
  379. </if>
  380. <if test="fixedTel != null">
  381. #{fixedTel,jdbcType=VARCHAR},
  382. </if>
  383. <if test="qq != null">
  384. #{qq,jdbcType=VARCHAR},
  385. </if>
  386. <if test="postalAddress != null">
  387. #{postalAddress,jdbcType=VARCHAR},
  388. </if>
  389. <if test="postcode != null">
  390. #{postcode,jdbcType=VARCHAR},
  391. </if>
  392. <if test="reviewInstructions != null">
  393. #{reviewInstructions,jdbcType=VARCHAR},
  394. </if>
  395. <if test="industry != null">
  396. #{industry,jdbcType=INTEGER},
  397. </if>
  398. <if test="contacts != null">
  399. #{contacts,jdbcType=VARCHAR},
  400. </if>
  401. <if test="email != null">
  402. #{email,jdbcType=VARCHAR},
  403. </if>
  404. </trim>
  405. </insert>
  406. <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
  407. <!--
  408. WARNING - @mbg.generated
  409. This element is automatically generated by MyBatis Generator, do not modify.
  410. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  411. -->
  412. select count(*) from user_identity
  413. <if test="_parameter != null">
  414. <include refid="Example_Where_Clause" />
  415. </if>
  416. </select>
  417. <update id="updateByExampleSelective" parameterType="map">
  418. <!--
  419. WARNING - @mbg.generated
  420. This element is automatically generated by MyBatis Generator, do not modify.
  421. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  422. -->
  423. update user_identity
  424. <set>
  425. <if test="record.id != null">
  426. id = #{record.id,jdbcType=VARCHAR},
  427. </if>
  428. <if test="record.uid != null">
  429. uid = #{record.uid,jdbcType=VARCHAR},
  430. </if>
  431. <if test="record.username != null">
  432. username = #{record.username,jdbcType=VARCHAR},
  433. </if>
  434. <if test="record.sex != null">
  435. sex = #{record.sex,jdbcType=VARCHAR},
  436. </if>
  437. <if test="record.dateOfBirthYear != null">
  438. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  439. </if>
  440. <if test="record.dateOfBirthMonth != null">
  441. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  442. </if>
  443. <if test="record.idNumber != null">
  444. id_number = #{record.idNumber,jdbcType=VARCHAR},
  445. </if>
  446. <if test="record.positiveIdUrl != null">
  447. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  448. </if>
  449. <if test="record.oppositeIdUrl != null">
  450. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  451. </if>
  452. <if test="record.province != null">
  453. province = #{record.province,jdbcType=INTEGER},
  454. </if>
  455. <if test="record.city != null">
  456. city = #{record.city,jdbcType=INTEGER},
  457. </if>
  458. <if test="record.area != null">
  459. area = #{record.area,jdbcType=INTEGER},
  460. </if>
  461. <if test="record.contactMobile != null">
  462. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  463. </if>
  464. <if test="record.bankName != null">
  465. bank_name = #{record.bankName,jdbcType=VARCHAR},
  466. </if>
  467. <if test="record.bankAccount != null">
  468. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  469. </if>
  470. <if test="record.bankCardNumber != null">
  471. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  472. </if>
  473. <if test="record.amountMoney != null">
  474. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  475. </if>
  476. <if test="record.auditStatus != null">
  477. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  478. </if>
  479. <if test="record.process != null">
  480. process = #{record.process,jdbcType=INTEGER},
  481. </if>
  482. <if test="record.wrongCount != null">
  483. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  484. </if>
  485. <if test="record.paymentDate != null">
  486. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  487. </if>
  488. <if test="record.expert != null">
  489. expert = #{record.expert,jdbcType=INTEGER},
  490. </if>
  491. <if test="record.celebrity != null">
  492. celebrity = #{record.celebrity,jdbcType=INTEGER},
  493. </if>
  494. <if test="record.international != null">
  495. international = #{record.international,jdbcType=INTEGER},
  496. </if>
  497. <if test="record.fixedTel != null">
  498. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.qq != null">
  501. qq = #{record.qq,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.postalAddress != null">
  504. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  505. </if>
  506. <if test="record.postcode != null">
  507. postcode = #{record.postcode,jdbcType=VARCHAR},
  508. </if>
  509. <if test="record.reviewInstructions != null">
  510. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  511. </if>
  512. <if test="record.industry != null">
  513. industry = #{record.industry,jdbcType=INTEGER},
  514. </if>
  515. <if test="record.contacts != null">
  516. contacts = #{record.contacts,jdbcType=VARCHAR},
  517. </if>
  518. <if test="record.email != null">
  519. email = #{record.email,jdbcType=VARCHAR},
  520. </if>
  521. </set>
  522. <if test="_parameter != null">
  523. <include refid="Update_By_Example_Where_Clause" />
  524. </if>
  525. </update>
  526. <update id="updateByExample" parameterType="map">
  527. <!--
  528. WARNING - @mbg.generated
  529. This element is automatically generated by MyBatis Generator, do not modify.
  530. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  531. -->
  532. update user_identity
  533. set id = #{record.id,jdbcType=VARCHAR},
  534. uid = #{record.uid,jdbcType=VARCHAR},
  535. username = #{record.username,jdbcType=VARCHAR},
  536. sex = #{record.sex,jdbcType=VARCHAR},
  537. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  538. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  539. id_number = #{record.idNumber,jdbcType=VARCHAR},
  540. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  541. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  542. province = #{record.province,jdbcType=INTEGER},
  543. city = #{record.city,jdbcType=INTEGER},
  544. area = #{record.area,jdbcType=INTEGER},
  545. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  546. bank_name = #{record.bankName,jdbcType=VARCHAR},
  547. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  548. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  549. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  550. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  551. process = #{record.process,jdbcType=INTEGER},
  552. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  553. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  554. expert = #{record.expert,jdbcType=INTEGER},
  555. celebrity = #{record.celebrity,jdbcType=INTEGER},
  556. international = #{record.international,jdbcType=INTEGER},
  557. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  558. qq = #{record.qq,jdbcType=VARCHAR},
  559. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  560. postcode = #{record.postcode,jdbcType=VARCHAR},
  561. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  562. industry = #{record.industry,jdbcType=INTEGER},
  563. contacts = #{record.contacts,jdbcType=VARCHAR},
  564. email = #{record.email,jdbcType=VARCHAR}
  565. <if test="_parameter != null">
  566. <include refid="Update_By_Example_Where_Clause" />
  567. </if>
  568. </update>
  569. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
  570. <!--
  571. WARNING - @mbg.generated
  572. This element is automatically generated by MyBatis Generator, do not modify.
  573. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  574. -->
  575. update user_identity
  576. <set>
  577. <if test="uid != null">
  578. uid = #{uid,jdbcType=VARCHAR},
  579. </if>
  580. <if test="username != null">
  581. username = #{username,jdbcType=VARCHAR},
  582. </if>
  583. <if test="sex != null">
  584. sex = #{sex,jdbcType=VARCHAR},
  585. </if>
  586. <if test="dateOfBirthYear != null">
  587. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  588. </if>
  589. <if test="dateOfBirthMonth != null">
  590. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  591. </if>
  592. <if test="idNumber != null">
  593. id_number = #{idNumber,jdbcType=VARCHAR},
  594. </if>
  595. <if test="positiveIdUrl != null">
  596. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  597. </if>
  598. <if test="oppositeIdUrl != null">
  599. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  600. </if>
  601. <if test="province != null">
  602. province = #{province,jdbcType=INTEGER},
  603. </if>
  604. <if test="city != null">
  605. city = #{city,jdbcType=INTEGER},
  606. </if>
  607. <if test="area != null">
  608. area = #{area,jdbcType=INTEGER},
  609. </if>
  610. <if test="contactMobile != null">
  611. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  612. </if>
  613. <if test="bankName != null">
  614. bank_name = #{bankName,jdbcType=VARCHAR},
  615. </if>
  616. <if test="bankAccount != null">
  617. bank_account = #{bankAccount,jdbcType=VARCHAR},
  618. </if>
  619. <if test="bankCardNumber != null">
  620. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  621. </if>
  622. <if test="amountMoney != null">
  623. amount_money = #{amountMoney,jdbcType=DECIMAL},
  624. </if>
  625. <if test="auditStatus != null">
  626. audit_status = #{auditStatus,jdbcType=INTEGER},
  627. </if>
  628. <if test="process != null">
  629. process = #{process,jdbcType=INTEGER},
  630. </if>
  631. <if test="wrongCount != null">
  632. wrong_count = #{wrongCount,jdbcType=INTEGER},
  633. </if>
  634. <if test="paymentDate != null">
  635. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  636. </if>
  637. <if test="expert != null">
  638. expert = #{expert,jdbcType=INTEGER},
  639. </if>
  640. <if test="celebrity != null">
  641. celebrity = #{celebrity,jdbcType=INTEGER},
  642. </if>
  643. <if test="international != null">
  644. international = #{international,jdbcType=INTEGER},
  645. </if>
  646. <if test="fixedTel != null">
  647. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  648. </if>
  649. <if test="qq != null">
  650. qq = #{qq,jdbcType=VARCHAR},
  651. </if>
  652. <if test="postalAddress != null">
  653. postal_address = #{postalAddress,jdbcType=VARCHAR},
  654. </if>
  655. <if test="postcode != null">
  656. postcode = #{postcode,jdbcType=VARCHAR},
  657. </if>
  658. <if test="reviewInstructions != null">
  659. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  660. </if>
  661. <if test="industry != null">
  662. industry = #{industry,jdbcType=INTEGER},
  663. </if>
  664. <if test="contacts != null">
  665. contacts = #{contacts,jdbcType=VARCHAR},
  666. </if>
  667. <if test="email != null">
  668. email = #{email,jdbcType=VARCHAR},
  669. </if>
  670. </set>
  671. where id = #{id,jdbcType=VARCHAR}
  672. </update>
  673. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
  674. <!--
  675. WARNING - @mbg.generated
  676. This element is automatically generated by MyBatis Generator, do not modify.
  677. This element was generated on Sat Nov 25 15:28:31 CST 2017.
  678. -->
  679. update user_identity
  680. set uid = #{uid,jdbcType=VARCHAR},
  681. username = #{username,jdbcType=VARCHAR},
  682. sex = #{sex,jdbcType=VARCHAR},
  683. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  684. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  685. id_number = #{idNumber,jdbcType=VARCHAR},
  686. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  687. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  688. province = #{province,jdbcType=INTEGER},
  689. city = #{city,jdbcType=INTEGER},
  690. area = #{area,jdbcType=INTEGER},
  691. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  692. bank_name = #{bankName,jdbcType=VARCHAR},
  693. bank_account = #{bankAccount,jdbcType=VARCHAR},
  694. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  695. amount_money = #{amountMoney,jdbcType=DECIMAL},
  696. audit_status = #{auditStatus,jdbcType=INTEGER},
  697. process = #{process,jdbcType=INTEGER},
  698. wrong_count = #{wrongCount,jdbcType=INTEGER},
  699. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  700. expert = #{expert,jdbcType=INTEGER},
  701. celebrity = #{celebrity,jdbcType=INTEGER},
  702. international = #{international,jdbcType=INTEGER},
  703. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  704. qq = #{qq,jdbcType=VARCHAR},
  705. postal_address = #{postalAddress,jdbcType=VARCHAR},
  706. postcode = #{postcode,jdbcType=VARCHAR},
  707. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  708. industry = #{industry,jdbcType=INTEGER},
  709. contacts = #{contacts,jdbcType=VARCHAR},
  710. email = #{email,jdbcType=VARCHAR}
  711. where id = #{id,jdbcType=VARCHAR}
  712. </update>
  713. <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  714. select
  715. <include refid="Base_Column_List" />
  716. from user_identity
  717. where uid = #{uid,jdbcType=VARCHAR}
  718. </select>
  719. <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
  720. select
  721. t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
  722. t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
  723. u.mobile, u.number from user u left JOIN user_identity t
  724. on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
  725. </select>
  726. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  727. select
  728. u.aid,
  729. u.mid,
  730. u.lvl,
  731. ui.id,
  732. ui.uid,
  733. ui.username,
  734. ui.sex,
  735. ui.date_of_birth_year as dateOfBirthYear,
  736. ui.date_of_birth_month as dateOfBirthMonth,
  737. ui.id_number as idNumber,
  738. ui.positive_id_url as positiveIdUrl,
  739. ui.opposite_id_url as oppositeIdUrl,
  740. ui.province,
  741. ui.city,
  742. ui.area,
  743. ui.contact_mobile as contactMobile,
  744. ui.bank_name as bankName,
  745. ui.bank_account as bankAccount,
  746. ui.bank_card_number as bankCardNumber,
  747. ui.amount_money as amountMoney,
  748. ui.audit_status as auditStatus,
  749. ui.payment_date as paymentDate,
  750. ui.expert,
  751. ui.celebrity
  752. from user u
  753. LEFT JOIN user_identity ui on u.id = ui.uid
  754. where u.id = #{uid,jdbcType=VARCHAR}
  755. </select>
  756. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  757. select u.id as uid, i.username
  758. from user u INNER JOIN
  759. user_identity i on u.id = i.uid
  760. where u.lvl = 1
  761. <if test="_parameter != null">
  762. and u.mid = #{aid,jdbcType=VARCHAR}
  763. </if>
  764. </select>
  765. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  766. select u.id as uid, i.username
  767. from user u INNER JOIN
  768. user_identity i on u.id = i.uid
  769. where u.lvl = 1
  770. <if test="_parameter != null">
  771. and u.aid = #{aid,jdbcType=VARCHAR}
  772. </if>
  773. </select>
  774. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  775. select u.id as uid, ui.username, u.mobile
  776. from user u INNER JOIN
  777. user_identity ui on u.id = ui.uid
  778. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  779. <if test="aid != null">
  780. and u.mid = #{aid,jdbcType=VARCHAR}
  781. </if>
  782. </select>
  783. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  784. select u.id as uid, ui.username, u.mobile
  785. from user u INNER JOIN
  786. user_identity ui on u.id = ui.uid
  787. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  788. <if test="aid != null">
  789. and u.aid = #{aid,jdbcType=VARCHAR}
  790. </if>
  791. </select>
  792. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  793. SELECT
  794. u.id as uid, ui.username, u.number,
  795. ui.id as identityId, ui.province,
  796. u.head_portrait_url as personPortraitUrl,
  797. adc.achievement_count as achievementNum,
  798. adc.demand_count as demandNum,
  799. uc.engaged_field as engagedField,
  800. uc.work_unit as workUnit,
  801. uc.position,
  802. ui.international
  803. FROM
  804. <![CDATA[ user ]]> u
  805. LEFT JOIN user_identity ui ON ui.uid = u.id
  806. LEFT JOIN user_career uc ON uc.uid = u.id
  807. <!-- LEFT JOIN user_info info ON info.uid = u.id -->
  808. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  809. WHERE
  810. u.type = 0 and ui.expert = 1
  811. <if test="null != level and level==1 ">
  812. AND u.lvl <![CDATA[ >= ]]> 1
  813. </if>
  814. <if test="null !=level and level==0">
  815. AND u.lvl = 0
  816. </if>
  817. <if test="international !=null">
  818. AND ui.international= #{international,jdbcType=INTEGER}
  819. </if>
  820. <if test="province != null">
  821. AND ui.province = #{province,jdbcType=INTEGER}
  822. </if>
  823. <if test="city != null">
  824. AND ui.city = #{city,jdbcType=INTEGER}
  825. </if>
  826. <if test="area != null">
  827. AND ui.area = #{area,jdbcType=INTEGER}
  828. </if>
  829. <if test="field != null">
  830. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  831. </if>
  832. <if test="name != null">
  833. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  834. </if>
  835. ORDER BY
  836. u.number
  837. <if test="page_sql!=null">
  838. ${page_sql}
  839. </if>
  840. </select>
  841. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  842. SELECT
  843. count(1)
  844. FROM
  845. <![CDATA[ user ]]> u
  846. LEFT JOIN user_identity ui ON ui.uid = u.id
  847. LEFT JOIN user_career uc ON uc.uid = u.id
  848. WHERE
  849. u.type = 0 and ui.expert = 1
  850. <if test="null != level and level==1 ">
  851. AND u.lvl <![CDATA[ >= ]]> 1
  852. </if>
  853. <if test="null != level and level==0">
  854. AND u.lvl = 0
  855. </if>
  856. <if test="international !=null">
  857. AND ui.international= #{international,jdbcType=INTEGER}
  858. </if>
  859. <if test="province != null">
  860. AND ui.province = #{province,jdbcType=INTEGER}
  861. </if>
  862. <if test="city != null">
  863. AND ui.city = #{city,jdbcType=INTEGER}
  864. </if>
  865. <if test="area != null">
  866. AND ui.area = #{area,jdbcType=INTEGER}
  867. </if>
  868. <if test="field != null">
  869. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  870. </if>
  871. <if test="name != null">
  872. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  873. </if>
  874. </select>
  875. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  876. select
  877. a.id,
  878. b.username as ownerName,
  879. c.ability_label as abilityLabel,
  880. a.head_portrait_url personPortraitUrl,
  881. e.education
  882. from user a
  883. left join user_identity b
  884. on a.id = b.uid
  885. left join user_ability c
  886. on a.id = c.uid
  887. <!-- left join user_info d
  888. on a.id = d.uid -->
  889. left join user_edu e
  890. on a.id = e.uid
  891. where 1=1
  892. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  893. order by
  894. a.create_time desc
  895. limit 0,6
  896. </select>
  897. </mapper>