UserIdentityMapper.xml 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  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 Thu Nov 30 17:32:28 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. </resultMap>
  49. <sql id="Example_Where_Clause">
  50. <!--
  51. WARNING - @mbg.generated
  52. This element is automatically generated by MyBatis Generator, do not modify.
  53. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  54. -->
  55. <where>
  56. <foreach collection="oredCriteria" item="criteria" separator="or">
  57. <if test="criteria.valid">
  58. <trim prefix="(" prefixOverrides="and" suffix=")">
  59. <foreach collection="criteria.criteria" item="criterion">
  60. <choose>
  61. <when test="criterion.noValue">
  62. and ${criterion.condition}
  63. </when>
  64. <when test="criterion.singleValue">
  65. and ${criterion.condition} #{criterion.value}
  66. </when>
  67. <when test="criterion.betweenValue">
  68. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  69. </when>
  70. <when test="criterion.listValue">
  71. and ${criterion.condition}
  72. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  73. #{listItem}
  74. </foreach>
  75. </when>
  76. </choose>
  77. </foreach>
  78. </trim>
  79. </if>
  80. </foreach>
  81. </where>
  82. </sql>
  83. <sql id="Update_By_Example_Where_Clause">
  84. <!--
  85. WARNING - @mbg.generated
  86. This element is automatically generated by MyBatis Generator, do not modify.
  87. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  88. -->
  89. <where>
  90. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  91. <if test="criteria.valid">
  92. <trim prefix="(" prefixOverrides="and" suffix=")">
  93. <foreach collection="criteria.criteria" item="criterion">
  94. <choose>
  95. <when test="criterion.noValue">
  96. and ${criterion.condition}
  97. </when>
  98. <when test="criterion.singleValue">
  99. and ${criterion.condition} #{criterion.value}
  100. </when>
  101. <when test="criterion.betweenValue">
  102. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  103. </when>
  104. <when test="criterion.listValue">
  105. and ${criterion.condition}
  106. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  107. #{listItem}
  108. </foreach>
  109. </when>
  110. </choose>
  111. </foreach>
  112. </trim>
  113. </if>
  114. </foreach>
  115. </where>
  116. </sql>
  117. <sql id="Base_Column_List">
  118. <!--
  119. WARNING - @mbg.generated
  120. This element is automatically generated by MyBatis Generator, do not modify.
  121. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  122. -->
  123. id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
  124. opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number,
  125. amount_money, audit_status, process, wrong_count, payment_date, expert, celebrity,
  126. international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
  127. contacts, email, professional_title, work_unit, education, major_category, qualification,
  128. investment
  129. </sql>
  130. <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
  131. <!--
  132. WARNING - @mbg.generated
  133. This element is automatically generated by MyBatis Generator, do not modify.
  134. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  135. -->
  136. select
  137. <if test="distinct">
  138. distinct
  139. </if>
  140. <include refid="Base_Column_List" />
  141. from user_identity
  142. <if test="_parameter != null">
  143. <include refid="Example_Where_Clause" />
  144. </if>
  145. <if test="orderByClause != null">
  146. order by ${orderByClause}
  147. </if>
  148. </select>
  149. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  150. <!--
  151. WARNING - @mbg.generated
  152. This element is automatically generated by MyBatis Generator, do not modify.
  153. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  154. -->
  155. select
  156. <include refid="Base_Column_List" />
  157. from user_identity
  158. where id = #{id,jdbcType=VARCHAR}
  159. </select>
  160. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  161. <!--
  162. WARNING - @mbg.generated
  163. This element is automatically generated by MyBatis Generator, do not modify.
  164. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  165. -->
  166. delete from user_identity
  167. where id = #{id,jdbcType=VARCHAR}
  168. </delete>
  169. <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserIdentityExample">
  170. <!--
  171. WARNING - @mbg.generated
  172. This element is automatically generated by MyBatis Generator, do not modify.
  173. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  174. -->
  175. delete from user_identity
  176. <if test="_parameter != null">
  177. <include refid="Example_Where_Clause" />
  178. </if>
  179. </delete>
  180. <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity">
  181. <!--
  182. WARNING - @mbg.generated
  183. This element is automatically generated by MyBatis Generator, do not modify.
  184. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  185. -->
  186. insert into user_identity (id, uid, username,
  187. sex, date_of_birth_year, date_of_birth_month,
  188. id_number, positive_id_url, opposite_id_url,
  189. province, city, area,
  190. contact_mobile, bank_name, bank_account,
  191. bank_card_number, amount_money, audit_status,
  192. process, wrong_count, payment_date,
  193. expert, celebrity, international,
  194. fixed_tel, qq, postal_address,
  195. postcode, review_instructions, industry,
  196. contacts, email, professional_title,
  197. work_unit, education, major_category,
  198. qualification, investment)
  199. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  200. #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
  201. #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
  202. #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
  203. #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
  204. #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER},
  205. #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
  206. #{expert,jdbcType=INTEGER}, #{celebrity,jdbcType=INTEGER}, #{international,jdbcType=INTEGER},
  207. #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
  208. #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
  209. #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR},
  210. #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR},
  211. #{qualification,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER})
  212. </insert>
  213. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
  214. <!--
  215. WARNING - @mbg.generated
  216. This element is automatically generated by MyBatis Generator, do not modify.
  217. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  218. -->
  219. insert into user_identity
  220. <trim prefix="(" suffix=")" suffixOverrides=",">
  221. <if test="id != null">
  222. id,
  223. </if>
  224. <if test="uid != null">
  225. uid,
  226. </if>
  227. <if test="username != null">
  228. username,
  229. </if>
  230. <if test="sex != null">
  231. sex,
  232. </if>
  233. <if test="dateOfBirthYear != null">
  234. date_of_birth_year,
  235. </if>
  236. <if test="dateOfBirthMonth != null">
  237. date_of_birth_month,
  238. </if>
  239. <if test="idNumber != null">
  240. id_number,
  241. </if>
  242. <if test="positiveIdUrl != null">
  243. positive_id_url,
  244. </if>
  245. <if test="oppositeIdUrl != null">
  246. opposite_id_url,
  247. </if>
  248. <if test="province != null">
  249. province,
  250. </if>
  251. <if test="city != null">
  252. city,
  253. </if>
  254. <if test="area != null">
  255. area,
  256. </if>
  257. <if test="contactMobile != null">
  258. contact_mobile,
  259. </if>
  260. <if test="bankName != null">
  261. bank_name,
  262. </if>
  263. <if test="bankAccount != null">
  264. bank_account,
  265. </if>
  266. <if test="bankCardNumber != null">
  267. bank_card_number,
  268. </if>
  269. <if test="amountMoney != null">
  270. amount_money,
  271. </if>
  272. <if test="auditStatus != null">
  273. audit_status,
  274. </if>
  275. <if test="process != null">
  276. process,
  277. </if>
  278. <if test="wrongCount != null">
  279. wrong_count,
  280. </if>
  281. <if test="paymentDate != null">
  282. payment_date,
  283. </if>
  284. <if test="expert != null">
  285. expert,
  286. </if>
  287. <if test="celebrity != null">
  288. celebrity,
  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="investment != null">
  333. investment,
  334. </if>
  335. </trim>
  336. <trim prefix="values (" suffix=")" suffixOverrides=",">
  337. <if test="id != null">
  338. #{id,jdbcType=VARCHAR},
  339. </if>
  340. <if test="uid != null">
  341. #{uid,jdbcType=VARCHAR},
  342. </if>
  343. <if test="username != null">
  344. #{username,jdbcType=VARCHAR},
  345. </if>
  346. <if test="sex != null">
  347. #{sex,jdbcType=VARCHAR},
  348. </if>
  349. <if test="dateOfBirthYear != null">
  350. #{dateOfBirthYear,jdbcType=VARCHAR},
  351. </if>
  352. <if test="dateOfBirthMonth != null">
  353. #{dateOfBirthMonth,jdbcType=VARCHAR},
  354. </if>
  355. <if test="idNumber != null">
  356. #{idNumber,jdbcType=VARCHAR},
  357. </if>
  358. <if test="positiveIdUrl != null">
  359. #{positiveIdUrl,jdbcType=VARCHAR},
  360. </if>
  361. <if test="oppositeIdUrl != null">
  362. #{oppositeIdUrl,jdbcType=VARCHAR},
  363. </if>
  364. <if test="province != null">
  365. #{province,jdbcType=INTEGER},
  366. </if>
  367. <if test="city != null">
  368. #{city,jdbcType=INTEGER},
  369. </if>
  370. <if test="area != null">
  371. #{area,jdbcType=INTEGER},
  372. </if>
  373. <if test="contactMobile != null">
  374. #{contactMobile,jdbcType=VARCHAR},
  375. </if>
  376. <if test="bankName != null">
  377. #{bankName,jdbcType=VARCHAR},
  378. </if>
  379. <if test="bankAccount != null">
  380. #{bankAccount,jdbcType=VARCHAR},
  381. </if>
  382. <if test="bankCardNumber != null">
  383. #{bankCardNumber,jdbcType=VARCHAR},
  384. </if>
  385. <if test="amountMoney != null">
  386. #{amountMoney,jdbcType=DECIMAL},
  387. </if>
  388. <if test="auditStatus != null">
  389. #{auditStatus,jdbcType=INTEGER},
  390. </if>
  391. <if test="process != null">
  392. #{process,jdbcType=INTEGER},
  393. </if>
  394. <if test="wrongCount != null">
  395. #{wrongCount,jdbcType=INTEGER},
  396. </if>
  397. <if test="paymentDate != null">
  398. #{paymentDate,jdbcType=TIMESTAMP},
  399. </if>
  400. <if test="expert != null">
  401. #{expert,jdbcType=INTEGER},
  402. </if>
  403. <if test="celebrity != null">
  404. #{celebrity,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="investment != null">
  449. #{investment,jdbcType=INTEGER},
  450. </if>
  451. </trim>
  452. </insert>
  453. <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
  454. <!--
  455. WARNING - @mbg.generated
  456. This element is automatically generated by MyBatis Generator, do not modify.
  457. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  458. -->
  459. select count(*) from user_identity
  460. <if test="_parameter != null">
  461. <include refid="Example_Where_Clause" />
  462. </if>
  463. </select>
  464. <update id="updateByExampleSelective" parameterType="map">
  465. <!--
  466. WARNING - @mbg.generated
  467. This element is automatically generated by MyBatis Generator, do not modify.
  468. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  469. -->
  470. update user_identity
  471. <set>
  472. <if test="record.id != null">
  473. id = #{record.id,jdbcType=VARCHAR},
  474. </if>
  475. <if test="record.uid != null">
  476. uid = #{record.uid,jdbcType=VARCHAR},
  477. </if>
  478. <if test="record.username != null">
  479. username = #{record.username,jdbcType=VARCHAR},
  480. </if>
  481. <if test="record.sex != null">
  482. sex = #{record.sex,jdbcType=VARCHAR},
  483. </if>
  484. <if test="record.dateOfBirthYear != null">
  485. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  486. </if>
  487. <if test="record.dateOfBirthMonth != null">
  488. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  489. </if>
  490. <if test="record.idNumber != null">
  491. id_number = #{record.idNumber,jdbcType=VARCHAR},
  492. </if>
  493. <if test="record.positiveIdUrl != null">
  494. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  495. </if>
  496. <if test="record.oppositeIdUrl != null">
  497. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  498. </if>
  499. <if test="record.province != null">
  500. province = #{record.province,jdbcType=INTEGER},
  501. </if>
  502. <if test="record.city != null">
  503. city = #{record.city,jdbcType=INTEGER},
  504. </if>
  505. <if test="record.area != null">
  506. area = #{record.area,jdbcType=INTEGER},
  507. </if>
  508. <if test="record.contactMobile != null">
  509. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  510. </if>
  511. <if test="record.bankName != null">
  512. bank_name = #{record.bankName,jdbcType=VARCHAR},
  513. </if>
  514. <if test="record.bankAccount != null">
  515. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  516. </if>
  517. <if test="record.bankCardNumber != null">
  518. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  519. </if>
  520. <if test="record.amountMoney != null">
  521. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  522. </if>
  523. <if test="record.auditStatus != null">
  524. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  525. </if>
  526. <if test="record.process != null">
  527. process = #{record.process,jdbcType=INTEGER},
  528. </if>
  529. <if test="record.wrongCount != null">
  530. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  531. </if>
  532. <if test="record.paymentDate != null">
  533. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  534. </if>
  535. <if test="record.expert != null">
  536. expert = #{record.expert,jdbcType=INTEGER},
  537. </if>
  538. <if test="record.celebrity != null">
  539. celebrity = #{record.celebrity,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.investment != null">
  584. investment = #{record.investment,jdbcType=INTEGER},
  585. </if>
  586. </set>
  587. <if test="_parameter != null">
  588. <include refid="Update_By_Example_Where_Clause" />
  589. </if>
  590. </update>
  591. <update id="updateByExample" parameterType="map">
  592. <!--
  593. WARNING - @mbg.generated
  594. This element is automatically generated by MyBatis Generator, do not modify.
  595. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  596. -->
  597. update user_identity
  598. set id = #{record.id,jdbcType=VARCHAR},
  599. uid = #{record.uid,jdbcType=VARCHAR},
  600. username = #{record.username,jdbcType=VARCHAR},
  601. sex = #{record.sex,jdbcType=VARCHAR},
  602. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  603. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  604. id_number = #{record.idNumber,jdbcType=VARCHAR},
  605. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  606. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  607. province = #{record.province,jdbcType=INTEGER},
  608. city = #{record.city,jdbcType=INTEGER},
  609. area = #{record.area,jdbcType=INTEGER},
  610. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  611. bank_name = #{record.bankName,jdbcType=VARCHAR},
  612. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  613. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  614. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  615. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  616. process = #{record.process,jdbcType=INTEGER},
  617. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  618. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  619. expert = #{record.expert,jdbcType=INTEGER},
  620. celebrity = #{record.celebrity,jdbcType=INTEGER},
  621. international = #{record.international,jdbcType=INTEGER},
  622. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  623. qq = #{record.qq,jdbcType=VARCHAR},
  624. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  625. postcode = #{record.postcode,jdbcType=VARCHAR},
  626. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  627. industry = #{record.industry,jdbcType=INTEGER},
  628. contacts = #{record.contacts,jdbcType=VARCHAR},
  629. email = #{record.email,jdbcType=VARCHAR},
  630. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  631. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  632. education = #{record.education,jdbcType=VARCHAR},
  633. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  634. qualification = #{record.qualification,jdbcType=VARCHAR},
  635. investment = #{record.investment,jdbcType=INTEGER}
  636. <if test="_parameter != null">
  637. <include refid="Update_By_Example_Where_Clause" />
  638. </if>
  639. </update>
  640. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
  641. <!--
  642. WARNING - @mbg.generated
  643. This element is automatically generated by MyBatis Generator, do not modify.
  644. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  645. -->
  646. update user_identity
  647. <set>
  648. <if test="uid != null">
  649. uid = #{uid,jdbcType=VARCHAR},
  650. </if>
  651. <if test="username != null">
  652. username = #{username,jdbcType=VARCHAR},
  653. </if>
  654. <if test="sex != null">
  655. sex = #{sex,jdbcType=VARCHAR},
  656. </if>
  657. <if test="dateOfBirthYear != null">
  658. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  659. </if>
  660. <if test="dateOfBirthMonth != null">
  661. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  662. </if>
  663. <if test="idNumber != null">
  664. id_number = #{idNumber,jdbcType=VARCHAR},
  665. </if>
  666. <if test="positiveIdUrl != null">
  667. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  668. </if>
  669. <if test="oppositeIdUrl != null">
  670. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  671. </if>
  672. <if test="province != null">
  673. province = #{province,jdbcType=INTEGER},
  674. </if>
  675. <if test="city != null">
  676. city = #{city,jdbcType=INTEGER},
  677. </if>
  678. <if test="area != null">
  679. area = #{area,jdbcType=INTEGER},
  680. </if>
  681. <if test="contactMobile != null">
  682. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  683. </if>
  684. <if test="bankName != null">
  685. bank_name = #{bankName,jdbcType=VARCHAR},
  686. </if>
  687. <if test="bankAccount != null">
  688. bank_account = #{bankAccount,jdbcType=VARCHAR},
  689. </if>
  690. <if test="bankCardNumber != null">
  691. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  692. </if>
  693. <if test="amountMoney != null">
  694. amount_money = #{amountMoney,jdbcType=DECIMAL},
  695. </if>
  696. <if test="auditStatus != null">
  697. audit_status = #{auditStatus,jdbcType=INTEGER},
  698. </if>
  699. <if test="process != null">
  700. process = #{process,jdbcType=INTEGER},
  701. </if>
  702. <if test="wrongCount != null">
  703. wrong_count = #{wrongCount,jdbcType=INTEGER},
  704. </if>
  705. <if test="paymentDate != null">
  706. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  707. </if>
  708. <if test="expert != null">
  709. expert = #{expert,jdbcType=INTEGER},
  710. </if>
  711. <if test="celebrity != null">
  712. celebrity = #{celebrity,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="investment != null">
  757. investment = #{investment,jdbcType=INTEGER},
  758. </if>
  759. </set>
  760. where id = #{id,jdbcType=VARCHAR}
  761. </update>
  762. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
  763. <!--
  764. WARNING - @mbg.generated
  765. This element is automatically generated by MyBatis Generator, do not modify.
  766. This element was generated on Thu Nov 30 17:32:28 CST 2017.
  767. -->
  768. update user_identity
  769. set uid = #{uid,jdbcType=VARCHAR},
  770. username = #{username,jdbcType=VARCHAR},
  771. sex = #{sex,jdbcType=VARCHAR},
  772. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  773. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  774. id_number = #{idNumber,jdbcType=VARCHAR},
  775. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  776. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  777. province = #{province,jdbcType=INTEGER},
  778. city = #{city,jdbcType=INTEGER},
  779. area = #{area,jdbcType=INTEGER},
  780. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  781. bank_name = #{bankName,jdbcType=VARCHAR},
  782. bank_account = #{bankAccount,jdbcType=VARCHAR},
  783. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  784. amount_money = #{amountMoney,jdbcType=DECIMAL},
  785. audit_status = #{auditStatus,jdbcType=INTEGER},
  786. process = #{process,jdbcType=INTEGER},
  787. wrong_count = #{wrongCount,jdbcType=INTEGER},
  788. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  789. expert = #{expert,jdbcType=INTEGER},
  790. celebrity = #{celebrity,jdbcType=INTEGER},
  791. international = #{international,jdbcType=INTEGER},
  792. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  793. qq = #{qq,jdbcType=VARCHAR},
  794. postal_address = #{postalAddress,jdbcType=VARCHAR},
  795. postcode = #{postcode,jdbcType=VARCHAR},
  796. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  797. industry = #{industry,jdbcType=INTEGER},
  798. contacts = #{contacts,jdbcType=VARCHAR},
  799. email = #{email,jdbcType=VARCHAR},
  800. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  801. work_unit = #{workUnit,jdbcType=VARCHAR},
  802. education = #{education,jdbcType=VARCHAR},
  803. major_category = #{majorCategory,jdbcType=VARCHAR},
  804. qualification = #{qualification,jdbcType=VARCHAR},
  805. investment = #{investment,jdbcType=INTEGER}
  806. where id = #{id,jdbcType=VARCHAR}
  807. </update>
  808. <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  809. select
  810. <include refid="Base_Column_List" />
  811. from user_identity
  812. where uid = #{uid,jdbcType=VARCHAR}
  813. </select>
  814. <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
  815. select
  816. t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
  817. t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
  818. u.mobile, u.number from user u left JOIN user_identity t
  819. on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
  820. </select>
  821. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  822. select
  823. u.aid,
  824. u.mid,
  825. u.lvl,
  826. ui.id,
  827. ui.uid,
  828. ui.username,
  829. ui.sex,
  830. ui.date_of_birth_year as dateOfBirthYear,
  831. ui.date_of_birth_month as dateOfBirthMonth,
  832. ui.id_number as idNumber,
  833. ui.positive_id_url as positiveIdUrl,
  834. ui.opposite_id_url as oppositeIdUrl,
  835. ui.province,
  836. ui.city,
  837. ui.area,
  838. ui.contact_mobile as contactMobile,
  839. ui.bank_name as bankName,
  840. ui.bank_account as bankAccount,
  841. ui.bank_card_number as bankCardNumber,
  842. ui.amount_money as amountMoney,
  843. ui.audit_status as auditStatus,
  844. ui.payment_date as paymentDate,
  845. ui.expert,
  846. ui.celebrity
  847. from user u
  848. LEFT JOIN user_identity ui on u.id = ui.uid
  849. where u.id = #{uid,jdbcType=VARCHAR}
  850. </select>
  851. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  852. select u.id as uid, i.username
  853. from user u INNER JOIN
  854. user_identity i on u.id = i.uid
  855. where u.lvl = 1
  856. <if test="_parameter != null">
  857. and u.mid = #{aid,jdbcType=VARCHAR}
  858. </if>
  859. </select>
  860. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  861. select u.id as uid, i.username
  862. from user u INNER JOIN
  863. user_identity i on u.id = i.uid
  864. where u.lvl = 1
  865. <if test="_parameter != null">
  866. and u.aid = #{aid,jdbcType=VARCHAR}
  867. </if>
  868. </select>
  869. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  870. select u.id as uid, ui.username, u.mobile
  871. from user u INNER JOIN
  872. user_identity ui on u.id = ui.uid
  873. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  874. <if test="aid != null">
  875. and u.mid = #{aid,jdbcType=VARCHAR}
  876. </if>
  877. </select>
  878. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  879. select u.id as uid, ui.username, u.mobile
  880. from user u INNER JOIN
  881. user_identity ui on u.id = ui.uid
  882. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  883. <if test="aid != null">
  884. and u.aid = #{aid,jdbcType=VARCHAR}
  885. </if>
  886. </select>
  887. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  888. SELECT
  889. u.id as uid, ui.username, u.number,
  890. ui.id as identityId, ui.province,
  891. u.head_portrait_url as personPortraitUrl,
  892. adc.achievement_count as achievementNum,
  893. adc.demand_count as demandNum,
  894. uc.engaged_field as engagedField,
  895. uc.work_unit as workUnit,
  896. ui.professional_title as position,
  897. ui.international
  898. FROM
  899. <![CDATA[ user ]]> u
  900. LEFT JOIN user_identity ui ON ui.uid = u.id
  901. LEFT JOIN user_career uc ON uc.uid = u.id
  902. <!-- LEFT JOIN user_info info ON info.uid = u.id -->
  903. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  904. WHERE
  905. u.type = 0 and ui.expert = 1
  906. <if test="null != level and level==1 ">
  907. AND u.lvl <![CDATA[ >= ]]> 1
  908. </if>
  909. <if test="null !=level and level==0">
  910. AND u.lvl = 0
  911. </if>
  912. <if test="international !=null">
  913. AND ui.international= #{international,jdbcType=INTEGER}
  914. </if>
  915. <if test="province != null">
  916. AND ui.province = #{province,jdbcType=INTEGER}
  917. </if>
  918. <if test="city != null">
  919. AND ui.city = #{city,jdbcType=INTEGER}
  920. </if>
  921. <if test="area != null">
  922. AND ui.area = #{area,jdbcType=INTEGER}
  923. </if>
  924. <if test="field != null">
  925. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  926. </if>
  927. <if test="name != null">
  928. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  929. </if>
  930. ORDER BY
  931. u.number
  932. <if test="page_sql!=null">
  933. ${page_sql}
  934. </if>
  935. </select>
  936. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  937. SELECT
  938. count(1)
  939. FROM
  940. <![CDATA[ user ]]> u
  941. LEFT JOIN user_identity ui ON ui.uid = u.id
  942. LEFT JOIN user_career uc ON uc.uid = u.id
  943. WHERE
  944. u.type = 0 and ui.expert = 1
  945. <if test="null != level and level==1 ">
  946. AND u.lvl <![CDATA[ >= ]]> 1
  947. </if>
  948. <if test="null != level and level==0">
  949. AND u.lvl = 0
  950. </if>
  951. <if test="international !=null">
  952. AND ui.international= #{international,jdbcType=INTEGER}
  953. </if>
  954. <if test="province != null">
  955. AND ui.province = #{province,jdbcType=INTEGER}
  956. </if>
  957. <if test="city != null">
  958. AND ui.city = #{city,jdbcType=INTEGER}
  959. </if>
  960. <if test="area != null">
  961. AND ui.area = #{area,jdbcType=INTEGER}
  962. </if>
  963. <if test="field != null">
  964. AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  965. </if>
  966. <if test="name != null">
  967. AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  968. </if>
  969. </select>
  970. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  971. select
  972. a.id,
  973. b.username as ownerName,
  974. c.ability_label as abilityLabel,
  975. a.head_portrait_url as personPortraitUrl,
  976. e.education
  977. from user a
  978. left join user_identity b
  979. on a.id = b.uid
  980. left join user_ability c
  981. on a.id = c.uid
  982. <!-- left join user_info d
  983. on a.id = d.uid -->
  984. left join user_edu e
  985. on a.id = e.uid
  986. where 1=1
  987. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  988. order by
  989. a.create_time desc
  990. limit 0,6
  991. </select>
  992. </mapper>