UserMapper.xml 56 KB

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