UserMapper.xml 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  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.UserMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.User">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Thu May 31 15:33:56 CST 2018.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="mobile" jdbcType="VARCHAR" property="mobile" />
  12. <result column="password" jdbcType="VARCHAR" property="password" />
  13. <result column="nickname" jdbcType="VARCHAR" property="nickname" />
  14. <result column="email" jdbcType="VARCHAR" property="email" />
  15. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  16. <result column="number" jdbcType="BIGINT" property="number" />
  17. <result column="lvl" jdbcType="INTEGER" property="lvl" />
  18. <result column="type" jdbcType="INTEGER" property="type" />
  19. <result column="mid" jdbcType="VARCHAR" property="mid" />
  20. <result column="status" jdbcType="INTEGER" property="status" />
  21. <result column="source" jdbcType="INTEGER" property="source" />
  22. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  23. <result column="company_logo_url" jdbcType="VARCHAR" property="companyLogoUrl" />
  24. <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
  25. <result column="society_tag" jdbcType="VARCHAR" property="societyTag" />
  26. <result column="introduction" jdbcType="VARCHAR" property="introduction" />
  27. <result column="value_added_tag" jdbcType="VARCHAR" property="valueAddedTag" />
  28. <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
  29. <result column="identify_name" jdbcType="VARCHAR" property="identifyName" />
  30. <result column="background_url" jdbcType="VARCHAR" property="backgroundUrl" />
  31. <result column="audit_opinion" jdbcType="VARCHAR" property="auditOpinion" />
  32. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  33. <result column="share_type" jdbcType="INTEGER" property="shareType" />
  34. <result column="aid" jdbcType="VARCHAR" property="aid" />
  35. <result column="transfer_time" jdbcType="TIMESTAMP" property="transferTime" />
  36. <result column="username" jdbcType="VARCHAR" property="username" />
  37. <result column="authentication" jdbcType="INTEGER" property="authentication" />
  38. </resultMap>
  39. <sql id="Example_Where_Clause">
  40. <!--
  41. WARNING - @mbg.generated
  42. This element is automatically generated by MyBatis Generator, do not modify.
  43. This element was generated on Thu May 31 15:33:56 CST 2018.
  44. -->
  45. <where>
  46. <foreach collection="oredCriteria" item="criteria" separator="or">
  47. <if test="criteria.valid">
  48. <trim prefix="(" prefixOverrides="and" suffix=")">
  49. <foreach collection="criteria.criteria" item="criterion">
  50. <choose>
  51. <when test="criterion.noValue">
  52. and ${criterion.condition}
  53. </when>
  54. <when test="criterion.singleValue">
  55. and ${criterion.condition} #{criterion.value}
  56. </when>
  57. <when test="criterion.betweenValue">
  58. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  59. </when>
  60. <when test="criterion.listValue">
  61. and ${criterion.condition}
  62. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  63. #{listItem}
  64. </foreach>
  65. </when>
  66. </choose>
  67. </foreach>
  68. </trim>
  69. </if>
  70. </foreach>
  71. </where>
  72. </sql>
  73. <sql id="Update_By_Example_Where_Clause">
  74. <!--
  75. WARNING - @mbg.generated
  76. This element is automatically generated by MyBatis Generator, do not modify.
  77. This element was generated on Thu May 31 15:33:56 CST 2018.
  78. -->
  79. <where>
  80. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  81. <if test="criteria.valid">
  82. <trim prefix="(" prefixOverrides="and" suffix=")">
  83. <foreach collection="criteria.criteria" item="criterion">
  84. <choose>
  85. <when test="criterion.noValue">
  86. and ${criterion.condition}
  87. </when>
  88. <when test="criterion.singleValue">
  89. and ${criterion.condition} #{criterion.value}
  90. </when>
  91. <when test="criterion.betweenValue">
  92. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  93. </when>
  94. <when test="criterion.listValue">
  95. and ${criterion.condition}
  96. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  97. #{listItem}
  98. </foreach>
  99. </when>
  100. </choose>
  101. </foreach>
  102. </trim>
  103. </if>
  104. </foreach>
  105. </where>
  106. </sql>
  107. <sql id="Base_Column_List">
  108. <!--
  109. WARNING - @mbg.generated
  110. This element is automatically generated by MyBatis Generator, do not modify.
  111. This element was generated on Thu May 31 15:33:56 CST 2018.
  112. -->
  113. id, mobile, password, nickname, email, create_time, number, lvl, type, mid, status,
  114. source, update_time, company_logo_url, head_portrait_url, society_tag, introduction,
  115. value_added_tag, organization_id, identify_name, background_url, audit_opinion, audit_status,
  116. share_type, aid, transfer_time, username, authentication
  117. </sql>
  118. <select id="selectByExample" parameterType="com.goafanti.common.model.UserExample" resultMap="BaseResultMap">
  119. <!--
  120. WARNING - @mbg.generated
  121. This element is automatically generated by MyBatis Generator, do not modify.
  122. This element was generated on Thu May 31 15:33:56 CST 2018.
  123. -->
  124. select
  125. <if test="distinct">
  126. distinct
  127. </if>
  128. <include refid="Base_Column_List" />
  129. from user
  130. <if test="_parameter != null">
  131. <include refid="Example_Where_Clause" />
  132. </if>
  133. <if test="orderByClause != null">
  134. order by ${orderByClause}
  135. </if>
  136. </select>
  137. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  138. <!--
  139. WARNING - @mbg.generated
  140. This element is automatically generated by MyBatis Generator, do not modify.
  141. This element was generated on Thu May 31 15:33:56 CST 2018.
  142. -->
  143. select
  144. <include refid="Base_Column_List" />
  145. from user
  146. where id = #{id,jdbcType=VARCHAR}
  147. </select>
  148. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. This element was generated on Thu May 31 15:33:56 CST 2018.
  153. -->
  154. delete from user
  155. where id = #{id,jdbcType=VARCHAR}
  156. </delete>
  157. <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserExample">
  158. <!--
  159. WARNING - @mbg.generated
  160. This element is automatically generated by MyBatis Generator, do not modify.
  161. This element was generated on Thu May 31 15:33:56 CST 2018.
  162. -->
  163. delete from user
  164. <if test="_parameter != null">
  165. <include refid="Example_Where_Clause" />
  166. </if>
  167. </delete>
  168. <insert id="insert" parameterType="com.goafanti.common.model.User">
  169. <!--
  170. WARNING - @mbg.generated
  171. This element is automatically generated by MyBatis Generator, do not modify.
  172. This element was generated on Thu May 31 15:33:56 CST 2018.
  173. -->
  174. insert into user (id, mobile, password,
  175. nickname, email, create_time,
  176. number, lvl, type, mid,
  177. status, source, update_time,
  178. company_logo_url, head_portrait_url, society_tag,
  179. introduction, value_added_tag, organization_id,
  180. identify_name, background_url, audit_opinion,
  181. audit_status, share_type, aid,
  182. transfer_time, username, authentication
  183. )
  184. values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
  185. #{nickname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  186. #{number,jdbcType=BIGINT}, #{lvl,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{mid,jdbcType=VARCHAR},
  187. #{status,jdbcType=INTEGER}, #{source,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
  188. #{companyLogoUrl,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR}, #{societyTag,jdbcType=VARCHAR},
  189. #{introduction,jdbcType=VARCHAR}, #{valueAddedTag,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR},
  190. #{identifyName,jdbcType=VARCHAR}, #{backgroundUrl,jdbcType=VARCHAR}, #{auditOpinion,jdbcType=VARCHAR},
  191. #{auditStatus,jdbcType=INTEGER}, #{shareType,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
  192. #{transferTime,jdbcType=TIMESTAMP}, #{username,jdbcType=VARCHAR}, #{authentication,jdbcType=INTEGER}
  193. )
  194. </insert>
  195. <insert id="insertSelective" parameterType="com.goafanti.common.model.User">
  196. <!--
  197. WARNING - @mbg.generated
  198. This element is automatically generated by MyBatis Generator, do not modify.
  199. This element was generated on Thu May 31 15:33:56 CST 2018.
  200. -->
  201. insert into user
  202. <trim prefix="(" suffix=")" suffixOverrides=",">
  203. <if test="id != null">
  204. id,
  205. </if>
  206. <if test="mobile != null">
  207. mobile,
  208. </if>
  209. <if test="password != null">
  210. password,
  211. </if>
  212. <if test="nickname != null">
  213. nickname,
  214. </if>
  215. <if test="email != null">
  216. email,
  217. </if>
  218. <if test="createTime != null">
  219. create_time,
  220. </if>
  221. <if test="number != null">
  222. number,
  223. </if>
  224. <if test="lvl != null">
  225. lvl,
  226. </if>
  227. <if test="type != null">
  228. type,
  229. </if>
  230. <if test="mid != null">
  231. mid,
  232. </if>
  233. <if test="status != null">
  234. status,
  235. </if>
  236. <if test="source != null">
  237. source,
  238. </if>
  239. <if test="updateTime != null">
  240. update_time,
  241. </if>
  242. <if test="companyLogoUrl != null">
  243. company_logo_url,
  244. </if>
  245. <if test="headPortraitUrl != null">
  246. head_portrait_url,
  247. </if>
  248. <if test="societyTag != null">
  249. society_tag,
  250. </if>
  251. <if test="introduction != null">
  252. introduction,
  253. </if>
  254. <if test="valueAddedTag != null">
  255. value_added_tag,
  256. </if>
  257. <if test="organizationId != null">
  258. organization_id,
  259. </if>
  260. <if test="identifyName != null">
  261. identify_name,
  262. </if>
  263. <if test="backgroundUrl != null">
  264. background_url,
  265. </if>
  266. <if test="auditOpinion != null">
  267. audit_opinion,
  268. </if>
  269. <if test="auditStatus != null">
  270. audit_status,
  271. </if>
  272. <if test="shareType != null">
  273. share_type,
  274. </if>
  275. <if test="aid != null">
  276. aid,
  277. </if>
  278. <if test="transferTime != null">
  279. transfer_time,
  280. </if>
  281. <if test="username != null">
  282. username,
  283. </if>
  284. <if test="authentication != null">
  285. authentication,
  286. </if>
  287. </trim>
  288. <trim prefix="values (" suffix=")" suffixOverrides=",">
  289. <if test="id != null">
  290. #{id,jdbcType=VARCHAR},
  291. </if>
  292. <if test="mobile != null">
  293. #{mobile,jdbcType=VARCHAR},
  294. </if>
  295. <if test="password != null">
  296. #{password,jdbcType=VARCHAR},
  297. </if>
  298. <if test="nickname != null">
  299. #{nickname,jdbcType=VARCHAR},
  300. </if>
  301. <if test="email != null">
  302. #{email,jdbcType=VARCHAR},
  303. </if>
  304. <if test="createTime != null">
  305. #{createTime,jdbcType=TIMESTAMP},
  306. </if>
  307. <if test="number != null">
  308. #{number,jdbcType=BIGINT},
  309. </if>
  310. <if test="lvl != null">
  311. #{lvl,jdbcType=INTEGER},
  312. </if>
  313. <if test="type != null">
  314. #{type,jdbcType=INTEGER},
  315. </if>
  316. <if test="mid != null">
  317. #{mid,jdbcType=VARCHAR},
  318. </if>
  319. <if test="status != null">
  320. #{status,jdbcType=INTEGER},
  321. </if>
  322. <if test="source != null">
  323. #{source,jdbcType=INTEGER},
  324. </if>
  325. <if test="updateTime != null">
  326. #{updateTime,jdbcType=TIMESTAMP},
  327. </if>
  328. <if test="companyLogoUrl != null">
  329. #{companyLogoUrl,jdbcType=VARCHAR},
  330. </if>
  331. <if test="headPortraitUrl != null">
  332. #{headPortraitUrl,jdbcType=VARCHAR},
  333. </if>
  334. <if test="societyTag != null">
  335. #{societyTag,jdbcType=VARCHAR},
  336. </if>
  337. <if test="introduction != null">
  338. #{introduction,jdbcType=VARCHAR},
  339. </if>
  340. <if test="valueAddedTag != null">
  341. #{valueAddedTag,jdbcType=VARCHAR},
  342. </if>
  343. <if test="organizationId != null">
  344. #{organizationId,jdbcType=VARCHAR},
  345. </if>
  346. <if test="identifyName != null">
  347. #{identifyName,jdbcType=VARCHAR},
  348. </if>
  349. <if test="backgroundUrl != null">
  350. #{backgroundUrl,jdbcType=VARCHAR},
  351. </if>
  352. <if test="auditOpinion != null">
  353. #{auditOpinion,jdbcType=VARCHAR},
  354. </if>
  355. <if test="auditStatus != null">
  356. #{auditStatus,jdbcType=INTEGER},
  357. </if>
  358. <if test="shareType != null">
  359. #{shareType,jdbcType=INTEGER},
  360. </if>
  361. <if test="aid != null">
  362. #{aid,jdbcType=VARCHAR},
  363. </if>
  364. <if test="transferTime != null">
  365. #{transferTime,jdbcType=TIMESTAMP},
  366. </if>
  367. <if test="username != null">
  368. #{username,jdbcType=VARCHAR},
  369. </if>
  370. <if test="authentication != null">
  371. #{authentication,jdbcType=INTEGER},
  372. </if>
  373. </trim>
  374. </insert>
  375. <select id="countByExample" parameterType="com.goafanti.common.model.UserExample" resultType="java.lang.Long">
  376. <!--
  377. WARNING - @mbg.generated
  378. This element is automatically generated by MyBatis Generator, do not modify.
  379. This element was generated on Thu May 31 15:33:56 CST 2018.
  380. -->
  381. select count(*) from user
  382. <if test="_parameter != null">
  383. <include refid="Example_Where_Clause" />
  384. </if>
  385. </select>
  386. <update id="updateByExampleSelective" parameterType="map">
  387. <!--
  388. WARNING - @mbg.generated
  389. This element is automatically generated by MyBatis Generator, do not modify.
  390. This element was generated on Thu May 31 15:33:56 CST 2018.
  391. -->
  392. update user
  393. <set>
  394. <if test="record.id != null">
  395. id = #{record.id,jdbcType=VARCHAR},
  396. </if>
  397. <if test="record.mobile != null">
  398. mobile = #{record.mobile,jdbcType=VARCHAR},
  399. </if>
  400. <if test="record.password != null">
  401. password = #{record.password,jdbcType=VARCHAR},
  402. </if>
  403. <if test="record.nickname != null">
  404. nickname = #{record.nickname,jdbcType=VARCHAR},
  405. </if>
  406. <if test="record.email != null">
  407. email = #{record.email,jdbcType=VARCHAR},
  408. </if>
  409. <if test="record.createTime != null">
  410. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  411. </if>
  412. <if test="record.number != null">
  413. number = #{record.number,jdbcType=BIGINT},
  414. </if>
  415. <if test="record.lvl != null">
  416. lvl = #{record.lvl,jdbcType=INTEGER},
  417. </if>
  418. <if test="record.type != null">
  419. type = #{record.type,jdbcType=INTEGER},
  420. </if>
  421. <if test="record.mid != null">
  422. mid = #{record.mid,jdbcType=VARCHAR},
  423. </if>
  424. <if test="record.status != null">
  425. status = #{record.status,jdbcType=INTEGER},
  426. </if>
  427. <if test="record.source != null">
  428. source = #{record.source,jdbcType=INTEGER},
  429. </if>
  430. <if test="record.updateTime != null">
  431. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  432. </if>
  433. <if test="record.companyLogoUrl != null">
  434. company_logo_url = #{record.companyLogoUrl,jdbcType=VARCHAR},
  435. </if>
  436. <if test="record.headPortraitUrl != null">
  437. head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR},
  438. </if>
  439. <if test="record.societyTag != null">
  440. society_tag = #{record.societyTag,jdbcType=VARCHAR},
  441. </if>
  442. <if test="record.introduction != null">
  443. introduction = #{record.introduction,jdbcType=VARCHAR},
  444. </if>
  445. <if test="record.valueAddedTag != null">
  446. value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
  447. </if>
  448. <if test="record.organizationId != null">
  449. organization_id = #{record.organizationId,jdbcType=VARCHAR},
  450. </if>
  451. <if test="record.identifyName != null">
  452. identify_name = #{record.identifyName,jdbcType=VARCHAR},
  453. </if>
  454. <if test="record.backgroundUrl != null">
  455. background_url = #{record.backgroundUrl,jdbcType=VARCHAR},
  456. </if>
  457. <if test="record.auditOpinion != null">
  458. audit_opinion = #{record.auditOpinion,jdbcType=VARCHAR},
  459. </if>
  460. <if test="record.auditStatus != null">
  461. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  462. </if>
  463. <if test="record.shareType != null">
  464. share_type = #{record.shareType,jdbcType=INTEGER},
  465. </if>
  466. <if test="record.aid != null">
  467. aid = #{record.aid,jdbcType=VARCHAR},
  468. </if>
  469. <if test="record.transferTime != null">
  470. transfer_time = #{record.transferTime,jdbcType=TIMESTAMP},
  471. </if>
  472. <if test="record.username != null">
  473. username = #{record.username,jdbcType=VARCHAR},
  474. </if>
  475. <if test="record.authentication != null">
  476. authentication = #{record.authentication,jdbcType=INTEGER},
  477. </if>
  478. </set>
  479. <if test="_parameter != null">
  480. <include refid="Update_By_Example_Where_Clause" />
  481. </if>
  482. </update>
  483. <update id="updateByExample" parameterType="map">
  484. <!--
  485. WARNING - @mbg.generated
  486. This element is automatically generated by MyBatis Generator, do not modify.
  487. This element was generated on Thu May 31 15:33:56 CST 2018.
  488. -->
  489. update user
  490. set id = #{record.id,jdbcType=VARCHAR},
  491. mobile = #{record.mobile,jdbcType=VARCHAR},
  492. password = #{record.password,jdbcType=VARCHAR},
  493. nickname = #{record.nickname,jdbcType=VARCHAR},
  494. email = #{record.email,jdbcType=VARCHAR},
  495. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  496. number = #{record.number,jdbcType=BIGINT},
  497. lvl = #{record.lvl,jdbcType=INTEGER},
  498. type = #{record.type,jdbcType=INTEGER},
  499. mid = #{record.mid,jdbcType=VARCHAR},
  500. status = #{record.status,jdbcType=INTEGER},
  501. source = #{record.source,jdbcType=INTEGER},
  502. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  503. company_logo_url = #{record.companyLogoUrl,jdbcType=VARCHAR},
  504. head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR},
  505. society_tag = #{record.societyTag,jdbcType=VARCHAR},
  506. introduction = #{record.introduction,jdbcType=VARCHAR},
  507. value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
  508. organization_id = #{record.organizationId,jdbcType=VARCHAR},
  509. identify_name = #{record.identifyName,jdbcType=VARCHAR},
  510. background_url = #{record.backgroundUrl,jdbcType=VARCHAR},
  511. audit_opinion = #{record.auditOpinion,jdbcType=VARCHAR},
  512. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  513. share_type = #{record.shareType,jdbcType=INTEGER},
  514. aid = #{record.aid,jdbcType=VARCHAR},
  515. transfer_time = #{record.transferTime,jdbcType=TIMESTAMP},
  516. username = #{record.username,jdbcType=VARCHAR},
  517. authentication = #{record.authentication,jdbcType=INTEGER}
  518. <if test="_parameter != null">
  519. <include refid="Update_By_Example_Where_Clause" />
  520. </if>
  521. </update>
  522. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.User">
  523. <!--
  524. WARNING - @mbg.generated
  525. This element is automatically generated by MyBatis Generator, do not modify.
  526. This element was generated on Thu May 31 15:33:56 CST 2018.
  527. -->
  528. update user
  529. <set>
  530. <if test="mobile != null">
  531. mobile = #{mobile,jdbcType=VARCHAR},
  532. </if>
  533. <if test="password != null">
  534. password = #{password,jdbcType=VARCHAR},
  535. </if>
  536. <if test="nickname != null">
  537. nickname = #{nickname,jdbcType=VARCHAR},
  538. </if>
  539. <if test="email != null">
  540. email = #{email,jdbcType=VARCHAR},
  541. </if>
  542. <if test="createTime != null">
  543. create_time = #{createTime,jdbcType=TIMESTAMP},
  544. </if>
  545. <if test="number != null">
  546. number = #{number,jdbcType=BIGINT},
  547. </if>
  548. <if test="lvl != null">
  549. lvl = #{lvl,jdbcType=INTEGER},
  550. </if>
  551. <if test="type != null">
  552. type = #{type,jdbcType=INTEGER},
  553. </if>
  554. <if test="mid != null">
  555. mid = #{mid,jdbcType=VARCHAR},
  556. </if>
  557. <if test="status != null">
  558. status = #{status,jdbcType=INTEGER},
  559. </if>
  560. <if test="source != null">
  561. source = #{source,jdbcType=INTEGER},
  562. </if>
  563. <if test="updateTime != null">
  564. update_time = #{updateTime,jdbcType=TIMESTAMP},
  565. </if>
  566. <if test="companyLogoUrl != null">
  567. company_logo_url = #{companyLogoUrl,jdbcType=VARCHAR},
  568. </if>
  569. <if test="headPortraitUrl != null">
  570. head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
  571. </if>
  572. <if test="societyTag != null">
  573. society_tag = #{societyTag,jdbcType=VARCHAR},
  574. </if>
  575. <if test="introduction != null">
  576. introduction = #{introduction,jdbcType=VARCHAR},
  577. </if>
  578. <if test="valueAddedTag != null">
  579. value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
  580. </if>
  581. <if test="organizationId != null">
  582. organization_id = #{organizationId,jdbcType=VARCHAR},
  583. </if>
  584. <if test="identifyName != null">
  585. identify_name = #{identifyName,jdbcType=VARCHAR},
  586. </if>
  587. <if test="backgroundUrl != null">
  588. background_url = #{backgroundUrl,jdbcType=VARCHAR},
  589. </if>
  590. <if test="auditOpinion != null">
  591. audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
  592. </if>
  593. <if test="auditStatus != null">
  594. audit_status = #{auditStatus,jdbcType=INTEGER},
  595. </if>
  596. <if test="shareType != null">
  597. share_type = #{shareType,jdbcType=INTEGER},
  598. </if>
  599. <if test="aid != null">
  600. aid = #{aid,jdbcType=VARCHAR},
  601. </if>
  602. <if test="transferTime != null">
  603. transfer_time = #{transferTime,jdbcType=TIMESTAMP},
  604. </if>
  605. <if test="username != null">
  606. username = #{username,jdbcType=VARCHAR},
  607. </if>
  608. <if test="authentication != null">
  609. authentication = #{authentication,jdbcType=INTEGER},
  610. </if>
  611. </set>
  612. where id = #{id,jdbcType=VARCHAR}
  613. </update>
  614. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.User">
  615. <!--
  616. WARNING - @mbg.generated
  617. This element is automatically generated by MyBatis Generator, do not modify.
  618. This element was generated on Thu May 31 15:33:56 CST 2018.
  619. -->
  620. update user
  621. set mobile = #{mobile,jdbcType=VARCHAR},
  622. password = #{password,jdbcType=VARCHAR},
  623. nickname = #{nickname,jdbcType=VARCHAR},
  624. email = #{email,jdbcType=VARCHAR},
  625. create_time = #{createTime,jdbcType=TIMESTAMP},
  626. number = #{number,jdbcType=BIGINT},
  627. lvl = #{lvl,jdbcType=INTEGER},
  628. type = #{type,jdbcType=INTEGER},
  629. mid = #{mid,jdbcType=VARCHAR},
  630. status = #{status,jdbcType=INTEGER},
  631. source = #{source,jdbcType=INTEGER},
  632. update_time = #{updateTime,jdbcType=TIMESTAMP},
  633. company_logo_url = #{companyLogoUrl,jdbcType=VARCHAR},
  634. head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
  635. society_tag = #{societyTag,jdbcType=VARCHAR},
  636. introduction = #{introduction,jdbcType=VARCHAR},
  637. value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
  638. organization_id = #{organizationId,jdbcType=VARCHAR},
  639. identify_name = #{identifyName,jdbcType=VARCHAR},
  640. background_url = #{backgroundUrl,jdbcType=VARCHAR},
  641. audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
  642. audit_status = #{auditStatus,jdbcType=INTEGER},
  643. share_type = #{shareType,jdbcType=INTEGER},
  644. aid = #{aid,jdbcType=VARCHAR},
  645. transfer_time = #{transferTime,jdbcType=TIMESTAMP},
  646. username = #{username,jdbcType=VARCHAR},
  647. authentication = #{authentication,jdbcType=INTEGER}
  648. where id = #{id,jdbcType=VARCHAR}
  649. </update>
  650. <resultMap id="UserPageHomeBo" type="com.goafanti.user.bo.UserPageHomeBo">
  651. <result column="uid" jdbcType="VARCHAR" property="uid" />
  652. <result column="lvl" jdbcType="INTEGER" property="lvl" />
  653. <result column="nickname" jdbcType="VARCHAR" property="nickname" />
  654. <result column="username" jdbcType="VARCHAR" property="username"/>
  655. <result column="identify_name" jdbcType="VARCHAR" property="identifyName"/>
  656. <result column="email" jdbcType="VARCHAR" property="email" />
  657. <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
  658. <result column="number" jdbcType="INTEGER" property="number" />
  659. <result column="type" jdbcType="INTEGER" property="type" />
  660. <result column="status" jdbcType="INTEGER" property="status"/>
  661. <result column="authentication" jdbcType="INTEGER" property="authentication"/>
  662. <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
  663. <result column="logo_url" jdbcType="VARCHAR" property="logoUrl" />
  664. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  665. </resultMap>
  666. <resultMap id="UserDownLoadBo" type="com.goafanti.user.bo.UserDownLoadBo">
  667. <id column="id" jdbcType="VARCHAR" property="id" />
  668. <result column="diploma_url" jdbcType="VARCHAR" property="diplomaUrl" />
  669. <result column="degree_diploma_url" jdbcType="VARCHAR" property="degreeDiplomaUrl" />
  670. <result column="professional_certificate_url" jdbcType="VARCHAR" property="professionalCertificateUrl" />
  671. <result column="qualification_certificate_url" jdbcType="VARCHAR" property="qualificationCertificateUrl" />
  672. <result column="positive_id_url" jdbcType="VARCHAR" property="positiveIdUrl" />
  673. <result column="opposite_id_url" jdbcType="VARCHAR" property="oppositeIdUrl" />
  674. </resultMap>
  675. <select id="selectByMobieAndType" resultMap="BaseResultMap">
  676. select
  677. <include refid="Base_Column_List" />
  678. from user
  679. where mobile = #{0} and type=#{1} and source = 0
  680. </select>
  681. <select id="selectByNameAndType" resultMap="BaseResultMap">
  682. select
  683. <include refid="Base_Column_List" />
  684. from
  685. user
  686. where
  687. username = #{username}
  688. <if test="type != null">
  689. and type = #{type}
  690. </if>
  691. and source = 0
  692. </select>
  693. <select id="selectUserBaseByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
  694. select
  695. id,
  696. number,
  697. type,
  698. authentication,
  699. username,
  700. identify_name,
  701. nickname,
  702. create_time,
  703. authentication,
  704. status,email,
  705. head_portrait_url,
  706. mobile from user
  707. where
  708. id = #{uid,jdbcType = VARCHAR}
  709. </select>
  710. <select id="selectUserDownLoadBoByUserId" parameterType="java.lang.String" resultMap="UserDownLoadBo">
  711. select u.id,i.positive_id_url ,i.opposite_id_url,c.professional_certificate_url,c.qualification_certificate_url,
  712. e.diploma_url, e.degree_diploma_url
  713. from user u
  714. LEFT JOIN user_identity i on u.id = i.uid
  715. LEFT JOIN user_career c on u.id = c.uid
  716. LEFT JOIN user_edu e on u.id = e.uid
  717. where u.id =#{id,jdbcType=VARCHAR}
  718. </select>
  719. <select id="findUserListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserListBo">
  720. select
  721. u.id ,
  722. u.mobile,
  723. u.email,
  724. u.create_time as createTime,
  725. u.number ,
  726. i.username,
  727. i.audit_status as auditStatus,
  728. a.name as adminName,
  729. ad.name as managerName
  730. from user u
  731. LEFT JOIN admin a on a.id = u.aid
  732. LEFT JOIN admin ad on ad.id = u.mid
  733. LEFT JOIN user_identity i
  734. ON u.id = i.uid where u.type = 0
  735. <if test="mobile != null">
  736. and u.mobile = #{mobile,jdbcType=VARCHAR}
  737. </if>
  738. <if test="email != null">
  739. and u.email = #{email,jdbcType=VARCHAR}
  740. </if>
  741. <if test="pStart != null">
  742. and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
  743. </if>
  744. <if test="pEnd != null">
  745. and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  746. </if>
  747. <if test=" number != null">
  748. and u.number = #{number,jdbcType=INTEGER}
  749. </if>
  750. <if test="username != null">
  751. and i.username like CONCAT ('%',#{username,jdbcType=VARCHAR},'%')
  752. </if>
  753. <if test="auditStatus != null">
  754. and i.audit_status= #{auditStatus,jdbcType=INTEGER}
  755. </if>
  756. order by u.number desc
  757. <if test="page_sql!=null">
  758. ${page_sql}
  759. </if>
  760. </select>
  761. <select id="findUserCount" parameterType="String" resultType="java.lang.Integer">
  762. select count(1)
  763. from user u LEFT JOIN user_identity i
  764. ON u.id = i.uid
  765. WHERE u.type = 0
  766. <if test="mobile != null">
  767. and u.mobile = #{mobile,jdbcType=VARCHAR}
  768. </if>
  769. <if test="email != null">
  770. and u.email = #{email,jdbcType=VARCHAR}
  771. </if>
  772. <if test="pStart != null">
  773. and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
  774. </if>
  775. <if test="pEnd != null">
  776. and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  777. </if>
  778. <if test="number != null">
  779. and u.number = #{number,jdbcType=INTEGER}
  780. </if>
  781. <if test="username != null">
  782. and i.username like CONCAT ('%',#{username,jdbcType=VARCHAR},'%')
  783. </if>
  784. <if test="auditStatus != null">
  785. and i.audit_status= #{auditStatus,jdbcType=INTEGER}
  786. </if>
  787. </select>
  788. <select id="findOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
  789. select u.id ,u.mobile, u.email, u.create_time as createTime,
  790. u.number, o.audit_status as orgAuditStatus, a.name as adminName,
  791. o.unit_name as unitName, ad.name as managerName
  792. from user u
  793. LEFT JOIN admin a on a.id = u.aid
  794. LEFT JOIN admin ad on ad.id = u.mid
  795. LEFT JOIN organization_identity o
  796. ON u.id = o.uid
  797. WHERE u.type = 1
  798. <if test="mobile != null">
  799. and u.mobile = #{mobile,jdbcType=VARCHAR}
  800. </if>
  801. <if test="uid != null">
  802. and u.id = #{uid,jdbcType=VARCHAR}
  803. </if>
  804. <if test="email != null">
  805. and u.email = #{email,jdbcType=VARCHAR}
  806. </if>
  807. <if test="pStart != null">
  808. and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
  809. </if>
  810. <if test="pEnd != null">
  811. and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  812. </if>
  813. <if test=" number != null">
  814. and u.number = #{number,jdbcType=INTEGER}
  815. </if>
  816. <if test="unitName != null">
  817. and o.unit_name = #{unitName,jdbcType=VARCHAR}
  818. </if>
  819. <if test="auditStatus != null">
  820. and o.audit_status= #{auditStatus,jdbcType=INTEGER}
  821. </if>
  822. order by u.number desc
  823. <if test="page_sql!=null">
  824. ${page_sql}
  825. </if>
  826. </select>
  827. <select id="findOrgCount" parameterType="String" resultType="java.lang.Integer">
  828. select count(1)
  829. from user u LEFT JOIN organization_identity o
  830. ON u.id = o.uid
  831. WHERE u.type = 1
  832. <if test="uid != null">
  833. and u.id = #{uid,jdbcType=VARCHAR}
  834. </if>
  835. <if test="mobile != null">
  836. and u.mobile = #{mobile,jdbcType=VARCHAR}
  837. </if>
  838. <if test="email != null">
  839. and u.email = #{email,jdbcType=VARCHAR}
  840. </if>
  841. <if test="pStart != null">
  842. and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
  843. </if>
  844. <if test="pEnd != null">
  845. and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  846. </if>
  847. <if test=" number != null">
  848. and u.number = #{number,jdbcType=INTEGER}
  849. </if>
  850. <if test="unitName != null">
  851. and o.unit_name = #{unitName,jdbcType=VARCHAR}
  852. </if>
  853. <if test="auditStatus != null">
  854. and o.audit_status= #{auditStatus,jdbcType=INTEGER}
  855. </if>
  856. </select>
  857. <select id="findUserByAidWithParamsListByPage" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgListBo">
  858. select
  859. u.id ,
  860. u.mobile,
  861. u.email,
  862. u.create_time as createTime,
  863. u.number ,
  864. a.name as adminName,
  865. ma.name as managerName,
  866. u.type,
  867. i.username,
  868. i.audit_status as userAuditStatus
  869. from user u
  870. LEFT JOIN admin a on a.id = u.aid
  871. LEFT JOIN admin ma on ma.id = u.mid
  872. LEFT JOIN user_identity i on u.id = i.uid
  873. where u.type = 0
  874. <if test="aid != null">
  875. and u.aid = #{aid,jdbcType=VARCHAR}
  876. </if>
  877. <if test="number !=null">
  878. and u.number = #{number,jdbcType=INTEGER}
  879. </if>
  880. <if test="mobile !=null">
  881. and u.mobile= #{mobile,jdbcType=VARCHAR}
  882. </if>
  883. <if test="auditStatus !=null">
  884. and i.audit_status = #{auditStatus,jdbcType=INTEGER}
  885. </if>
  886. <if test="auditName !=null">
  887. and i.username like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
  888. </if>
  889. <if test="email !=null">
  890. and u.email = #{email,jdbcType=VARCHAR}
  891. </if>
  892. <if test="startCreateTime !=null">
  893. and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
  894. </if>
  895. <if test="endCreateTime !=null">
  896. and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
  897. </if>
  898. order by u.number desc
  899. <if test="page_sql!=null">
  900. ${page_sql}
  901. </if>
  902. </select>
  903. <select id="findUserByAidWithParamsCount" parameterType="String" resultType="java.lang.Integer">
  904. select
  905. count(1)
  906. from user u
  907. LEFT JOIN admin a on a.id = u.aid
  908. LEFT JOIN user_identity i on u.id = i.uid
  909. where u.type = 0
  910. <if test="aid != null">
  911. and u.aid = #{aid,jdbcType=VARCHAR}
  912. </if>
  913. <if test="number !=null">
  914. and u.number = #{number,jdbcType=INTEGER}
  915. </if>
  916. <if test="mobile !=null">
  917. and u.mobile= #{mobile,jdbcType=VARCHAR}
  918. </if>
  919. <if test="auditStatus !=null">
  920. and i.audit_status = #{auditStatus,jdbcType=INTEGER}
  921. </if>
  922. <if test="auditName !=null">
  923. and i.username like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
  924. </if>
  925. <if test="email !=null">
  926. and u.email = #{email,jdbcType=VARCHAR}
  927. </if>
  928. <if test="startCreateTime !=null">
  929. and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
  930. </if>
  931. <if test="endCreateTime !=null">
  932. and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
  933. </if>
  934. </select>
  935. <select id="findOrgByAidWithParamsListByPage" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgListBo">
  936. select
  937. u.id ,
  938. u.mobile,
  939. u.email,
  940. u.create_time as createTime,
  941. u.number ,
  942. a.name as adminName,
  943. ma.name as managerName,
  944. u.type,
  945. i.unit_name as unitName,
  946. i.audit_status as orgAuditStatus
  947. from user u
  948. LEFT JOIN admin a on a.id = u.aid
  949. LEFT JOIN admin ma on ma.id = u.mid
  950. LEFT JOIN organization_identity i on u.id = i.uid
  951. where u.type = 1
  952. <if test="aid != null">
  953. and u.aid = #{aid,jdbcType=VARCHAR}
  954. </if>
  955. <if test="number !=null">
  956. and u.number = #{number,jdbcType=INTEGER}
  957. </if>
  958. <if test="mobile !=null">
  959. and u.mobile= #{mobile,jdbcType=VARCHAR}
  960. </if>
  961. <if test="auditStatus !=null">
  962. and i.audit_status = #{auditStatus,jdbcType=INTEGER}
  963. </if>
  964. <if test="auditName !=null">
  965. and i.unit_name like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
  966. </if>
  967. <if test="email !=null">
  968. and u.email = #{email,jdbcType=VARCHAR}
  969. </if>
  970. <if test="startCreateTime !=null">
  971. and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
  972. </if>
  973. <if test="endCreateTime !=null">
  974. and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
  975. </if>
  976. order by u.number desc
  977. <if test="page_sql!=null">
  978. ${page_sql}
  979. </if>
  980. </select>
  981. <select id="findOrgByAidWithParamsCount" parameterType="String" resultType="java.lang.Integer">
  982. select
  983. count(1)
  984. from user u
  985. LEFT JOIN admin a on a.id = u.aid
  986. LEFT JOIN organization_identity i on u.id = i.uid
  987. where u.type = 1
  988. <if test="aid != null">
  989. and u.aid = #{aid,jdbcType=VARCHAR}
  990. </if>
  991. <if test="number !=null">
  992. and u.number = #{number,jdbcType=INTEGER}
  993. </if>
  994. <if test="mobile !=null">
  995. and u.mobile= #{mobile,jdbcType=VARCHAR}
  996. </if>
  997. <if test="auditStatus !=null">
  998. and i.audit_status = #{auditStatus,jdbcType=INTEGER}
  999. </if>
  1000. <if test="auditName !=null">
  1001. and i.unit_name like CONCAT('%',#{auditName,jdbcType=VARCHAR},'%')
  1002. </if>
  1003. <if test="email !=null">
  1004. and u.email = #{email,jdbcType=VARCHAR}
  1005. </if>
  1006. <if test="startCreateTime !=null">
  1007. and u.create_time <![CDATA[ >= ]]> #{startCreateTime,jdbcType=TIMESTAMP}
  1008. </if>
  1009. <if test="endCreateTime !=null">
  1010. and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
  1011. </if>
  1012. </select>
  1013. <select id="findUserByNameAndMobile" resultType="java.lang.String">
  1014. select
  1015. ui.username
  1016. from user u
  1017. left join user_identity ui on u.id = ui.uid
  1018. where u.lvl &gt; 0 and u.type = 0 and ui.audit_status = 5
  1019. <if test="name != null">
  1020. and ui.username = #{name,jdbcType=VARCHAR}
  1021. </if>
  1022. <if test="mobile != null">
  1023. and u.mobile = #{mobile,jdbcType=VARCHAR}
  1024. </if>
  1025. </select>
  1026. <select id="findOrgByNameAndMobile" resultType="java.lang.String">
  1027. select
  1028. oi.unit_name
  1029. from user u
  1030. left join organization_identity oi on u.id = oi.uid
  1031. where u.lvl &gt; 0 and u.type = 1 and oi.audit_status = 5
  1032. <if test="name != null">
  1033. and oi.unit_name = #{name,jdbcType=VARCHAR}
  1034. </if>
  1035. <if test="mobile != null">
  1036. and u.mobile = #{mobile,jdbcType=VARCHAR}
  1037. </if>
  1038. </select>
  1039. <select id="checkUser" resultMap="BaseResultMap">
  1040. select
  1041. id
  1042. from
  1043. user
  1044. where status <![CDATA[!= ]]> 1
  1045. <if test="id != null and id != ''">
  1046. and id = #{id,jdbcType=VARCHAR}
  1047. </if>
  1048. <if test="identifyName != null and identifyName != ''">
  1049. and identify_name = #{identifyName,jdbcType=VARCHAR}
  1050. </if>
  1051. <if test="mobile != null and mobile !=''">
  1052. and mobile = #{mobile,jdbcType=VARCHAR}
  1053. </if>
  1054. <if test="type != null">
  1055. and type = #{type,jdbcType=INTEGER}
  1056. </if>
  1057. <if test="source != null">
  1058. and source = #{source,jdbcType=INTEGER}
  1059. </if>
  1060. <if test="nickname != null and nickname != ''">
  1061. and nickname = #{nickname,jdbcType=INTEGER}
  1062. </if>
  1063. </select>
  1064. <select id="userInterest" resultType="com.goafanti.user.bo.UserInterestBo">
  1065. select
  1066. t.to_uid as id,y.username as name,y.work_unit as workUnit,y.professional_title as professionalTitle,t.create_time as createTime
  1067. from user_interest t
  1068. LEFT join user_identity y on t.to_uid=y.uid
  1069. LEFT join user u on t.to_uid=u.id
  1070. where t.from_uid=#{uid,jdbcType=VARCHAR}
  1071. </select>
  1072. <select id="selectBaseInfo" parameterType="java.lang.String" resultType="com.goafanti.app.bo.UserBasicInfo">
  1073. select
  1074. a.id,
  1075. a.mobile,
  1076. a.nickname,
  1077. a.email,
  1078. a.number,
  1079. a.type,
  1080. a.company_logo_url as companyLogoUrl,
  1081. a.head_portrait_url as headPortraitUrl,
  1082. a.introduction,
  1083. b.registration_id as registrationId,
  1084. b.easemob_name as easemobName,
  1085. b.easemob_pass as easemobPass
  1086. from user a left join jpush_easemob_account b
  1087. on a.id = b.uid
  1088. where
  1089. a.id = #{id,jdbcType=VARCHAR}
  1090. </select>
  1091. <select id="selectByNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
  1092. select nickname,head_portrait_url from user where number = #{easemobName,jdbcType=VARCHAR}
  1093. </select>
  1094. <update id="updateEnteringAudit" parameterType="com.goafanti.common.model.User">
  1095. update user
  1096. <set>
  1097. <if test="auditStatus != null">
  1098. audit_status = #{auditStatus,jdbcType=INTEGER},
  1099. </if>
  1100. <if test="auditOpinion != null">
  1101. audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
  1102. </if>
  1103. </set>
  1104. where id = #{id,jdbcType=VARCHAR}
  1105. </update>
  1106. <select id="selectUserByRoleName" parameterType="java.lang.String" resultMap="BaseResultMap">
  1107. select c.id from role a left join user_role b on a.id = b.rid left join admin c on b.uid = c.id where a.role_name = #{roleName}
  1108. </select>
  1109. <select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
  1110. select
  1111. u.id,i.username,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
  1112. u.head_portrait_url as personPortraitUrl,
  1113. i.province,
  1114. u.introduction as personalProfile,
  1115. ua.ability_label as abilityLabel,i.qualification,
  1116. i.graduate_school,i.major_category,i.work_unit as workUnit,
  1117. ic.name as engagedField
  1118. from `user` u
  1119. left join user_identity i on u.id=i.uid
  1120. left join
  1121. user_career c on u.id=c.uid
  1122. <!-- left join user_info info on u.id=info.uid -->
  1123. left join user_ability ua on u.id=ua.uid
  1124. left join user_edu e on u.id=e.uid
  1125. left join industry_category ic on i.industry=ic.id
  1126. WHERE
  1127. u.type = 0
  1128. <if test="_parameter!= null">
  1129. and u.id= #{_parameter,jdbcType=VARCHAR}
  1130. </if>
  1131. </select>
  1132. <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
  1133. select
  1134. u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
  1135. u.head_portrait_url as personPortraitUrl,
  1136. i.province,
  1137. u.introduction as personalProfile,
  1138. ua.ability_label as abilityLabel,i.uid,u.type
  1139. from `user` u
  1140. left join user_identity i on u.id=i.uid
  1141. left join
  1142. user_career c on u.id=c.uid
  1143. <!-- left join user_info info on u.id=info.uid -->
  1144. left join user_ability ua on u.id=ua.uid
  1145. WHERE
  1146. u.type = 0
  1147. limit 0,50
  1148. </select>
  1149. </mapper>