UserMapper.xml 64 KB

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