UserIdentityMapper.xml 61 KB

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