PostCQuery.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.*,company.CompanyName,company.insuredCount,item.`Name` as cultureLevelName from pc_post post
  6. left join pc_company company
  7. on post.CompanyID = company.CompanyID
  8. left join sys_dictionary_item item
  9. on item.value=post.CultureRank and item.DictionaryCode='CultureLevel'
  10. where 1=1
  11. <if test="postIDList != '' and postIDList != null">
  12. and post.postID in (${postIDList})
  13. </if>
  14. <if test="postName != '' and postName != null">
  15. and post.postName like Concat('%',#{postName},'%')
  16. </if>
  17. <if test="minCount != null and minCount != ''">
  18. and post.RecruitCount <![CDATA[ >= ]]> #{minCount}
  19. </if>
  20. <if test="maxCount != null and maxCount != ''">
  21. and post.RecruitCount <![CDATA[ <= ]]> #{maxCount}
  22. </if>
  23. <if test="companyName != null and companyName != ''">
  24. and company.CompanyName like Concat('%',#{companyName},'%')
  25. </if>
  26. <if test="RecordStatus != null and RecordStatus != ''">
  27. and post.RecordStatus = #{RecordStatus}
  28. </if>
  29. <if test="WorkName != null and WorkName != ''">
  30. and post.WorkName like Concat('%', #{WorkName},'%')
  31. </if>
  32. <if test="companyID != null and companyID != ''">
  33. and post.CompanyID = #{companyID}
  34. </if>
  35. order by post.CreateTime desc
  36. </select>
  37. <select id="selectRecommendPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendPostVo">
  38. select post.*,recommend.recommendID,jobhunt.JobUserID,recommend.isRead,recommend.isSendNotes,company.CompanyName,company.InsuredCount from
  39. (select * from pc_post where PostID in (select PostID from pc_jobhunt where JobUserID= #{jobUserID})) post
  40. left join pc_company company on post.CompanyID = company.CompanyID
  41. left join (select * from pc_recommend where JobUserID= #{jobUserID}) recommend on post.PostID = recommend.PostID
  42. left join pc_jobhunt jobhunt on post.PostID = jobhunt.PostID
  43. where jobhunt.JobUserID = #{jobUserID}
  44. order by post.CreateTime desc
  45. </select>
  46. </mapper>