UserIdentityMapper.xml 57 KB

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