UserMapper.xml 65 KB

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