ResumeMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.resume.ResumeMapper">
  6. <resultMap type="Resume" id="ResumeResult">
  7. <result property="resumeId" column="resume_id" />
  8. <result property="resumeName" column="resume_name" />
  9. <result property="userName" column="user_name" />
  10. <result property="gender" column="gender" />
  11. <result property="birthday" column="birthday" />
  12. <result property="age" column="age" />
  13. <result property="degree" column="degree" />
  14. <result property="experience" column="experience" />
  15. <result property="mobile" column="mobile" />
  16. <result property="cardNo" column="card_no" />
  17. <result property="email" column="email" />
  18. <result property="isMarryed" column="is_marryed" />
  19. <result property="residence" column="residence" />
  20. <result property="origin" column="origin" />
  21. <result property="nationality" column="nationality" />
  22. <result property="graduateCollege" column="graduate_college" />
  23. <result property="major" column="major" />
  24. <result property="lanuage" column="lanuage" />
  25. <result property="graduateDate" column="graduate_date" />
  26. <result property="positionRating" column="position_rating" />
  27. <result property="keyWords" column="key_words" />
  28. <result property="jobObjective" column="job_objective" />
  29. <result property="salary" column="salary" />
  30. <result property="selfIntroduce" column="self_introduce" />
  31. <result property="userId" column="user_id" />
  32. <result property="headUrl" column="head_url" />
  33. <result property="isPrivate" column="is_private" />
  34. <result property="isDeleted" column="is_deleted" />
  35. <result property="createDate" column="create_date" />
  36. <result property="updateUserId" column="update_user_id" />
  37. <result property="updateDate" column="update_date" />
  38. <result property="resumeDownloadUrl" column="resume_download_url" />
  39. <result property="status" column="status" />
  40. <result property="currentCompany" column="current_company" />
  41. <result property="industry" column="industry" />
  42. <result property="workingPlace" column="working_place" />
  43. <result property="certificate" column="certificate" />
  44. <result property="languageAbility" column="language_ability" />
  45. <result property="industryExperience" column="industry_experience" />
  46. <result property="workExperience" column="work_experience" />
  47. <result property="post" column="post" />
  48. <result property="lastCompany" column="last_company" />
  49. <result property="lastIndustry" column="last_industry" />
  50. <result property="lastPosition" column="last_position" />
  51. <result property="position" column="position" />
  52. <result property="selfEvaluation" column="self_evaluation" />
  53. <result property="exceptedSalary" column="excepted_salary" />
  54. <result property="isEnabled" column="is_enabled" />
  55. <result property="corpId" column="corp_id" />
  56. </resultMap>
  57. <sql id="selectResumeVo">
  58. SELECT
  59. r.resume_id,
  60. r.resume_name,
  61. r.user_name,
  62. r.gender,
  63. r.birthday,
  64. r.age,
  65. r.degree,
  66. r.experience,
  67. r.mobile,
  68. r.card_no,
  69. r.email,
  70. r.is_marryed,
  71. r.residence,
  72. r.origin,
  73. r.nationality,
  74. r.graduate_college,
  75. r.major,
  76. r.lanuage,
  77. r.graduate_date,
  78. r.position_rating,
  79. r.key_words,
  80. r.job_objective,
  81. r.salary,
  82. r.self_introduce,
  83. r.user_id,
  84. r.head_url,
  85. r.is_private,
  86. r.is_deleted,
  87. r.create_date,
  88. r.update_user_id,
  89. r.update_date,
  90. r.resume_download_url,
  91. r.STATUS,
  92. r.current_company,
  93. r.industry,
  94. r.working_place,
  95. r.certificate,
  96. r.language_ability,
  97. r.industry_experience,
  98. r.work_experience,
  99. r.post,
  100. r.last_company,
  101. r.last_industry,
  102. r.last_position,
  103. r.position,
  104. r.self_evaluation,
  105. r.excepted_salary,
  106. r.is_enabled,
  107. r.corp_id,
  108. su.user_name AS createUserName
  109. FROM
  110. resume r
  111. LEFT JOIN sys_user su ON su.user_id = r.user_id
  112. </sql>
  113. <select id="selectResumeList" parameterType="Resume" resultMap="ResumeResult">
  114. <include refid="selectResumeVo"/>
  115. <where>
  116. <if test="resumeName != null and resumeName != ''"> and r.resume_name like concat('%', #{resumeName}, '%')</if>
  117. <if test="userName != null and userName != ''"> and r.user_name like concat('%', #{userName}, '%')</if>
  118. <if test="gender != null and gender != ''"> and r.gender = #{gender}</if>
  119. <if test="birthday != null "> and r.birthday = #{birthday}</if>
  120. <if test="age != null and age != ''"> and r.age = #{age}</if>
  121. <if test="degree != null and degree != ''"> and r.degree = #{degree}</if>
  122. <if test="experience != null and experience != ''"> and r.experience = #{experience}</if>
  123. <if test="mobile != null and mobile != ''"> and r.mobile = #{mobile}</if>
  124. <if test="cardNo != null and cardNo != ''"> and r.card_no = #{cardNo}</if>
  125. <if test="email != null and email != ''"> and r.email = #{email}</if>
  126. <if test="isMarryed != null "> and r.is_marryed = #{isMarryed}</if>
  127. <if test="residence != null and residence != ''"> and r.residence = #{residence}</if>
  128. <if test="origin != null and origin != ''"> and r.origin = #{origin}</if>
  129. <if test="nationality != null and nationality != ''"> and r.nationality = #{nationality}</if>
  130. <if test="graduateCollege != null and graduateCollege != ''"> and r.graduate_college = #{graduateCollege}</if>
  131. <if test="major != null and major != ''"> and r.major = #{major}</if>
  132. <if test="lanuage != null and lanuage != ''"> and r.lanuage = #{lanuage}</if>
  133. <if test="graduateDate != null "> and r.graduate_date = #{graduateDate}</if>
  134. <if test="positionRating != null and positionRating != ''"> and r.position_rating = #{positionRating}</if>
  135. <if test="keyWords != null and keyWords != ''"> and r.key_words = #{keyWords}</if>
  136. <if test="jobObjective != null and jobObjective != ''"> and r.job_objective = #{jobObjective}</if>
  137. <if test="salary != null and salary != ''"> and r.salary = #{salary}</if>
  138. <if test="selfIntroduce != null and selfIntroduce != ''"> and r.self_introduce = #{selfIntroduce}</if>
  139. <if test="userId != null and userId != ''"> and r.user_id = #{userId}</if>
  140. <if test="createUserName != null and createUserName != ''"> and su.user_name = #{createUserName}</if>
  141. <if test="headUrl != null and headUrl != ''"> and r.head_url = #{headUrl}</if>
  142. <if test="isPrivate != null "> and r.is_private = #{isPrivate}</if>
  143. <if test="isDeleted != null "> and r.is_deleted = #{isDeleted}</if>
  144. <if test="createDate != null "> and r.create_date = #{createDate}</if>
  145. <if test="startTime != null and startTime != ''"> and r.create_date >= #{startTime}</if>
  146. <if test="endTime != null and endTime != ''"> and #{endTime} >= r.create_date </if>
  147. <if test="updateUserId != null and updateUserId != ''"> and r.update_user_id = #{updateUserId}</if>
  148. <if test="updateDate != null "> and r.update_date = #{updateDate}</if>
  149. <if test="resumeDownloadUrl != null and resumeDownloadUrl != ''"> and r.resume_download_url = #{resumeDownloadUrl}</if>
  150. <if test="status != null and status != ''"> and r.status = #{status}</if>
  151. <if test="currentCompany != null and currentCompany != ''"> and r.current_company = #{currentCompany}</if>
  152. <if test="industry != null and industry != ''"> and r.industry = #{industry}</if>
  153. <if test="workingPlace != null and workingPlace != ''"> and r.working_place = #{workingPlace}</if>
  154. <if test="certificate != null and certificate != ''"> and r.certificate = #{certificate}</if>
  155. <if test="languageAbility != null and languageAbility != ''"> and r.language_ability = #{languageAbility}</if>
  156. <if test="industryExperience != null and industryExperience != ''"> and r.industry_experience = #{industryExperience}</if>
  157. <if test="workExperience != null and workExperience != ''"> and r.work_experience = #{workExperience}</if>
  158. <if test="post != null and post != ''"> and r.post = #{post}</if>
  159. <if test="lastCompany != null and lastCompany != ''"> and r.last_company = #{lastCompany}</if>
  160. <if test="lastIndustry != null and lastIndustry != ''"> and r.last_industry = #{lastIndustry}</if>
  161. <if test="lastPosition != null and lastPosition != ''"> and r.last_position = #{lastPosition}</if>
  162. <if test="position != null and position != ''"> and r.position = #{position}</if>
  163. <if test="selfEvaluation != null and selfEvaluation != ''"> and r.self_evaluation = #{selfEvaluation}</if>
  164. <if test="exceptedSalary != null and exceptedSalary != ''"> and r.excepted_salary = #{exceptedSalary}</if>
  165. <if test="isEnabled != null "> and r.is_enabled = #{isEnabled}</if>
  166. <if test="corpId != null and corpId != '' "> and r.corp_id = #{corpId}</if>
  167. </where>
  168. order by r.create_date desc
  169. </select>
  170. <select id="selectResumeByResumeId" parameterType="Long" resultMap="ResumeResult">
  171. <include refid="selectResumeVo"/>
  172. where r.resume_id = #{resumeId}
  173. and r.corp_id = #{corpId}
  174. </select>
  175. <insert id="insertResume" parameterType="Resume" useGeneratedKeys="true" keyProperty="resumeId">
  176. insert into resume
  177. <trim prefix="(" suffix=")" suffixOverrides=",">
  178. <if test="resumeName != null">resume_name,</if>
  179. <if test="userName != null">user_name,</if>
  180. <if test="gender != null">gender,</if>
  181. <if test="birthday != null">birthday,</if>
  182. <if test="age != null">age,</if>
  183. <if test="degree != null">degree,</if>
  184. <if test="experience != null">experience,</if>
  185. <if test="mobile != null">mobile,</if>
  186. <if test="cardNo != null">card_no,</if>
  187. <if test="email != null">email,</if>
  188. <if test="isMarryed != null">is_marryed,</if>
  189. <if test="residence != null">residence,</if>
  190. <if test="origin != null">origin,</if>
  191. <if test="nationality != null">nationality,</if>
  192. <if test="graduateCollege != null">graduate_college,</if>
  193. <if test="major != null">major,</if>
  194. <if test="lanuage != null">lanuage,</if>
  195. <if test="graduateDate != null">graduate_date,</if>
  196. <if test="positionRating != null">position_rating,</if>
  197. <if test="keyWords != null">key_words,</if>
  198. <if test="jobObjective != null">job_objective,</if>
  199. <if test="salary != null">salary,</if>
  200. <if test="selfIntroduce != null">self_introduce,</if>
  201. <if test="userId != null">user_id,</if>
  202. <if test="headUrl != null">head_url,</if>
  203. <if test="isPrivate != null">is_private,</if>
  204. <if test="isDeleted != null">is_deleted,</if>
  205. <if test="createDate != null">create_date,</if>
  206. <if test="updateUserId != null">update_user_id,</if>
  207. <if test="updateDate != null">update_date,</if>
  208. <if test="resumeDownloadUrl != null">resume_download_url,</if>
  209. <if test="status != null">status,</if>
  210. <if test="currentCompany != null">current_company,</if>
  211. <if test="industry != null">industry,</if>
  212. <if test="workingPlace != null">working_place,</if>
  213. <if test="certificate != null">certificate,</if>
  214. <if test="languageAbility != null">language_ability,</if>
  215. <if test="industryExperience != null">industry_experience,</if>
  216. <if test="workExperience != null">work_experience,</if>
  217. <if test="post != null">post,</if>
  218. <if test="lastCompany != null">last_company,</if>
  219. <if test="lastIndustry != null">last_industry,</if>
  220. <if test="lastPosition != null">last_position,</if>
  221. <if test="position != null">position,</if>
  222. <if test="selfEvaluation != null">self_evaluation,</if>
  223. <if test="exceptedSalary != null">excepted_salary,</if>
  224. <if test="isEnabled != null">is_enabled,</if>
  225. <if test="corpId != null">corp_id,</if>
  226. </trim>
  227. <trim prefix="values (" suffix=")" suffixOverrides=",">
  228. <if test="resumeName != null">#{resumeName},</if>
  229. <if test="userName != null">#{userName},</if>
  230. <if test="gender != null">#{gender},</if>
  231. <if test="birthday != null">#{birthday},</if>
  232. <if test="age != null">#{age},</if>
  233. <if test="degree != null">#{degree},</if>
  234. <if test="experience != null">#{experience},</if>
  235. <if test="mobile != null">#{mobile},</if>
  236. <if test="cardNo != null">#{cardNo},</if>
  237. <if test="email != null">#{email},</if>
  238. <if test="isMarryed != null">#{isMarryed},</if>
  239. <if test="residence != null">#{residence},</if>
  240. <if test="origin != null">#{origin},</if>
  241. <if test="nationality != null">#{nationality},</if>
  242. <if test="graduateCollege != null">#{graduateCollege},</if>
  243. <if test="major != null">#{major},</if>
  244. <if test="lanuage != null">#{lanuage},</if>
  245. <if test="graduateDate != null">#{graduateDate},</if>
  246. <if test="positionRating != null">#{positionRating},</if>
  247. <if test="keyWords != null">#{keyWords},</if>
  248. <if test="jobObjective != null">#{jobObjective},</if>
  249. <if test="salary != null">#{salary},</if>
  250. <if test="selfIntroduce != null">#{selfIntroduce},</if>
  251. <if test="userId != null">#{userId},</if>
  252. <if test="headUrl != null">#{headUrl},</if>
  253. <if test="isPrivate != null">#{isPrivate},</if>
  254. <if test="isDeleted != null">#{isDeleted},</if>
  255. <if test="createDate != null">#{createDate},</if>
  256. <if test="updateUserId != null">#{updateUserId},</if>
  257. <if test="updateDate != null">#{updateDate},</if>
  258. <if test="resumeDownloadUrl != null">#{resumeDownloadUrl},</if>
  259. <if test="status != null">#{status},</if>
  260. <if test="currentCompany != null">#{currentCompany},</if>
  261. <if test="industry != null">#{industry},</if>
  262. <if test="workingPlace != null">#{workingPlace},</if>
  263. <if test="certificate != null">#{certificate},</if>
  264. <if test="languageAbility != null">#{languageAbility},</if>
  265. <if test="industryExperience != null">#{industryExperience},</if>
  266. <if test="workExperience != null">#{workExperience},</if>
  267. <if test="post != null">#{post},</if>
  268. <if test="lastCompany != null">#{lastCompany},</if>
  269. <if test="lastIndustry != null">#{lastIndustry},</if>
  270. <if test="lastPosition != null">#{lastPosition},</if>
  271. <if test="position != null">#{position},</if>
  272. <if test="selfEvaluation != null">#{selfEvaluation},</if>
  273. <if test="exceptedSalary != null">#{exceptedSalary},</if>
  274. <if test="isEnabled != null">#{isEnabled},</if>
  275. <if test="corpId != null">#{corpId},</if>
  276. </trim>
  277. </insert>
  278. <update id="updateResume" parameterType="Resume">
  279. update resume
  280. <trim prefix="SET" suffixOverrides=",">
  281. <if test="resumeName != null">resume_name = #{resumeName},</if>
  282. <if test="userName != null">user_name = #{userName},</if>
  283. <if test="gender != null">gender = #{gender},</if>
  284. <if test="birthday != null">birthday = #{birthday},</if>
  285. <if test="age != null">age = #{age},</if>
  286. <if test="degree != null">degree = #{degree},</if>
  287. <if test="experience != null">experience = #{experience},</if>
  288. <if test="mobile != null">mobile = #{mobile},</if>
  289. <if test="cardNo != null">card_no = #{cardNo},</if>
  290. <if test="email != null">email = #{email},</if>
  291. <if test="isMarryed != null">is_marryed = #{isMarryed},</if>
  292. <if test="residence != null">residence = #{residence},</if>
  293. <if test="origin != null">origin = #{origin},</if>
  294. <if test="nationality != null">nationality = #{nationality},</if>
  295. <if test="graduateCollege != null">graduate_college = #{graduateCollege},</if>
  296. <if test="major != null">major = #{major},</if>
  297. <if test="lanuage != null">lanuage = #{lanuage},</if>
  298. <if test="graduateDate != null">graduate_date = #{graduateDate},</if>
  299. <if test="positionRating != null">position_rating = #{positionRating},</if>
  300. <if test="keyWords != null">key_words = #{keyWords},</if>
  301. <if test="jobObjective != null">job_objective = #{jobObjective},</if>
  302. <if test="salary != null">salary = #{salary},</if>
  303. <if test="selfIntroduce != null">self_introduce = #{selfIntroduce},</if>
  304. <if test="userId != null">user_id = #{userId},</if>
  305. <if test="headUrl != null">head_url = #{headUrl},</if>
  306. <if test="isPrivate != null">is_private = #{isPrivate},</if>
  307. <if test="isDeleted != null">is_deleted = #{isDeleted},</if>
  308. <if test="createDate != null">create_date = #{createDate},</if>
  309. <if test="updateUserId != null">update_user_id = #{updateUserId},</if>
  310. <if test="updateDate != null">update_date = #{updateDate},</if>
  311. <if test="resumeDownloadUrl != null">resume_download_url = #{resumeDownloadUrl},</if>
  312. <if test="status != null">status = #{status},</if>
  313. <if test="currentCompany != null">current_company = #{currentCompany},</if>
  314. <if test="industry != null">industry = #{industry},</if>
  315. <if test="workingPlace != null">working_place = #{workingPlace},</if>
  316. <if test="certificate != null">certificate = #{certificate},</if>
  317. <if test="languageAbility != null">language_ability = #{languageAbility},</if>
  318. <if test="industryExperience != null">industry_experience = #{industryExperience},</if>
  319. <if test="workExperience != null">work_experience = #{workExperience},</if>
  320. <if test="post != null">post = #{post},</if>
  321. <if test="lastCompany != null">last_company = #{lastCompany},</if>
  322. <if test="lastIndustry != null">last_industry = #{lastIndustry},</if>
  323. <if test="lastPosition != null">last_position = #{lastPosition},</if>
  324. <if test="position != null">position = #{position},</if>
  325. <if test="selfEvaluation != null">self_evaluation = #{selfEvaluation},</if>
  326. <if test="exceptedSalary != null">excepted_salary = #{exceptedSalary},</if>
  327. <if test="isEnabled != null">is_enabled = #{isEnabled},</if>
  328. <if test="corpId != null">corp_id = #{corpId},</if>
  329. </trim>
  330. where resume_id = #{resumeId}
  331. </update>
  332. <delete id="deleteResumeByResumeId" parameterType="Long">
  333. delete from resume where resume_id = #{resumeId}
  334. </delete>
  335. <delete id="deleteResumeByResumeIds" parameterType="String">
  336. delete from resume where resume_id in
  337. <foreach item="resumeId" collection="array" open="(" separator="," close=")">
  338. #{resumeId}
  339. </foreach>
  340. </delete>
  341. </mapper>