UserMapper.xml 53 KB

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