UserMapper.xml 58 KB

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