PostCQuery.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.hz.employmentsite.mapper.cquery.PostCQuery">
  4. <select id="selectPostList" resultType="com.hz.employmentsite.vo.companyService.PostVo">
  5. select post.postID,post.workCode,post.workName,post.recruitCount,post.companyID,post.postName,post.recordStatus,post.workNature,post.validDay,
  6. post.workYear,post.cultureRank,post.postDesc,post.maxSalary,post.minSalary,post.welfare,post.postEmail,post.workTime,post.isTrail,post.trailMonths,
  7. post.TrailMaxSalary,post.trailMinSalary,post.createUserID,post.createTime,post.modifyUserID,post.modifyTime,post.validTime,post.startTime,post.endTime,
  8. post.jobPlace,company.userName,company.userMobile,company.companyEmail,company.CompanyName,company.insuredCount,item.`Name` as cultureLevelName from pc_post post
  9. left join pc_company company on post.CompanyID = company.CompanyID
  10. left join sys_dictionary_item item on item.value=post.CultureRank and item.DictionaryCode='CultureLevel'
  11. where 1=1
  12. <if test="postIDList != '' and postIDList != null">
  13. and post.postID in (${postIDList})
  14. </if>
  15. <if test="postName != '' and postName != null">
  16. and post.postName like Concat('%',#{postName},'%')
  17. </if>
  18. <if test="minCount != null and minCount != ''">
  19. and post.RecruitCount <![CDATA[ >= ]]> #{minCount}
  20. </if>
  21. <if test="maxCount != null and maxCount != ''">
  22. and post.RecruitCount <![CDATA[ <= ]]> #{maxCount}
  23. </if>
  24. <if test="companyName != null and companyName != ''">
  25. and company.CompanyName like Concat('%',#{companyName},'%')
  26. </if>
  27. <if test="RecordStatus != null and RecordStatus != ''">
  28. and post.RecordStatus = #{RecordStatus}
  29. </if>
  30. <if test="WorkName != null and WorkName != ''">
  31. and post.WorkName like Concat('%', #{WorkName},'%')
  32. </if>
  33. <if test="companyID != null and companyID != ''">
  34. and post.CompanyID = #{companyID}
  35. </if>
  36. order by post.CreateTime desc
  37. </select>
  38. <select id="selectRecommendPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendPostVo">
  39. select post.*,recommend.recommendID,jobhunt.JobUserID,recommend.isRead,recommend.isSendNotes,company.CompanyName,company.InsuredCount from
  40. (select * from pc_post where PostID in (select PostID from pc_jobhunt where JobUserID= #{jobUserID})) post
  41. left join pc_company company on post.CompanyID = company.CompanyID
  42. left join (select * from pc_recommend where JobUserID= #{jobUserID}) recommend on post.PostID = recommend.PostID
  43. left join pc_jobhunt jobhunt on post.PostID = jobhunt.PostID
  44. where jobhunt.JobUserID = #{jobUserID}
  45. order by post.CreateTime desc
  46. </select>
  47. </mapper>