ResumeMapper.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  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.ssm.mapper.business.ResumeMapper" >
  4. <resultMap id="BaseResultMap" type="com.ssm.model.business.Resume" >
  5. <id column="ResumeID" property="resumeid" jdbcType="INTEGER" />
  6. <result column="ResumeName" property="resumename" jdbcType="VARCHAR" />
  7. <result column="UserName" property="username" jdbcType="VARCHAR" />
  8. <result column="Gender" property="gender" jdbcType="VARCHAR" />
  9. <result column="Birthday" property="birthday" jdbcType="TIMESTAMP" />
  10. <result column="Age" property="age" jdbcType="VARCHAR" />
  11. <result column="Degree" property="degree" jdbcType="VARCHAR" />
  12. <result column="Experience" property="experience" jdbcType="VARCHAR" />
  13. <result column="Mobile" property="mobile" jdbcType="VARCHAR" />
  14. <result column="CardNo" property="cardno" jdbcType="VARCHAR" />
  15. <result column="Email" property="email" jdbcType="VARCHAR" />
  16. <result column="IsMarryed" property="ismarryed" jdbcType="BIT" />
  17. <result column="Residence" property="residence" jdbcType="VARCHAR" />
  18. <result column="Origin" property="origin" jdbcType="VARCHAR" />
  19. <result column="Nationality" property="nationality" jdbcType="VARCHAR" />
  20. <result column="GraduateCollege" property="graduatecollege" jdbcType="VARCHAR" />
  21. <result column="Major" property="major" jdbcType="VARCHAR" />
  22. <result column="Lanuage" property="lanuage" jdbcType="VARCHAR" />
  23. <result column="GraduateDate" property="graduatedate" jdbcType="TIMESTAMP" />
  24. <result column="PositionRating" property="positionrating" jdbcType="VARCHAR" />
  25. <result column="KeyWords" property="keywords" jdbcType="VARCHAR" />
  26. <result column="JobObjective" property="jobobjective" jdbcType="VARCHAR" />
  27. <result column="Salary" property="salary" jdbcType="VARCHAR" />
  28. <result column="SelfIntroduce" property="selfintroduce" jdbcType="VARCHAR" />
  29. <result column="UserId" property="userid" jdbcType="INTEGER" />
  30. <result column="HeadUrl" property="headurl" jdbcType="VARCHAR" />
  31. <result column="IsPrivate" property="isprivate" jdbcType="BIT" />
  32. <result column="IsDeleted" property="isdeleted" jdbcType="BIT" />
  33. <result column="CreateDate" property="createdate" jdbcType="TIMESTAMP" />
  34. <result column="UpdateUserId" property="updateuserid" jdbcType="INTEGER" />
  35. <result column="updateDate" property="updatedate" jdbcType="TIMESTAMP" />
  36. <result column="ResumeDownloadUrl" property="resumedownloadurl" jdbcType="VARCHAR" />
  37. <result column="status" property="status" jdbcType="VARCHAR" />
  38. <result column="createusername" property="createusername" jdbcType="VARCHAR" />
  39. <result column="currentcompany" property="currentcompany" jdbcType="VARCHAR" />
  40. <result column="industry" property="industry" jdbcType="VARCHAR" />
  41. <result column="ProjectName" property="projectname" jdbcType="VARCHAR" />
  42. <result column="BindDate" property="bindDate" jdbcType="TIMESTAMP" />
  43. <result column="bindId" property="bindId" jdbcType="VARCHAR" />
  44. <result column="ivnum" property="ivnum" jdbcType="VARCHAR" />
  45. <result column="projectid" property="projectid" jdbcType="VARCHAR" />
  46. </resultMap>
  47. <sql id="Base_Column_List" >
  48. ResumeID, ResumeName, UserName, Gender, Birthday, Age, Degree, Experience, Mobile,
  49. CardNo, Email, IsMarryed, Residence, Origin, Nationality, GraduateCollege, Major,
  50. Lanuage, GraduateDate, PositionRating, KeyWords, JobObjective, Salary, SelfIntroduce,
  51. UserId, HeadUrl, IsPrivate, IsDeleted, CreateDate, UpdateUserId, updateDate, ResumeDownloadUrl, status,currentcompany,industry
  52. </sql>
  53. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  54. select
  55. <include refid="Base_Column_List" />
  56. from Resume
  57. where ResumeID = #{resumeid,jdbcType=INTEGER}
  58. </select>
  59. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  60. delete from Resume
  61. where ResumeID = #{resumeid,jdbcType=INTEGER}
  62. </delete>
  63. <insert id="insert" parameterType="com.ssm.model.business.Resume" >
  64. insert into Resume (ResumeID, ResumeName, UserName,
  65. Gender, Birthday, Age,
  66. Degree, Experience, Mobile,
  67. CardNo, Email, IsMarryed,
  68. Residence, Origin, Nationality,
  69. GraduateCollege, Major, Lanuage,
  70. GraduateDate, PositionRating, KeyWords,
  71. JobObjective, Salary, SelfIntroduce,
  72. UserId, HeadUrl, IsPrivate,
  73. IsDeleted, CreateDate, UpdateUserId,
  74. updateDate, ResumeDownloadUrl, status,currentcompany,industry)
  75. values (#{resumeid,jdbcType=INTEGER}, #{resumename,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  76. #{gender,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{age,jdbcType=VARCHAR},
  77. #{degree,jdbcType=VARCHAR}, #{experience,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
  78. #{cardno,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{ismarryed,jdbcType=BIT},
  79. #{residence,jdbcType=VARCHAR}, #{origin,jdbcType=VARCHAR}, #{nationality,jdbcType=VARCHAR},
  80. #{graduatecollege,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR}, #{lanuage,jdbcType=VARCHAR},
  81. #{graduatedate,jdbcType=TIMESTAMP}, #{positionrating,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
  82. #{jobobjective,jdbcType=VARCHAR}, #{salary,jdbcType=VARCHAR}, #{selfintroduce,jdbcType=VARCHAR},
  83. #{userid,jdbcType=INTEGER}, #{headurl,jdbcType=VARCHAR}, #{isprivate,jdbcType=BIT},
  84. #{isdeleted,jdbcType=BIT}, #{createdate,jdbcType=TIMESTAMP}, #{updateuserid,jdbcType=INTEGER},
  85. #{updatedate,jdbcType=TIMESTAMP}, #{resumedownloadurl,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
  86. , #{currentcompany,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR})
  87. </insert>
  88. <insert id="insertSelective" parameterType="com.ssm.model.business.Resume" >
  89. <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="resumeid">
  90. SELECT LAST_INSERT_ID()
  91. </selectKey>
  92. insert into Resume
  93. <trim prefix="(" suffix=")" suffixOverrides="," >
  94. <if test="resumeid != null" >
  95. ResumeID,
  96. </if>
  97. <if test="resumename != null" >
  98. ResumeName,
  99. </if>
  100. <if test="username != null" >
  101. UserName,
  102. </if>
  103. <if test="gender != null" >
  104. Gender,
  105. </if>
  106. <if test="birthday != null" >
  107. Birthday,
  108. </if>
  109. <if test="age != null" >
  110. Age,
  111. </if>
  112. <if test="degree != null" >
  113. Degree,
  114. </if>
  115. <if test="experience != null" >
  116. Experience,
  117. </if>
  118. <if test="mobile != null" >
  119. Mobile,
  120. </if>
  121. <if test="cardno != null" >
  122. CardNo,
  123. </if>
  124. <if test="email != null" >
  125. Email,
  126. </if>
  127. <if test="ismarryed != null" >
  128. IsMarryed,
  129. </if>
  130. <if test="residence != null" >
  131. Residence,
  132. </if>
  133. <if test="origin != null" >
  134. Origin,
  135. </if>
  136. <if test="nationality != null" >
  137. Nationality,
  138. </if>
  139. <if test="graduatecollege != null" >
  140. GraduateCollege,
  141. </if>
  142. <if test="major != null" >
  143. Major,
  144. </if>
  145. <if test="lanuage != null" >
  146. Lanuage,
  147. </if>
  148. <if test="graduatedate != null" >
  149. GraduateDate,
  150. </if>
  151. <if test="positionrating != null" >
  152. PositionRating,
  153. </if>
  154. <if test="keywords != null" >
  155. KeyWords,
  156. </if>
  157. <if test="jobobjective != null" >
  158. JobObjective,
  159. </if>
  160. <if test="salary != null" >
  161. Salary,
  162. </if>
  163. <if test="selfintroduce != null" >
  164. SelfIntroduce,
  165. </if>
  166. <if test="userid != null" >
  167. UserId,
  168. </if>
  169. <if test="headurl != null" >
  170. HeadUrl,
  171. </if>
  172. <if test="isprivate != null" >
  173. IsPrivate,
  174. </if>
  175. <if test="isdeleted != null" >
  176. IsDeleted,
  177. </if>
  178. <if test="createdate != null" >
  179. CreateDate,
  180. </if>
  181. <if test="updateuserid != null" >
  182. UpdateUserId,
  183. </if>
  184. <if test="updatedate != null" >
  185. updateDate,
  186. </if>
  187. <if test="resumedownloadurl != null" >
  188. ResumeDownloadUrl,
  189. </if>
  190. <if test="status != null" >
  191. status,
  192. </if>
  193. <if test="currentcompany != null" >
  194. currentcompany,
  195. </if>
  196. <if test="industry != null" >
  197. industry,
  198. </if>
  199. </trim>
  200. <trim prefix="values (" suffix=")" suffixOverrides="," >
  201. <if test="resumeid != null" >
  202. #{resumeid,jdbcType=INTEGER},
  203. </if>
  204. <if test="resumename != null" >
  205. #{resumename,jdbcType=VARCHAR},
  206. </if>
  207. <if test="username != null" >
  208. #{username,jdbcType=VARCHAR},
  209. </if>
  210. <if test="gender != null" >
  211. #{gender,jdbcType=VARCHAR},
  212. </if>
  213. <if test="birthday != null" >
  214. #{birthday,jdbcType=TIMESTAMP},
  215. </if>
  216. <if test="age != null" >
  217. #{age,jdbcType=VARCHAR},
  218. </if>
  219. <if test="degree != null" >
  220. #{degree,jdbcType=VARCHAR},
  221. </if>
  222. <if test="experience != null" >
  223. #{experience,jdbcType=VARCHAR},
  224. </if>
  225. <if test="mobile != null" >
  226. #{mobile,jdbcType=VARCHAR},
  227. </if>
  228. <if test="cardno != null" >
  229. #{cardno,jdbcType=VARCHAR},
  230. </if>
  231. <if test="email != null" >
  232. #{email,jdbcType=VARCHAR},
  233. </if>
  234. <if test="ismarryed != null" >
  235. #{ismarryed,jdbcType=BIT},
  236. </if>
  237. <if test="residence != null" >
  238. #{residence,jdbcType=VARCHAR},
  239. </if>
  240. <if test="origin != null" >
  241. #{origin,jdbcType=VARCHAR},
  242. </if>
  243. <if test="nationality != null" >
  244. #{nationality,jdbcType=VARCHAR},
  245. </if>
  246. <if test="graduatecollege != null" >
  247. #{graduatecollege,jdbcType=VARCHAR},
  248. </if>
  249. <if test="major != null" >
  250. #{major,jdbcType=VARCHAR},
  251. </if>
  252. <if test="lanuage != null" >
  253. #{lanuage,jdbcType=VARCHAR},
  254. </if>
  255. <if test="graduatedate != null" >
  256. #{graduatedate,jdbcType=TIMESTAMP},
  257. </if>
  258. <if test="positionrating != null" >
  259. #{positionrating,jdbcType=VARCHAR},
  260. </if>
  261. <if test="keywords != null" >
  262. #{keywords,jdbcType=VARCHAR},
  263. </if>
  264. <if test="jobobjective != null" >
  265. #{jobobjective,jdbcType=VARCHAR},
  266. </if>
  267. <if test="salary != null" >
  268. #{salary,jdbcType=VARCHAR},
  269. </if>
  270. <if test="selfintroduce != null" >
  271. #{selfintroduce,jdbcType=VARCHAR},
  272. </if>
  273. <if test="userid != null" >
  274. #{userid,jdbcType=INTEGER},
  275. </if>
  276. <if test="headurl != null" >
  277. #{headurl,jdbcType=VARCHAR},
  278. </if>
  279. <if test="isprivate != null" >
  280. #{isprivate,jdbcType=BIT},
  281. </if>
  282. <if test="isdeleted != null" >
  283. #{isdeleted,jdbcType=BIT},
  284. </if>
  285. <if test="createdate != null" >
  286. #{createdate,jdbcType=TIMESTAMP},
  287. </if>
  288. <if test="updateuserid != null" >
  289. #{updateuserid,jdbcType=INTEGER},
  290. </if>
  291. <if test="updatedate != null" >
  292. #{updatedate,jdbcType=TIMESTAMP},
  293. </if>
  294. <if test="resumedownloadurl != null" >
  295. #{resumedownloadurl,jdbcType=VARCHAR},
  296. </if>
  297. <if test="status != null" >
  298. #{status,jdbcType=VARCHAR},
  299. </if>
  300. <if test="currentcompany != null" >
  301. #{currentcompany,jdbcType=VARCHAR},
  302. </if>
  303. <if test="industry != null" >
  304. #{industry,jdbcType=VARCHAR},
  305. </if>
  306. </trim>
  307. ON DUPLICATE KEY UPDATE
  308. <trim suffixOverrides=",">
  309. <if test="resumename != null" >
  310. ResumeName = #{resumename,jdbcType=VARCHAR},
  311. </if>
  312. <if test="gender != null" >
  313. Gender = #{gender,jdbcType=VARCHAR},
  314. </if>
  315. <if test="birthday != null" >
  316. Birthday = #{birthday,jdbcType=TIMESTAMP},
  317. </if>
  318. <if test="age != null" >
  319. Age = #{age,jdbcType=VARCHAR},
  320. </if>
  321. <if test="degree != null" >
  322. Degree = #{degree,jdbcType=VARCHAR},
  323. </if>
  324. <if test="experience != null" >
  325. Experience = #{experience,jdbcType=VARCHAR},
  326. </if>
  327. <if test="cardno != null" >
  328. CardNo = #{cardno,jdbcType=VARCHAR},
  329. </if>
  330. <if test="email != null" >
  331. Email = #{email,jdbcType=VARCHAR},
  332. </if>
  333. <if test="ismarryed != null" >
  334. IsMarryed = #{ismarryed,jdbcType=BIT},
  335. </if>
  336. <if test="residence != null" >
  337. Residence = #{residence,jdbcType=VARCHAR},
  338. </if>
  339. <if test="origin != null" >
  340. Origin = #{origin,jdbcType=VARCHAR},
  341. </if>
  342. <if test="nationality != null" >
  343. Nationality = #{nationality,jdbcType=VARCHAR},
  344. </if>
  345. <if test="graduatecollege != null" >
  346. GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
  347. </if>
  348. <if test="major != null" >
  349. Major = #{major,jdbcType=VARCHAR},
  350. </if>
  351. <if test="lanuage != null" >
  352. Lanuage = #{lanuage,jdbcType=VARCHAR},
  353. </if>
  354. <if test="graduatedate != null" >
  355. GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
  356. </if>
  357. <if test="positionrating != null" >
  358. PositionRating = #{positionrating,jdbcType=VARCHAR},
  359. </if>
  360. <if test="keywords != null" >
  361. KeyWords = #{keywords,jdbcType=VARCHAR},
  362. </if>
  363. <if test="jobobjective != null" >
  364. JobObjective = #{jobobjective,jdbcType=VARCHAR},
  365. </if>
  366. <if test="salary != null" >
  367. Salary = #{salary,jdbcType=VARCHAR},
  368. </if>
  369. <if test="selfintroduce != null" >
  370. SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
  371. </if>
  372. <if test="userid != null" >
  373. UserId = #{userid,jdbcType=INTEGER},
  374. </if>
  375. <if test="headurl != null" >
  376. HeadUrl = #{headurl,jdbcType=VARCHAR},
  377. </if>
  378. <if test="isprivate != null" >
  379. IsPrivate = #{isprivate,jdbcType=BIT},
  380. </if>
  381. <if test="isdeleted != null" >
  382. IsDeleted = #{isdeleted,jdbcType=BIT},
  383. </if>
  384. <if test="createdate != null" >
  385. CreateDate = #{createdate,jdbcType=TIMESTAMP},
  386. </if>
  387. <if test="updateuserid != null" >
  388. UpdateUserId = #{updateuserid,jdbcType=INTEGER},
  389. </if>
  390. <if test="updatedate != null" >
  391. updateDate = #{updatedate,jdbcType=TIMESTAMP},
  392. </if>
  393. <if test="resumedownloadurl != null" >
  394. ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
  395. </if>
  396. <if test="status != null" >
  397. status = #{status, jdbcType=VARCHAR},
  398. </if>
  399. <if test="currentcompany != null" >
  400. currentcompany = #{currentcompany,jdbcType=VARCHAR},
  401. </if>
  402. <if test="industry != null" >
  403. industry = #{industry,jdbcType=VARCHAR},
  404. </if>
  405. </trim>
  406. </insert>
  407. <update id="updateByPrimaryKeySelective" parameterType="com.ssm.model.business.Resume" >
  408. update Resume
  409. <set >
  410. <if test="resumename != null" >
  411. ResumeName = #{resumename,jdbcType=VARCHAR},
  412. </if>
  413. <if test="username != null" >
  414. UserName = #{username,jdbcType=VARCHAR},
  415. </if>
  416. <if test="gender != null" >
  417. Gender = #{gender,jdbcType=VARCHAR},
  418. </if>
  419. <if test="birthday != null" >
  420. Birthday = #{birthday,jdbcType=TIMESTAMP},
  421. </if>
  422. <if test="age != null" >
  423. Age = #{age,jdbcType=VARCHAR},
  424. </if>
  425. <if test="degree != null" >
  426. Degree = #{degree,jdbcType=VARCHAR},
  427. </if>
  428. <if test="experience != null" >
  429. Experience = #{experience,jdbcType=VARCHAR},
  430. </if>
  431. <if test="mobile != null" >
  432. Mobile = #{mobile,jdbcType=VARCHAR},
  433. </if>
  434. <if test="cardno != null" >
  435. CardNo = #{cardno,jdbcType=VARCHAR},
  436. </if>
  437. <if test="email != null" >
  438. Email = #{email,jdbcType=VARCHAR},
  439. </if>
  440. <if test="ismarryed != null" >
  441. IsMarryed = #{ismarryed,jdbcType=BIT},
  442. </if>
  443. <if test="residence != null" >
  444. Residence = #{residence,jdbcType=VARCHAR},
  445. </if>
  446. <if test="origin != null" >
  447. Origin = #{origin,jdbcType=VARCHAR},
  448. </if>
  449. <if test="nationality != null" >
  450. Nationality = #{nationality,jdbcType=VARCHAR},
  451. </if>
  452. <if test="graduatecollege != null" >
  453. GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
  454. </if>
  455. <if test="major != null" >
  456. Major = #{major,jdbcType=VARCHAR},
  457. </if>
  458. <if test="lanuage != null" >
  459. Lanuage = #{lanuage,jdbcType=VARCHAR},
  460. </if>
  461. <if test="graduatedate != null" >
  462. GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
  463. </if>
  464. <if test="positionrating != null" >
  465. PositionRating = #{positionrating,jdbcType=VARCHAR},
  466. </if>
  467. <if test="keywords != null" >
  468. KeyWords = #{keywords,jdbcType=VARCHAR},
  469. </if>
  470. <if test="jobobjective != null" >
  471. JobObjective = #{jobobjective,jdbcType=VARCHAR},
  472. </if>
  473. <if test="salary != null" >
  474. Salary = #{salary,jdbcType=VARCHAR},
  475. </if>
  476. <if test="selfintroduce != null" >
  477. SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
  478. </if>
  479. <if test="userid != null" >
  480. UserId = #{userid,jdbcType=INTEGER},
  481. </if>
  482. <if test="headurl != null" >
  483. HeadUrl = #{headurl,jdbcType=VARCHAR},
  484. </if>
  485. <if test="isprivate != null" >
  486. IsPrivate = #{isprivate,jdbcType=BIT},
  487. </if>
  488. <if test="isdeleted != null" >
  489. IsDeleted = #{isdeleted,jdbcType=BIT},
  490. </if>
  491. <if test="createdate != null" >
  492. CreateDate = #{createdate,jdbcType=TIMESTAMP},
  493. </if>
  494. <if test="updateuserid != null" >
  495. UpdateUserId = #{updateuserid,jdbcType=INTEGER},
  496. </if>
  497. <if test="updatedate != null" >
  498. updateDate = #{updatedate,jdbcType=TIMESTAMP},
  499. </if>
  500. <if test="resumedownloadurl != null" >
  501. ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
  502. </if>
  503. <if test="status != null" >
  504. status = #{status, jdbcType=VARCHAR},
  505. </if>
  506. <if test="currentcompany != null" >
  507. currentcompany = #{currentcompany,jdbcType=VARCHAR},
  508. </if>
  509. <if test="industry != null" >
  510. industry = #{industry,jdbcType=VARCHAR},
  511. </if>
  512. </set>
  513. where ResumeID = #{resumeid,jdbcType=INTEGER}
  514. </update>
  515. <update id="updateByPrimaryKey" parameterType="com.ssm.model.business.Resume" >
  516. update Resume
  517. set ResumeName = #{resumename,jdbcType=VARCHAR},
  518. UserName = #{username,jdbcType=VARCHAR},
  519. Gender = #{gender,jdbcType=VARCHAR},
  520. Birthday = #{birthday,jdbcType=TIMESTAMP},
  521. Age = #{age,jdbcType=VARCHAR},
  522. Degree = #{degree,jdbcType=VARCHAR},
  523. Experience = #{experience,jdbcType=VARCHAR},
  524. Mobile = #{mobile,jdbcType=VARCHAR},
  525. CardNo = #{cardno,jdbcType=VARCHAR},
  526. Email = #{email,jdbcType=VARCHAR},
  527. IsMarryed = #{ismarryed,jdbcType=BIT},
  528. Residence = #{residence,jdbcType=VARCHAR},
  529. Origin = #{origin,jdbcType=VARCHAR},
  530. Nationality = #{nationality,jdbcType=VARCHAR},
  531. GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
  532. Major = #{major,jdbcType=VARCHAR},
  533. Lanuage = #{lanuage,jdbcType=VARCHAR},
  534. GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
  535. PositionRating = #{positionrating,jdbcType=VARCHAR},
  536. KeyWords = #{keywords,jdbcType=VARCHAR},
  537. JobObjective = #{jobobjective,jdbcType=VARCHAR},
  538. Salary = #{salary,jdbcType=VARCHAR},
  539. SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
  540. UserId = #{userid,jdbcType=INTEGER},
  541. HeadUrl = #{headurl,jdbcType=VARCHAR},
  542. IsPrivate = #{isprivate,jdbcType=BIT},
  543. IsDeleted = #{isdeleted,jdbcType=BIT},
  544. CreateDate = #{createdate,jdbcType=TIMESTAMP},
  545. UpdateUserId = #{updateuserid,jdbcType=INTEGER},
  546. updateDate = #{updatedate,jdbcType=TIMESTAMP},
  547. ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
  548. status = #{status,jdbcType=VARCHAR},
  549. currentcompany = #{currentcompany,jdbcType=VARCHAR},
  550. industry = #{industry,jdbcType=VARCHAR}
  551. where ResumeID = #{resumeid,jdbcType=INTEGER}
  552. </update>
  553. <select id="selectByUsernameAndMobile" parameterType="java.lang.String" resultType="java.lang.Integer">
  554. SELECT count(*) from Resume s where s.IsDeleted = 0 AND s.UserName=#{username} AND s.Mobile=#{mobile}
  555. </select>
  556. <select id="selectByAllCondition" resultMap="BaseResultMap" >
  557. SELECT
  558. ( SELECT count(iv.InterviewId) from Interview iv where iv.ResumeId = r.ResumeID AND iv.IsDeleted = 0 ) ivnum,
  559. r.*, s.username createusername from Resume r, SysUser s WHERE 1=1 AND r.IsDeleted = 0 AND r.userid = s.userid
  560. <if test="resume.username != null and resume.username != '' " >
  561. AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
  562. </if>
  563. <if test="resume.degree != null and resume.degree != '' and resume.degree!='其他'" >
  564. AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
  565. </if>
  566. <if test="resume.degree != null and resume.degree != '' and resume.degree=='其他'" >
  567. AND r.Degree NOT in ('博士','硕士','本科','大专')
  568. </if>
  569. <if test="resume.experience != null and resume.experience != ''" >
  570. AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
  571. </if>
  572. <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
  573. AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
  574. </if>
  575. <if test="resume.major != null and resume.major != '' " >
  576. AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
  577. </if>
  578. <if test="resume.keywords != null and resume.keywords != '' " >
  579. AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
  580. </if>
  581. <if test="resume.jobobjective != null and resume.jobobjective != ''">
  582. AND r.jobobjective LIKE CONCAT('%',#{resume.jobobjective,jdbcType=VARCHAR},'%')
  583. </if>
  584. <!-- 创建人id -->
  585. <if test="resume.userid != null" >
  586. AND r.userid = #{resume.userid,jdbcType=INTEGER}
  587. </if>
  588. <!-- 创建人姓名 -->
  589. <if test="resume.createusername != null and resume.createusername != '' " >
  590. AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
  591. </if>
  592. <if test="resume.status != null and resume.status != '' " >
  593. AND r.status = #{resume.status,jdbcType=VARCHAR}
  594. </if>
  595. <if test="resume.startTime != null and resume.startTime != '' ">
  596. <![CDATA[ and date(r.CreateDate) >= #{resume.startTime} ]]>
  597. </if>
  598. <if test="resume.endTime != null and resume.endTime != '' ">
  599. <![CDATA[ and date(r.CreateDate) <= #{resume.endTime} ]]>
  600. </if>
  601. order by
  602. <foreach collection="orderBy.keys" item="key" separator="," >
  603. ${key} ${orderBy[key]}
  604. </foreach>
  605. </select>
  606. <!-- 我收藏的简历 -->
  607. <select id="selectStoreByAllCondition" resultMap="BaseResultMap" >
  608. SELECT
  609. ( SELECT count(iv.InterviewId) from Interview iv where iv.ResumeId = r.ResumeID AND iv.IsDeleted = 0 ) ivnum,
  610. r.*, s.username createusername from Resume r, SysUser s, ResumeStore rs WHERE 1=1 AND rs.ResumeId = r.ResumeId AND r.IsDeleted = 0 AND r.userid = s.userid
  611. <if test="resume.username != null and resume.username != '' " >
  612. AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
  613. </if>
  614. <if test="resume.degree != null and resume.degree != '' and resume.degree!='其他'" >
  615. AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
  616. </if>
  617. <if test="resume.degree != null and resume.degree != '' and resume.degree=='其他'" >
  618. AND r.Degree NOT in ('博士','硕士','本科','大专')
  619. </if>
  620. <if test="resume.experience != null and resume.experience != ''" >
  621. AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
  622. </if>
  623. <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
  624. AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
  625. </if>
  626. <if test="resume.major != null and resume.major != '' " >
  627. AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
  628. </if>
  629. <if test="resume.keywords != null and resume.keywords != '' " >
  630. AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
  631. </if>
  632. <if test="resume.jobobjective != null and resume.jobobjective != ''">
  633. AND r.jobobjective LIKE CONCAT('%',#{resume.jobobjective,jdbcType=VARCHAR},'%')
  634. </if>
  635. <!-- 我收藏的简历 -->
  636. <if test="myselfId != null and myselfId != '' " >
  637. AND rs.userid = #{myselfId, jdbcType=INTEGER}
  638. </if>
  639. <!-- 创建人姓名 -->
  640. <if test="resume.createusername != null and resume.createusername != '' " >
  641. AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
  642. </if>
  643. <if test="resume.status != null and resume.status != '' " >
  644. AND r.status = #{resume.status,jdbcType=VARCHAR}
  645. </if>
  646. order by
  647. <foreach collection="orderBy.keys" item="key" separator="," >
  648. ${key} ${orderBy[key]}
  649. </foreach>
  650. </select>
  651. <select id="selectMyStoredResume" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
  652. SELECT s.ResumeId from ResumeStore s where s.UserId = #{userId}
  653. </select>
  654. <insert id="storeResume" parameterType="java.lang.Integer" >
  655. INSERT INTO ResumeStore (ResumeId, UserId) VALUES (#{resumeId} , #{userId})
  656. </insert>
  657. <!-- 根据简历ID移除收藏表中的收藏 -->
  658. <delete id="removeStoredResume" parameterType="java.lang.Integer" >
  659. delete from ResumeStore where ResumeId = #{resumeId} AND userId=#{userId}
  660. </delete>
  661. <select id="selectDownloadUrl" resultType="java.lang.String">
  662. SELECT r.ResumeDownloadUrl from Resume r where r.ResumeID IN
  663. <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
  664. #{item}
  665. </foreach>
  666. </select>
  667. <!-- 查询所有可以进行匹配的简历 -->
  668. <select id="selectIsBindingResume" resultMap="BaseResultMap" >
  669. SELECT r.* , s.username createusername from Resume r ,SysUser s
  670. where 1=1
  671. AND ( r.Status=0 OR r.Status = 1 )
  672. AND r.IsDeleted = 0
  673. AND r.userid = s.userid
  674. <if test="resume.username != null and resume.username != '' " >
  675. AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
  676. </if>
  677. <if test="resume.experience != null and resume.experience != ''" >
  678. AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
  679. </if>
  680. <if test="resume.keywords != null and resume.keywords != '' " >
  681. AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
  682. </if>
  683. <if test="resume.degree != null and resume.degree != ''" >
  684. AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
  685. </if>
  686. <if test="resume.major != null and resume.major != '' " >
  687. AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
  688. </if>
  689. <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
  690. AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
  691. </if>
  692. <if test="resume.status != null and resume.status != '' " >
  693. AND r.status = #{resume.status,jdbcType=VARCHAR}
  694. </if>
  695. <if test="resume.createusername != null and resume.createusername != '' " >
  696. AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
  697. </if>
  698. AND NOT EXISTS
  699. (
  700. SELECT rrp.ResumeProjectId from ResumeRecruitProject rrp where rrp.resumeid = r.ResumeID AND rrp.userid = #{resume.userid,jdbcType=INTEGER}
  701. AND rrp.isdelete = 0
  702. )
  703. ORDER BY r.CreateDate desc
  704. </select>
  705. <!-- 查询我绑定的简历 -->
  706. <select id="selectMyBindedResumes" resultMap="BaseResultMap" >
  707. SELECT rp.ProjectName, r.*, rrp.BindDate, rrp.ResumeProjectId bindId, rp.projectid from Resume r, RecruitProject rp, ResumeRecruitProject rrp
  708. WHERE r.ResumeID = rrp.ResumeId AND rrp.ProjectId = rp.ProjectID
  709. AND r.IsDeleted = 0 AND rrp.IsDelete = 0 AND rrp.UserId = #{userid}
  710. <if test=" projectId != null and projectId != '' ">
  711. and rp.ProjectId = #{projectId}
  712. </if>
  713. <if test=" userName != null and userName != '' ">
  714. and r.UserName LIKE CONCAT('%',#{userName},'%')
  715. </if>
  716. ORDER BY r.CreateDate desc
  717. </select>
  718. <select id="selectBindCount" resultType="java.lang.Integer">
  719. SELECT count(r.ResumeID) from Resume r , ResumeRecruitProject rrp
  720. WHERE r.ResumeID = rrp.ResumeId AND rrp.IsDelete = 0
  721. AND r.ResumeID = #{resumeid}
  722. </select>
  723. <!-- 简历统计 -->
  724. <select id="resumeReport" resultType="java.util.HashMap">
  725. select
  726. s.WorkLocation AS "workLocation",
  727. s.UserName AS "userName",
  728. IFNULL(r.resumeCount,0) AS "resumeCount",
  729. IFNULL(rc.resumecustomCount,0) AS "resumecustomCount",
  730. IFNULL(r.resumeCount,0)+IFNULL(rc.resumecustomCount,0) AS "total"
  731. from sysuser s
  732. LEFT JOIN (select UserID,count(UserID) AS "resumeCount" from resume r where IsDeleted = '0'
  733. <if test="startTime != null and startTime != '' ">
  734. <![CDATA[ and date(CreateDate) >= #{startTime} ]]>
  735. </if>
  736. <if test="endTime != null and endTime != '' ">
  737. <![CDATA[ and date(CreateDate) <= #{endTime} ]]>
  738. </if>
  739. GROUP BY UserID)r ON r.UserId = s.UserId
  740. LEFT JOIN (select create_user_id,count(create_user_id) AS "resumecustomCount" from resumecustom rc where is_delete = '0'
  741. <if test="startTime != null and startTime != '' ">
  742. <![CDATA[ and date(create_time) >= #{startTime} ]]>
  743. </if>
  744. <if test="endTime != null and endTime != '' ">
  745. <![CDATA[ and date(create_time) <= #{endTime} ]]>
  746. </if>
  747. GROUP BY create_user_id)rc ON rc.create_user_id = s.UserId
  748. where s.IsDeleted = '0'
  749. <if test="userName != null and userName != '' ">
  750. AND s.UserName LIKE CONCAT('%',#{userName},'%')
  751. </if>
  752. <if test="workLocation != null and workLocation != '' ">
  753. AND s.WorkLocation = #{workLocation}
  754. </if>
  755. order by IFNULL(r.resumeCount,0)+IFNULL(rc.resumecustomCount,0) desc
  756. </select>
  757. <!--查询所有得导入人 -->
  758. <select id="selectAllCreateUser" resultMap="BaseResultMap">
  759. SELECT DISTINCT s.UserID, s.UserName createusername FROM `Resume` r
  760. LEFT JOIN SysUser s on r.UserId=s.UserID
  761. GROUP BY s.UserID
  762. </select>
  763. <!--查询所有的专业 -->
  764. <select id="selectAllMajor" resultMap="BaseResultMap">
  765. SELECT DISTINCT r.Major FROM `Resume` r
  766. GROUP BY r.Major
  767. </select>
  768. </mapper>