JobHuntCQuery.xml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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.JobHuntCQuery">
  4. <select id="getJobHuntList" resultType="com.hz.employmentsite.vo.jobUserManager.JobHuntVo">
  5. select jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName,
  6. jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary,
  7. jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime,
  8. jobHunt.OtherDemand
  9. ,jobUser.name as JobUserName,dic_jobUserType.Name as jobUserTypeStr,dic_huntJobType.Name as jobHuntTypeStr
  10. ,profession.ProfessionName, profession.ParentProfessionID, IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
  11. ,jobUser.cultureRank
  12. , site.SiteID as siteID, inSites.InstitutionID as institutionID, site.RegionCode as regionCode
  13. from pc_jobhunt jobHunt
  14. left join pc_jobuser jobUser on jobHunt.JobUserID = jobUser.JobUserID
  15. left join pc_site site on site.SiteID = jobuser.SiteID
  16. left join pc_site_institution inSites on site.SiteID = inSites.SiteID
  17. left join pc_institution institution on inSites.institutionID = institution.InstitutionID
  18. left join pc_profession profession on jobHunt.professionID = profession.professionID
  19. left join pc_recommend_mgt rmgt on jobHunt.JobHuntID = rmgt.JobHuntID
  20. left join (select * from sys_dictionary_item where DictionaryCode ='JobUserType') dic_jobUserType on
  21. jobHunt.JobUserType = dic_jobUserType.value
  22. left join (select * from sys_dictionary_item where DictionaryCode ='JobHuntType') dic_huntJobType on
  23. jobHunt.JobHuntType = dic_huntJobType.value
  24. where 1=1
  25. <if test="jobHuntIDList != '' and jobHuntIDList != null">
  26. and jobHunt.JobHuntID in (${jobHuntIDList})
  27. </if>
  28. <if test="jobUserID != '' and jobUserID != null">
  29. and jobHunt.jobUserID = #{jobUserID}
  30. </if>
  31. <if test="jobUserName != '' and jobUserName != null">
  32. and jobUser.name like Concat('%',#{jobUserName},'%')
  33. </if>
  34. <if test="professionName != '' and professionName != null">
  35. and profession.ProfessionName like Concat('%',#{professionName},'%')
  36. </if>
  37. <if test="minWorkYear != '' and minWorkYear != null">
  38. and jobHunt.workYear <![CDATA[ >= ]]> #{minWorkYear}
  39. </if>
  40. <if test="maxWorkYear != '' and maxWorkYear != null">
  41. and jobHunt.workYear <![CDATA[ <= ]]> #{maxWorkYear}
  42. </if>
  43. <if test="jobHuntTypeID != '' and jobHuntTypeID != null">
  44. and jobHuntType = #{jobHuntTypeID}
  45. </if>
  46. <if test="jobUserTypeID != '' and jobUserTypeID != null">
  47. and jobUserType = #{jobUserTypeID}
  48. </if>
  49. <if test="minSalary != '' and minSalary != null and (maxSalary == '' or maxSalary == null)">
  50. and jobHunt.minSalary <![CDATA[ >= ]]> #{minSalary}
  51. </if>
  52. <if test="maxSalary != '' and maxSalary != null and (minSalary == '' or minSalary == null)">
  53. and jobHunt.maxSalary <![CDATA[ <= ]]> #{maxSalary}
  54. </if>
  55. <if test="minSalary != '' and minSalary != null and maxSalary != '' and maxSalary != null">
  56. and
  57. (jobHunt.minSalary <![CDATA[ >= ]]> #{minSalary} and jobHunt.maxSalary <![CDATA[ <= ]]> #{maxSalary})
  58. </if>
  59. <if test="isAccomplish != '' and isAccomplish != null">
  60. and rmgt.EntryState = #{isAccomplish}
  61. </if>
  62. order by jobHunt.CreateTime desc
  63. </select>
  64. <!-- getJobHuntList的分组
  65. group by jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName,
  66. jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary,
  67. jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime,
  68. jobHunt.OtherDemand
  69. ,jobUser.`Name`,dic_jobUserType.`Name`,dic_huntJobType.`Name`, profession.ProfessionName, profession.ParentProfessionID,jobUser.cultureRank
  70. -->
  71. </mapper>