UserIdentityMapper.xml 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405
  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. <result column="expert_audit" jdbcType="INTEGER" property="expertAudit" />
  50. </resultMap>
  51. <sql id="Example_Where_Clause">
  52. <!--
  53. WARNING - @mbg.generated
  54. This element is automatically generated by MyBatis Generator, do not modify.
  55. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  56. -->
  57. <where>
  58. <foreach collection="oredCriteria" item="criteria" separator="or">
  59. <if test="criteria.valid">
  60. <trim prefix="(" prefixOverrides="and" suffix=")">
  61. <foreach collection="criteria.criteria" item="criterion">
  62. <choose>
  63. <when test="criterion.noValue">
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue">
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue">
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue">
  73. and ${criterion.condition}
  74. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Update_By_Example_Where_Clause">
  86. <!--
  87. WARNING - @mbg.generated
  88. This element is automatically generated by MyBatis Generator, do not modify.
  89. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  90. -->
  91. <where>
  92. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  93. <if test="criteria.valid">
  94. <trim prefix="(" prefixOverrides="and" suffix=")">
  95. <foreach collection="criteria.criteria" item="criterion">
  96. <choose>
  97. <when test="criterion.noValue">
  98. and ${criterion.condition}
  99. </when>
  100. <when test="criterion.singleValue">
  101. and ${criterion.condition} #{criterion.value}
  102. </when>
  103. <when test="criterion.betweenValue">
  104. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  105. </when>
  106. <when test="criterion.listValue">
  107. and ${criterion.condition}
  108. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  109. #{listItem}
  110. </foreach>
  111. </when>
  112. </choose>
  113. </foreach>
  114. </trim>
  115. </if>
  116. </foreach>
  117. </where>
  118. </sql>
  119. <sql id="Base_Column_List">
  120. <!--
  121. WARNING - @mbg.generated
  122. This element is automatically generated by MyBatis Generator, do not modify.
  123. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  124. -->
  125. id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
  126. opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number,
  127. amount_money, audit_status, process, wrong_count, payment_date, expert,
  128. international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
  129. contacts, email, professional_title, work_unit, education, major_category, qualification,
  130. graduate_school, consultation_price
  131. </sql>
  132. <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
  133. <!--
  134. WARNING - @mbg.generated
  135. This element is automatically generated by MyBatis Generator, do not modify.
  136. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  137. -->
  138. select
  139. <if test="distinct">
  140. distinct
  141. </if>
  142. <include refid="Base_Column_List" />
  143. from user_identity
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. <if test="orderByClause != null">
  148. order by ${orderByClause}
  149. </if>
  150. </select>
  151. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  152. <!--
  153. WARNING - @mbg.generated
  154. This element is automatically generated by MyBatis Generator, do not modify.
  155. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  156. -->
  157. select
  158. <include refid="Base_Column_List" />
  159. from user_identity
  160. where id = #{id,jdbcType=VARCHAR}
  161. </select>
  162. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  163. <!--
  164. WARNING - @mbg.generated
  165. This element is automatically generated by MyBatis Generator, do not modify.
  166. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  167. -->
  168. delete from user_identity
  169. where id = #{id,jdbcType=VARCHAR}
  170. </delete>
  171. <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserIdentityExample">
  172. <!--
  173. WARNING - @mbg.generated
  174. This element is automatically generated by MyBatis Generator, do not modify.
  175. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  176. -->
  177. delete from user_identity
  178. <if test="_parameter != null">
  179. <include refid="Example_Where_Clause" />
  180. </if>
  181. </delete>
  182. <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity">
  183. <!--
  184. WARNING - @mbg.generated
  185. This element is automatically generated by MyBatis Generator, do not modify.
  186. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  187. -->
  188. insert into user_identity (id, uid, username,
  189. sex, date_of_birth_year, date_of_birth_month,
  190. id_number, positive_id_url, opposite_id_url,
  191. province, city, area,
  192. contact_mobile, bank_name, bank_account,
  193. bank_card_number, amount_money, audit_status,
  194. process, wrong_count, payment_date,
  195. expert, international,
  196. fixed_tel, qq, postal_address,
  197. postcode, review_instructions, industry,
  198. contacts, email, professional_title,
  199. work_unit, education, major_category,
  200. qualification, graduate_school,
  201. consultation_price)
  202. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  203. #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
  204. #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
  205. #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
  206. #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
  207. #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER},
  208. #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
  209. #{expert,jdbcType=INTEGER}, #{international,jdbcType=INTEGER},
  210. #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR},
  211. #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
  212. #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR},
  213. #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR},
  214. #{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR},
  215. #{consultationPrice,jdbcType=DECIMAL})
  216. </insert>
  217. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
  218. <!--
  219. WARNING - @mbg.generated
  220. This element is automatically generated by MyBatis Generator, do not modify.
  221. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  222. -->
  223. insert into user_identity
  224. <trim prefix="(" suffix=")" suffixOverrides=",">
  225. <if test="id != null">
  226. id,
  227. </if>
  228. <if test="uid != null">
  229. uid,
  230. </if>
  231. <if test="username != null">
  232. username,
  233. </if>
  234. <if test="sex != null">
  235. sex,
  236. </if>
  237. <if test="dateOfBirthYear != null">
  238. date_of_birth_year,
  239. </if>
  240. <if test="dateOfBirthMonth != null">
  241. date_of_birth_month,
  242. </if>
  243. <if test="idNumber != null">
  244. id_number,
  245. </if>
  246. <if test="positiveIdUrl != null">
  247. positive_id_url,
  248. </if>
  249. <if test="oppositeIdUrl != null">
  250. opposite_id_url,
  251. </if>
  252. <if test="province != null">
  253. province,
  254. </if>
  255. <if test="city != null">
  256. city,
  257. </if>
  258. <if test="area != null">
  259. area,
  260. </if>
  261. <if test="contactMobile != null">
  262. contact_mobile,
  263. </if>
  264. <if test="bankName != null">
  265. bank_name,
  266. </if>
  267. <if test="bankAccount != null">
  268. bank_account,
  269. </if>
  270. <if test="bankCardNumber != null">
  271. bank_card_number,
  272. </if>
  273. <if test="amountMoney != null">
  274. amount_money,
  275. </if>
  276. <if test="auditStatus != null">
  277. audit_status,
  278. </if>
  279. <if test="process != null">
  280. process,
  281. </if>
  282. <if test="wrongCount != null">
  283. wrong_count,
  284. </if>
  285. <if test="paymentDate != null">
  286. payment_date,
  287. </if>
  288. <if test="expert != null">
  289. expert,
  290. </if>
  291. <if test="international != null">
  292. international,
  293. </if>
  294. <if test="fixedTel != null">
  295. fixed_tel,
  296. </if>
  297. <if test="qq != null">
  298. qq,
  299. </if>
  300. <if test="postalAddress != null">
  301. postal_address,
  302. </if>
  303. <if test="postcode != null">
  304. postcode,
  305. </if>
  306. <if test="reviewInstructions != null">
  307. review_instructions,
  308. </if>
  309. <if test="industry != null">
  310. industry,
  311. </if>
  312. <if test="contacts != null">
  313. contacts,
  314. </if>
  315. <if test="email != null">
  316. email,
  317. </if>
  318. <if test="professionalTitle != null">
  319. professional_title,
  320. </if>
  321. <if test="workUnit != null">
  322. work_unit,
  323. </if>
  324. <if test="education != null">
  325. education,
  326. </if>
  327. <if test="majorCategory != null">
  328. major_category,
  329. </if>
  330. <if test="qualification != null">
  331. qualification,
  332. </if>
  333. <if test="graduateSchool != null">
  334. graduate_school,
  335. </if>
  336. <if test="consultationPrice != null">
  337. consultation_price,
  338. </if>
  339. </trim>
  340. <trim prefix="values (" suffix=")" suffixOverrides=",">
  341. <if test="id != null">
  342. #{id,jdbcType=VARCHAR},
  343. </if>
  344. <if test="uid != null">
  345. #{uid,jdbcType=VARCHAR},
  346. </if>
  347. <if test="username != null">
  348. #{username,jdbcType=VARCHAR},
  349. </if>
  350. <if test="sex != null">
  351. #{sex,jdbcType=VARCHAR},
  352. </if>
  353. <if test="dateOfBirthYear != null">
  354. #{dateOfBirthYear,jdbcType=VARCHAR},
  355. </if>
  356. <if test="dateOfBirthMonth != null">
  357. #{dateOfBirthMonth,jdbcType=VARCHAR},
  358. </if>
  359. <if test="idNumber != null">
  360. #{idNumber,jdbcType=VARCHAR},
  361. </if>
  362. <if test="positiveIdUrl != null">
  363. #{positiveIdUrl,jdbcType=VARCHAR},
  364. </if>
  365. <if test="oppositeIdUrl != null">
  366. #{oppositeIdUrl,jdbcType=VARCHAR},
  367. </if>
  368. <if test="province != null">
  369. #{province,jdbcType=INTEGER},
  370. </if>
  371. <if test="city != null">
  372. #{city,jdbcType=INTEGER},
  373. </if>
  374. <if test="area != null">
  375. #{area,jdbcType=INTEGER},
  376. </if>
  377. <if test="contactMobile != null">
  378. #{contactMobile,jdbcType=VARCHAR},
  379. </if>
  380. <if test="bankName != null">
  381. #{bankName,jdbcType=VARCHAR},
  382. </if>
  383. <if test="bankAccount != null">
  384. #{bankAccount,jdbcType=VARCHAR},
  385. </if>
  386. <if test="bankCardNumber != null">
  387. #{bankCardNumber,jdbcType=VARCHAR},
  388. </if>
  389. <if test="amountMoney != null">
  390. #{amountMoney,jdbcType=DECIMAL},
  391. </if>
  392. <if test="auditStatus != null">
  393. #{auditStatus,jdbcType=INTEGER},
  394. </if>
  395. <if test="process != null">
  396. #{process,jdbcType=INTEGER},
  397. </if>
  398. <if test="wrongCount != null">
  399. #{wrongCount,jdbcType=INTEGER},
  400. </if>
  401. <if test="paymentDate != null">
  402. #{paymentDate,jdbcType=TIMESTAMP},
  403. </if>
  404. <if test="expert != null">
  405. #{expert,jdbcType=INTEGER},
  406. </if>
  407. <if test="international != null">
  408. #{international,jdbcType=INTEGER},
  409. </if>
  410. <if test="fixedTel != null">
  411. #{fixedTel,jdbcType=VARCHAR},
  412. </if>
  413. <if test="qq != null">
  414. #{qq,jdbcType=VARCHAR},
  415. </if>
  416. <if test="postalAddress != null">
  417. #{postalAddress,jdbcType=VARCHAR},
  418. </if>
  419. <if test="postcode != null">
  420. #{postcode,jdbcType=VARCHAR},
  421. </if>
  422. <if test="reviewInstructions != null">
  423. #{reviewInstructions,jdbcType=VARCHAR},
  424. </if>
  425. <if test="industry != null">
  426. #{industry,jdbcType=INTEGER},
  427. </if>
  428. <if test="contacts != null">
  429. #{contacts,jdbcType=VARCHAR},
  430. </if>
  431. <if test="email != null">
  432. #{email,jdbcType=VARCHAR},
  433. </if>
  434. <if test="professionalTitle != null">
  435. #{professionalTitle,jdbcType=VARCHAR},
  436. </if>
  437. <if test="workUnit != null">
  438. #{workUnit,jdbcType=VARCHAR},
  439. </if>
  440. <if test="education != null">
  441. #{education,jdbcType=VARCHAR},
  442. </if>
  443. <if test="majorCategory != null">
  444. #{majorCategory,jdbcType=VARCHAR},
  445. </if>
  446. <if test="qualification != null">
  447. #{qualification,jdbcType=VARCHAR},
  448. </if>
  449. <if test="graduateSchool != null">
  450. #{graduateSchool,jdbcType=VARCHAR},
  451. </if>
  452. <if test="consultationPrice != null">
  453. #{consultationPrice,jdbcType=DECIMAL},
  454. </if>
  455. </trim>
  456. </insert>
  457. <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
  458. <!--
  459. WARNING - @mbg.generated
  460. This element is automatically generated by MyBatis Generator, do not modify.
  461. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  462. -->
  463. select count(*) from user_identity
  464. <if test="_parameter != null">
  465. <include refid="Example_Where_Clause" />
  466. </if>
  467. </select>
  468. <update id="updateByExampleSelective" parameterType="map">
  469. <!--
  470. WARNING - @mbg.generated
  471. This element is automatically generated by MyBatis Generator, do not modify.
  472. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  473. -->
  474. update user_identity
  475. <set>
  476. <if test="record.id != null">
  477. id = #{record.id,jdbcType=VARCHAR},
  478. </if>
  479. <if test="record.uid != null">
  480. uid = #{record.uid,jdbcType=VARCHAR},
  481. </if>
  482. <if test="record.username != null">
  483. username = #{record.username,jdbcType=VARCHAR},
  484. </if>
  485. <if test="record.sex != null">
  486. sex = #{record.sex,jdbcType=VARCHAR},
  487. </if>
  488. <if test="record.dateOfBirthYear != null">
  489. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  490. </if>
  491. <if test="record.dateOfBirthMonth != null">
  492. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  493. </if>
  494. <if test="record.idNumber != null">
  495. id_number = #{record.idNumber,jdbcType=VARCHAR},
  496. </if>
  497. <if test="record.positiveIdUrl != null">
  498. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.oppositeIdUrl != null">
  501. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.province != null">
  504. province = #{record.province,jdbcType=INTEGER},
  505. </if>
  506. <if test="record.city != null">
  507. city = #{record.city,jdbcType=INTEGER},
  508. </if>
  509. <if test="record.area != null">
  510. area = #{record.area,jdbcType=INTEGER},
  511. </if>
  512. <if test="record.contactMobile != null">
  513. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  514. </if>
  515. <if test="record.bankName != null">
  516. bank_name = #{record.bankName,jdbcType=VARCHAR},
  517. </if>
  518. <if test="record.bankAccount != null">
  519. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  520. </if>
  521. <if test="record.bankCardNumber != null">
  522. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  523. </if>
  524. <if test="record.amountMoney != null">
  525. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  526. </if>
  527. <if test="record.auditStatus != null">
  528. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  529. </if>
  530. <if test="record.process != null">
  531. process = #{record.process,jdbcType=INTEGER},
  532. </if>
  533. <if test="record.wrongCount != null">
  534. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  535. </if>
  536. <if test="record.paymentDate != null">
  537. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  538. </if>
  539. <if test="record.expert != null">
  540. expert = #{record.expert,jdbcType=INTEGER},
  541. </if>
  542. <if test="record.international != null">
  543. international = #{record.international,jdbcType=INTEGER},
  544. </if>
  545. <if test="record.fixedTel != null">
  546. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  547. </if>
  548. <if test="record.qq != null">
  549. qq = #{record.qq,jdbcType=VARCHAR},
  550. </if>
  551. <if test="record.postalAddress != null">
  552. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  553. </if>
  554. <if test="record.postcode != null">
  555. postcode = #{record.postcode,jdbcType=VARCHAR},
  556. </if>
  557. <if test="record.reviewInstructions != null">
  558. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  559. </if>
  560. <if test="record.industry != null">
  561. industry = #{record.industry,jdbcType=INTEGER},
  562. </if>
  563. <if test="record.contacts != null">
  564. contacts = #{record.contacts,jdbcType=VARCHAR},
  565. </if>
  566. <if test="record.email != null">
  567. email = #{record.email,jdbcType=VARCHAR},
  568. </if>
  569. <if test="record.professionalTitle != null">
  570. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  571. </if>
  572. <if test="record.workUnit != null">
  573. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  574. </if>
  575. <if test="record.education != null">
  576. education = #{record.education,jdbcType=VARCHAR},
  577. </if>
  578. <if test="record.majorCategory != null">
  579. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  580. </if>
  581. <if test="record.qualification != null">
  582. qualification = #{record.qualification,jdbcType=VARCHAR},
  583. </if>
  584. <if test="record.graduateSchool != null">
  585. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
  586. </if>
  587. <if test="record.consultationPrice != null">
  588. consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
  589. </if>
  590. </set>
  591. <if test="_parameter != null">
  592. <include refid="Update_By_Example_Where_Clause" />
  593. </if>
  594. </update>
  595. <update id="updateByExample" parameterType="map">
  596. <!--
  597. WARNING - @mbg.generated
  598. This element is automatically generated by MyBatis Generator, do not modify.
  599. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  600. -->
  601. update user_identity
  602. set id = #{record.id,jdbcType=VARCHAR},
  603. uid = #{record.uid,jdbcType=VARCHAR},
  604. username = #{record.username,jdbcType=VARCHAR},
  605. sex = #{record.sex,jdbcType=VARCHAR},
  606. date_of_birth_year = #{record.dateOfBirthYear,jdbcType=VARCHAR},
  607. date_of_birth_month = #{record.dateOfBirthMonth,jdbcType=VARCHAR},
  608. id_number = #{record.idNumber,jdbcType=VARCHAR},
  609. positive_id_url = #{record.positiveIdUrl,jdbcType=VARCHAR},
  610. opposite_id_url = #{record.oppositeIdUrl,jdbcType=VARCHAR},
  611. province = #{record.province,jdbcType=INTEGER},
  612. city = #{record.city,jdbcType=INTEGER},
  613. area = #{record.area,jdbcType=INTEGER},
  614. contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
  615. bank_name = #{record.bankName,jdbcType=VARCHAR},
  616. bank_account = #{record.bankAccount,jdbcType=VARCHAR},
  617. bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
  618. amount_money = #{record.amountMoney,jdbcType=DECIMAL},
  619. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  620. process = #{record.process,jdbcType=INTEGER},
  621. wrong_count = #{record.wrongCount,jdbcType=INTEGER},
  622. payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
  623. expert = #{record.expert,jdbcType=INTEGER},
  624. international = #{record.international,jdbcType=INTEGER},
  625. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  626. qq = #{record.qq,jdbcType=VARCHAR},
  627. postal_address = #{record.postalAddress,jdbcType=VARCHAR},
  628. postcode = #{record.postcode,jdbcType=VARCHAR},
  629. review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
  630. industry = #{record.industry,jdbcType=INTEGER},
  631. contacts = #{record.contacts,jdbcType=VARCHAR},
  632. email = #{record.email,jdbcType=VARCHAR},
  633. professional_title = #{record.professionalTitle,jdbcType=VARCHAR},
  634. work_unit = #{record.workUnit,jdbcType=VARCHAR},
  635. education = #{record.education,jdbcType=VARCHAR},
  636. major_category = #{record.majorCategory,jdbcType=VARCHAR},
  637. qualification = #{record.qualification,jdbcType=VARCHAR},
  638. graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
  639. consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
  640. <if test="_parameter != null">
  641. <include refid="Update_By_Example_Where_Clause" />
  642. </if>
  643. </update>
  644. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity">
  645. <!--
  646. WARNING - @mbg.generated
  647. This element is automatically generated by MyBatis Generator, do not modify.
  648. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  649. -->
  650. update user_identity
  651. <set>
  652. <if test="uid != null">
  653. uid = #{uid,jdbcType=VARCHAR},
  654. </if>
  655. <if test="username != null">
  656. username = #{username,jdbcType=VARCHAR},
  657. </if>
  658. <if test="sex != null">
  659. sex = #{sex,jdbcType=VARCHAR},
  660. </if>
  661. <if test="dateOfBirthYear != null">
  662. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  663. </if>
  664. <if test="dateOfBirthMonth != null">
  665. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  666. </if>
  667. <if test="idNumber != null">
  668. id_number = #{idNumber,jdbcType=VARCHAR},
  669. </if>
  670. <if test="positiveIdUrl != null">
  671. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  672. </if>
  673. <if test="oppositeIdUrl != null">
  674. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  675. </if>
  676. <if test="province != null">
  677. province = #{province,jdbcType=INTEGER},
  678. </if>
  679. <if test="city != null">
  680. city = #{city,jdbcType=INTEGER},
  681. </if>
  682. <if test="area != null">
  683. area = #{area,jdbcType=INTEGER},
  684. </if>
  685. <if test="contactMobile != null">
  686. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  687. </if>
  688. <if test="bankName != null">
  689. bank_name = #{bankName,jdbcType=VARCHAR},
  690. </if>
  691. <if test="bankAccount != null">
  692. bank_account = #{bankAccount,jdbcType=VARCHAR},
  693. </if>
  694. <if test="bankCardNumber != null">
  695. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  696. </if>
  697. <if test="amountMoney != null">
  698. amount_money = #{amountMoney,jdbcType=DECIMAL},
  699. </if>
  700. <if test="auditStatus != null">
  701. audit_status = #{auditStatus,jdbcType=INTEGER},
  702. </if>
  703. <if test="process != null">
  704. process = #{process,jdbcType=INTEGER},
  705. </if>
  706. <if test="wrongCount != null">
  707. wrong_count = #{wrongCount,jdbcType=INTEGER},
  708. </if>
  709. <if test="paymentDate != null">
  710. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  711. </if>
  712. <if test="expert != null">
  713. expert = #{expert,jdbcType=INTEGER},
  714. </if>
  715. <if test="international != null">
  716. international = #{international,jdbcType=INTEGER},
  717. </if>
  718. <if test="fixedTel != null">
  719. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  720. </if>
  721. <if test="qq != null">
  722. qq = #{qq,jdbcType=VARCHAR},
  723. </if>
  724. <if test="postalAddress != null">
  725. postal_address = #{postalAddress,jdbcType=VARCHAR},
  726. </if>
  727. <if test="postcode != null">
  728. postcode = #{postcode,jdbcType=VARCHAR},
  729. </if>
  730. <if test="reviewInstructions != null">
  731. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  732. </if>
  733. <if test="industry != null">
  734. industry = #{industry,jdbcType=INTEGER},
  735. </if>
  736. <if test="contacts != null">
  737. contacts = #{contacts,jdbcType=VARCHAR},
  738. </if>
  739. <if test="email != null">
  740. email = #{email,jdbcType=VARCHAR},
  741. </if>
  742. <if test="professionalTitle != null">
  743. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  744. </if>
  745. <if test="workUnit != null">
  746. work_unit = #{workUnit,jdbcType=VARCHAR},
  747. </if>
  748. <if test="education != null">
  749. education = #{education,jdbcType=VARCHAR},
  750. </if>
  751. <if test="majorCategory != null">
  752. major_category = #{majorCategory,jdbcType=VARCHAR},
  753. </if>
  754. <if test="qualification != null">
  755. qualification = #{qualification,jdbcType=VARCHAR},
  756. </if>
  757. <if test="graduateSchool != null">
  758. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  759. </if>
  760. <if test="consultationPrice != null">
  761. consultation_price = #{consultationPrice,jdbcType=DECIMAL},
  762. </if>
  763. <if test="expertAudit != null">
  764. audit_status = #{expertAudit,jdbcType=DECIMAL},
  765. </if>
  766. <if test="releaseStatus != null">
  767. release_status = #{releaseStatus,jdbcType=DECIMAL},
  768. </if>
  769. </set>
  770. where id = #{id,jdbcType=VARCHAR}
  771. </update>
  772. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity">
  773. <!--
  774. WARNING - @mbg.generated
  775. This element is automatically generated by MyBatis Generator, do not modify.
  776. This element was generated on Fri Dec 29 09:20:50 CST 2017.
  777. -->
  778. update user_identity
  779. set uid = #{uid,jdbcType=VARCHAR},
  780. username = #{username,jdbcType=VARCHAR},
  781. sex = #{sex,jdbcType=VARCHAR},
  782. date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
  783. date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
  784. id_number = #{idNumber,jdbcType=VARCHAR},
  785. positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
  786. opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
  787. province = #{province,jdbcType=INTEGER},
  788. city = #{city,jdbcType=INTEGER},
  789. area = #{area,jdbcType=INTEGER},
  790. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  791. bank_name = #{bankName,jdbcType=VARCHAR},
  792. bank_account = #{bankAccount,jdbcType=VARCHAR},
  793. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  794. amount_money = #{amountMoney,jdbcType=DECIMAL},
  795. audit_status = #{auditStatus,jdbcType=INTEGER},
  796. process = #{process,jdbcType=INTEGER},
  797. wrong_count = #{wrongCount,jdbcType=INTEGER},
  798. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  799. expert = #{expert,jdbcType=INTEGER},
  800. international = #{international,jdbcType=INTEGER},
  801. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  802. qq = #{qq,jdbcType=VARCHAR},
  803. postal_address = #{postalAddress,jdbcType=VARCHAR},
  804. postcode = #{postcode,jdbcType=VARCHAR},
  805. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  806. industry = #{industry,jdbcType=INTEGER},
  807. contacts = #{contacts,jdbcType=VARCHAR},
  808. email = #{email,jdbcType=VARCHAR},
  809. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  810. work_unit = #{workUnit,jdbcType=VARCHAR},
  811. education = #{education,jdbcType=VARCHAR},
  812. major_category = #{majorCategory,jdbcType=VARCHAR},
  813. qualification = #{qualification,jdbcType=VARCHAR},
  814. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  815. consultation_price = #{consultationPrice,jdbcType=DECIMAL}
  816. where id = #{id,jdbcType=VARCHAR}
  817. </update>
  818. <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  819. select
  820. <include refid="Base_Column_List" />
  821. from user_identity
  822. where uid = #{uid,jdbcType=VARCHAR}
  823. </select>
  824. <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
  825. select
  826. a.id as uid,
  827. a.identify_name as identifyName,
  828. a.mobile,
  829. a.email,
  830. a.introduction,
  831. a.head_portrait_url as headPortraitUrl,
  832. a.society_tag as societyTag,
  833. a.type,
  834. a.authentication,
  835. b.id,
  836. b.industry,
  837. b.sex,
  838. b.date_of_birth_year as dateOfBirthYear,
  839. b.date_of_birth_month as dateOfBirthMonth,
  840. b.id_number as idNumber,
  841. b.positive_id_url as positiveIdUrl,
  842. b.opposite_id_url as oppositeIdUrl,
  843. b.province,
  844. b.city,
  845. b.area,
  846. b.postal_address as postalAddress,
  847. b.fixed_tel as fixedTel,
  848. b.qq,
  849. b.graduate_school as graduateSchool,
  850. b.major_category as majorCategory,
  851. b.qualification,
  852. b.professional_title as professionalTitle,
  853. b.audit_status as expertAudit,
  854. b.expert as expert,
  855. b.work_unit as workUnit
  856. from
  857. user a left join user_identity b on
  858. a.id = b.uid
  859. where
  860. a.id = #{uid,jdbcType=VARCHAR}
  861. </select>
  862. <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
  863. select
  864. u.aid,
  865. u.mid,
  866. u.lvl,
  867. ui.id,
  868. ui.uid,
  869. ui.username,
  870. ui.sex,
  871. ui.date_of_birth_year as dateOfBirthYear,
  872. ui.date_of_birth_month as dateOfBirthMonth,
  873. ui.id_number as idNumber,
  874. ui.positive_id_url as positiveIdUrl,
  875. ui.opposite_id_url as oppositeIdUrl,
  876. ui.province,
  877. ui.city,
  878. ui.area,
  879. ui.contact_mobile as contactMobile,
  880. ui.bank_name as bankName,
  881. ui.bank_account as bankAccount,
  882. ui.bank_card_number as bankCardNumber,
  883. ui.amount_money as amountMoney,
  884. ui.audit_status as auditStatus,
  885. ui.payment_date as paymentDate,
  886. ui.expert
  887. from user u
  888. LEFT JOIN user_identity ui on u.id = ui.uid
  889. where u.id = #{uid,jdbcType=VARCHAR}
  890. </select>
  891. <select id="selectManagerUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  892. select u.id as uid, i.username
  893. from user u INNER JOIN
  894. user_identity i on u.id = i.uid
  895. where u.lvl = 1
  896. <if test="_parameter != null">
  897. and u.mid = #{aid,jdbcType=VARCHAR}
  898. </if>
  899. </select>
  900. <select id="selectAllUserNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserNames">
  901. select u.id as uid, i.username
  902. from user u INNER JOIN
  903. user_identity i on u.id = i.uid
  904. where u.lvl = 1
  905. <if test="_parameter != null">
  906. and u.aid = #{aid,jdbcType=VARCHAR}
  907. </if>
  908. </select>
  909. <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  910. select u.id as uid, ui.username, u.mobile
  911. from user u INNER JOIN
  912. user_identity ui on u.id = ui.uid
  913. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  914. <if test="aid != null">
  915. and u.mid = #{aid,jdbcType=VARCHAR}
  916. </if>
  917. </select>
  918. <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
  919. select u.id as uid, ui.username, u.mobile
  920. from user u INNER JOIN
  921. user_identity ui on u.id = ui.uid
  922. where u.lvl = 1 and ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  923. <if test="aid != null">
  924. and u.aid = #{aid,jdbcType=VARCHAR}
  925. </if>
  926. </select>
  927. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
  928. SELECT
  929. u.id as uid, u.identify_name as username, u.number,
  930. ui.id as identityId, ui.province,
  931. u.head_portrait_url as personPortraitUrl,
  932. u.introduction as achievementNum,
  933. adc.demand_count as demandNum,
  934. uc.engaged_field as engagedField,
  935. uc.work_unit as workUnit,
  936. ui.professional_title as position,
  937. ui.international
  938. FROM
  939. user u
  940. LEFT JOIN user_identity ui ON ui.uid = u.id
  941. LEFT JOIN user_career uc ON uc.uid = u.id
  942. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  943. WHERE
  944. ui.expert = 1 and u.source=0
  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 ui.industry= #{field,jdbcType=VARCHAR}
  965. </if>
  966. <if test="name != null">
  967. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  968. </if>
  969. order by u.number asc
  970. <if test="page_sql!=null">
  971. ${page_sql}
  972. </if>
  973. </select>
  974. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  975. SELECT
  976. count(0)
  977. FROM
  978. user u
  979. LEFT JOIN user_identity ui ON ui.uid = u.id
  980. LEFT JOIN user_career uc ON uc.uid = u.id
  981. LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
  982. WHERE
  983. ui.expert = 1 and u.source=0
  984. <if test="null != level and level==1 ">
  985. AND u.lvl <![CDATA[ >= ]]> 1
  986. </if>
  987. <if test="null !=level and level==0">
  988. AND u.lvl = 0
  989. </if>
  990. <if test="international !=null">
  991. AND ui.international= #{international,jdbcType=INTEGER}
  992. </if>
  993. <if test="province != null">
  994. AND ui.province = #{province,jdbcType=INTEGER}
  995. </if>
  996. <if test="city != null">
  997. AND ui.city = #{city,jdbcType=INTEGER}
  998. </if>
  999. <if test="area != null">
  1000. AND ui.area = #{area,jdbcType=INTEGER}
  1001. </if>
  1002. <if test="field != null">
  1003. AND ui.industry= #{field,jdbcType=VARCHAR}
  1004. </if>
  1005. <if test="name != null">
  1006. AND u.identify_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1007. </if>
  1008. </select>
  1009. <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
  1010. select
  1011. a.id,
  1012. b.username as ownerName,
  1013. c.ability_label as abilityLabel,
  1014. a.head_portrait_url as personPortraitUrl,
  1015. e.education
  1016. from user a
  1017. left join user_identity b
  1018. on a.id = b.uid
  1019. left join user_ability c
  1020. on a.id = c.uid
  1021. <!-- left join user_info d
  1022. on a.id = d.uid -->
  1023. left join user_edu e
  1024. on a.id = e.uid
  1025. where 1=1
  1026. <!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
  1027. order by
  1028. a.create_time desc
  1029. limit 0,6
  1030. </select>
  1031. <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
  1032. select t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
  1033. t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1034. from user_identity t left JOIN user u on t.uid = u.id
  1035. left join jpush_easemob_account j on t.uid=j.uid
  1036. left join (select count(0) as x,seller_id from t_order
  1037. where order_status != 4
  1038. group by seller_id ) o on t.uid=o.seller_id
  1039. where t.expert=1
  1040. and t.uid=#{uid,jdbcType=VARCHAR}
  1041. </select>
  1042. <select id="getExperts" resultType="com.goafanti.user.bo.UserIdentityBo">
  1043. select t.id ,t.uid,u.identify_name as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
  1044. u.type,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  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. and t.audit_status =2
  1052. and u.source=0
  1053. order by u.update_time desc
  1054. limit #{0}
  1055. </select>
  1056. <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
  1057. 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,
  1058. u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1059. from user_identity t left JOIN user u on t.uid = u.id
  1060. left join (select count(0) as x,seller_id from t_order
  1061. where order_status != 4
  1062. group by seller_id ) o on t.uid=o.seller_id
  1063. where expert=1
  1064. and u.status !=1
  1065. and t.audit_status =2
  1066. <if test="industry != null">
  1067. and t.industry = #{industry,jdbcType=VARCHAR}
  1068. </if>
  1069. <if test="name != null">
  1070. and u.nickname like concat('%',#{name},'%')
  1071. </if>
  1072. <if test="page_sql!=null">
  1073. ${page_sql}
  1074. </if>
  1075. </select>
  1076. <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
  1077. select count(0)
  1078. from user_identity t left JOIN user u on t.uid = u.id
  1079. left join (select count(0) as x,seller_id from t_order
  1080. where order_status != 4
  1081. group by seller_id ) o on t.uid=o.seller_id
  1082. where expert=1
  1083. and u.status !=1
  1084. <if test="industry != null">
  1085. and t.industry = #{industry,jdbcType=VARCHAR}
  1086. </if>
  1087. <if test="name != null">
  1088. and u.nickname like concat('%',#{name},'%')
  1089. </if>
  1090. </select>
  1091. <select id="countInterest" resultType="java.lang.Integer">
  1092. select count(0)
  1093. from user_interest
  1094. where to_uid=#{uid,jdbcType=VARCHAR}
  1095. </select>
  1096. <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
  1097. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1098. t.expert as consultant,ifnull(x.n,0) as reservationCount
  1099. from user_identity t
  1100. left join `user` u on t.uid=u.id
  1101. left join ( select y.x as n, y.seller_id
  1102. from (select count( 0 ) as x,seller_id from t_order
  1103. where order_status != 4
  1104. group by seller_id)y)x on t.uid=x.seller_id
  1105. where t.expert=2
  1106. <if test="page_sql!=null">
  1107. ${page_sql}
  1108. </if>
  1109. </select>
  1110. <select id="findConsultantCount" resultType="java.lang.Integer">
  1111. select count(0)
  1112. from user_identity t
  1113. left join `user` u on t.uid=u.id
  1114. where t.expert=2
  1115. </select>
  1116. <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
  1117. select
  1118. t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
  1119. u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
  1120. from user_identity t
  1121. left join user u on t.uid =u.id
  1122. left join jpush_easemob_account j on t.uid=j.uid
  1123. left join (select count(0) as x,seller_id from t_order
  1124. where order_status != 4
  1125. group by seller_id ) o on t.uid=o.seller_id
  1126. where t.expert=2
  1127. and t.uid = #{uid,jdbcType=VARCHAR}
  1128. </select>
  1129. <select id="getAppHomeRecommended" resultType="com.goafanti.user.bo.UserIdentityRecommended">
  1130. select
  1131. ep.expert_id as id, u.identify_name as name, ui.work_unit as workUnit ,ui.professional_title as professionalTitle, u.introduction as introduction,
  1132. u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
  1133. from expert_publish ep
  1134. left join user_identity ui on ep.expert_id = ui.uid
  1135. left join user u on ep.expert_id = u.id
  1136. left join (select count(0) as x,seller_id from t_order
  1137. where order_status != 4
  1138. group by seller_id ) o on ep.expert_id=o.seller_id
  1139. where
  1140. ep.publish_client = '1'
  1141. and ep.publish_page = 'W01'
  1142. order by
  1143. ep.if_top, ep.top_number, ep.show_number asc
  1144. limit 0,6
  1145. </select>
  1146. <select id="getConsultantList" resultType="com.goafanti.app.bo.consultantListBo">
  1147. select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
  1148. t.expert as consultant,ifnull(x.n,0) as reservationCount,work_unit as workUnit
  1149. from user_identity t
  1150. left join `user` u on t.uid=u.id
  1151. left join ( select y.x as n, y.seller_id
  1152. from (select count( 0 ) as x,seller_id from t_order
  1153. where order_status != 4
  1154. group by seller_id)y)x on t.uid=x.seller_id
  1155. where t.expert=2
  1156. limit #{0}
  1157. </select>
  1158. <select id="listInterestedExpert" resultType="com.goafanti.user.bo.UserIdentityBo">
  1159. select t.id ,t.uid,u.identify_name as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
  1160. u.type,u.introduction,u.head_portrait_url as headPortraitUrl
  1161. from user_identity t left JOIN user u on t.uid = u.id
  1162. left join user_interest ui on ui.to_uid=u.id
  1163. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1164. <if test="page_sql!=null">
  1165. ${page_sql}
  1166. </if>
  1167. </select>
  1168. <select id="listInterestedExpertCount" resultType="java.lang.Integer">
  1169. select count(0)
  1170. from user_identity t left JOIN user u on t.uid = u.id
  1171. left join user_interest ui on ui.to_uid=u.id
  1172. where ui.from_uid=#{uid,jdbcType=VARCHAR}
  1173. </select>
  1174. <select id="appMyInterestedExpertList" resultType="com.goafanti.user.bo.MyInterestedBo">
  1175. select t.id ,t.uid,u.identify_name as name,t.work_unit as workUnit,u.introduction,
  1176. t.professional_title as professionalTitle,u.head_portrait_url as imgUrl,
  1177. if(isnull(a.count),0,a.count) as interestCount
  1178. from user_identity t left JOIN `user` u on t.uid = u.id
  1179. left join user_interest ui on ui.to_uid=u.id
  1180. left join (select to_uid,count(*) as count from user_interest
  1181. order by to_uid) a on ui.to_uid=u.id
  1182. where t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
  1183. <if test="page_sql!=null">
  1184. ${page_sql}
  1185. </if>
  1186. </select>
  1187. <select id="appMyInterestedExpertCount" resultType="java.lang.Integer">
  1188. select count(0)
  1189. from user_identity t left JOIN user u on t.uid = u.id
  1190. left join user_interest ui on ui.to_uid=u.id
  1191. where t.expert=1 and ui.from_uid=#{uid,jdbcType=VARCHAR}
  1192. </select>
  1193. <select id="selectCustomerAuditList" resultType="com.goafanti.app.bo.ExpertsListBo">
  1194. select u.id as uid, u.nickname as username, u.head_portrait_url as personPortraitUrl,
  1195. u.introduction, ui.industry, ui.work_unit as workUnit, ui.professional_title as professionalTitle,
  1196. ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
  1197. ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
  1198. ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
  1199. from
  1200. `user` u left join user_identity ui on ui.uid = u.id
  1201. left join( select
  1202. b.seller_id as uid, sum( case when a.star &gt; 3 then 1 else 0 end ) as a,
  1203. sum( case when a.star = 3 then 1 else 0 end ) as b,
  1204. sum( case when a.star &lt; 3 then 1 else 0 end ) as c, count(*) as d
  1205. from jt_commodity_comment a left join jt_consult_order b on
  1206. a.order_no = b.order_no group by b.seller_id
  1207. ) x on u.id = x.uid
  1208. left join( select count(*) as count, to_uid from user_interest group by to_uid) a
  1209. on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} ) b
  1210. on u.id = b.to_uid
  1211. where u.status = 0 and u.source = 1
  1212. and ui.expert = 1 and ui.expert_audit=2
  1213. <if test="industry != null">
  1214. and ui.industry= #{industry,jdbcType=VARCHAR}
  1215. </if>
  1216. <if test="name != null">
  1217. and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1218. </if>
  1219. <if test="sortType == 0">
  1220. order by u.create_time desc
  1221. </if>
  1222. <if test="sortType == 1">
  1223. order by favorableRate desc
  1224. </if>
  1225. <if test="page_sql!=null">
  1226. ${page_sql}
  1227. </if>
  1228. </select>
  1229. <select id="selectCustomerAuditCount" resultType="java.lang.Integer">
  1230. select count(0)from
  1231. `user` u left join user_identity ui on ui.uid = u.id
  1232. where u.status = 0 and u.source = 1 and ui.expert = 1 and ui.expert_audit=2
  1233. <if test="industry != null">
  1234. and ui.industry= #{industry,jdbcType=VARCHAR}
  1235. </if>
  1236. <if test="name != null">
  1237. and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1238. </if>
  1239. </select>
  1240. <select id="selectAppExpertsDetail" resultType="com.goafanti.app.bo.ExpertsListBo">
  1241. select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitUrl,b.consultant_type as consultantType,
  1242. b.industry,b.work_unit as workUnit,b.professional_title as professionalTitle,a.introduction,
  1243. ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
  1244. ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
  1245. if(isnull(d.to_uid),0,1) as interested
  1246. from `user` a left join user_identity b on a.id=b.uid left join (select b.seller_id as uid,
  1247. sum(case when a.star &gt; 3 then 1 else 0 end) as a,
  1248. sum(case when a.star=3 then 1 else 0 end) as b,
  1249. sum(case when a.star &lt; 3 then 1 else 0 end) as c,count(*) as d
  1250. from jt_commodity_comment a
  1251. left join jt_consult_order b on a.order_no=b.order_no
  1252. group by b.seller_id)x on a.id=x.uid
  1253. left join (select count(*) as count,to_uid from user_interest group by to_uid)c on a.id=c.to_uid
  1254. left join (select to_uid from user_interest where from_uid='1')d on a.id=d.to_uid
  1255. where a.id=#{id,jdbcType=VARCHAR}
  1256. </select>
  1257. <select id="appConsultantList" resultType="com.goafanti.app.bo.ExpertsListBo">
  1258. select u.id as uid, u.nickname as username, u.head_portrait_url as personPortraitUrl,ui.consultant_type as consultantType,
  1259. u.introduction, ui.industry, ui.work_unit as workUnit, ui.professional_title as professionalTitle,
  1260. ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
  1261. ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
  1262. ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
  1263. from
  1264. `user` u left join user_identity ui on ui.uid = u.id
  1265. left join(select b.seller_id as uid,
  1266. sum(case when a.star &gt; 3 then 1 else 0 end) as a,
  1267. sum(case when a.star=3 then 1 else 0 end) as b,
  1268. sum(case when a.star &lt; 3 then 1 else 0 end) as c,count(*) as d
  1269. from jt_commodity_comment a
  1270. left join jt_consult_order b on a.order_no=b.order_no
  1271. group by b.seller_id)x on u.id=x.uid
  1272. left join( select count(*) as count, to_uid from user_interest group by to_uid) a
  1273. on u.id = a.to_uid left join( select to_uid from user_interest where from_uid ='1' ) b
  1274. on u.id = b.to_uid
  1275. where u.status = 0 and u.source = 1
  1276. and ui.expert = 2 and ui.expert_audit=2
  1277. <if test="consultantType != null">
  1278. and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
  1279. </if>
  1280. <if test="province != null">
  1281. and ui.province= #{consultantType,jdbcType=INTEGER}
  1282. </if>
  1283. <if test="city != null">
  1284. and ui.city=#{consultantType,jdbcType=INTEGER}
  1285. </if>
  1286. <if test="area != null">
  1287. and ui.area=#{consultantType,jdbcType=INTEGER}
  1288. </if>
  1289. <if test="name != null">
  1290. and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1291. </if>
  1292. <if test="sortType == 0">
  1293. order by u.create_time desc
  1294. </if>
  1295. <if test="sortType == 1">
  1296. order by favorableRate desc
  1297. </if>
  1298. <if test="page_sql!=null">
  1299. ${page_sql}
  1300. </if>
  1301. </select>
  1302. <select id="appConsultantCount" resultType="java.lang.Integer">
  1303. select count(*)
  1304. from
  1305. `user` u left join user_identity ui on ui.uid = u.id
  1306. where u.status = 0 and u.source = 1
  1307. and ui.expert = 2 and ui.expert_audit=2
  1308. <if test="consultantType != null">
  1309. and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
  1310. </if>
  1311. <if test="province != null">
  1312. and ui.province= #{consultantType,jdbcType=INTEGER}
  1313. </if>
  1314. <if test="city != null">
  1315. and ui.city=#{consultantType,jdbcType=INTEGER}
  1316. </if>
  1317. <if test="area != null">
  1318. and ui.area=#{consultantType,jdbcType=INTEGER}
  1319. </if>
  1320. <if test="name != null">
  1321. and u.nickname like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1322. </if>
  1323. </select>
  1324. <!-- 获得专家顾问审核列表数据 -->
  1325. <select id="getExpertAuditList" resultMap="BaseResultMap">
  1326. select
  1327. i.id, i.uid, i.username, id_number, positive_id_url, i.audit_status, expert, i.audit_status as expert_audit, fixed_tel, industry,
  1328. u.mobile as contact_mobile, c.name as contacts
  1329. from user_identity i
  1330. inner join user u on i.uid = u.id
  1331. inner join industry_category c on c.id = i.industry
  1332. where 1 = 1
  1333. <if test="expertAudit != null ">
  1334. and i.audit_status = #{expertAudit,jdbcType=VARCHAR}
  1335. </if>
  1336. <if test="industry != null ">
  1337. and industry = #{industry,jdbcType=INTEGER}
  1338. </if>
  1339. <if test="expert != null ">
  1340. and expert = #{expert,jdbcType=INTEGER}
  1341. </if>
  1342. <if test="expert == null ">
  1343. and expert &gt; 0
  1344. </if>
  1345. <if test="username != null">
  1346. <bind name="un" value="'%' + username + '%'"/>
  1347. and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
  1348. </if>
  1349. <if test="page_sql!=null">
  1350. ${page_sql}
  1351. </if>
  1352. </select>
  1353. <select id="getExpertAuditListCount" resultType="java.lang.Integer">
  1354. select
  1355. count(0)
  1356. from user_identity i
  1357. inner join user u on i.uid = u.id
  1358. where 1 = 1
  1359. <if test="expertAudit != null ">
  1360. and i.audit_status = #{expertAudit,jdbcType=VARCHAR}
  1361. </if>
  1362. <if test="industry != null ">
  1363. and industry = #{industry,jdbcType=INTEGER}
  1364. </if>
  1365. <if test="expert != null ">
  1366. and expert = #{expert,jdbcType=INTEGER}
  1367. </if>
  1368. <if test="expert == null ">
  1369. and expert &gt; 0
  1370. </if>
  1371. <if test="username != null">
  1372. <bind name="un" value="'%' + username + '%'"/>
  1373. and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
  1374. </if>
  1375. </select>
  1376. <!-- 获得用户认证信息数据 -->
  1377. <select id="getUserIdentityByUid" parameterType="java.lang.String" resultMap="BaseResultMap">
  1378. select *
  1379. from `user` u
  1380. inner join user_identity i on u.id = i.uid
  1381. where u.id = #{uid,jdbcType=VARCHAR}
  1382. </select>
  1383. </mapper>