JobHuntCQuery.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.*,jobUser.name as JobUserName,dic_jobUserType.Name as jobUserTypeStr,dic_huntJobType.Name as jobHuntTypeStr,
  6. profession.ProfessionName from pc_jobhunt jobHunt
  7. left join pc_jobuser jobUser on jobHunt.JobUserID = jobUser.JobUserID
  8. left join pc_profession profession on jobHunt.professionID = profession.professionID
  9. left join (select * from sys_dictionary_item where DictionaryCode ='JobUserType') dic_jobUserType on jobHunt.JobUserType = dic_jobUserType.value
  10. left join (select * from sys_dictionary_item where DictionaryCode ='JobHuntType') dic_huntJobType on jobHunt.JobHuntType = dic_huntJobType.value
  11. where 1=1
  12. <if test="jobHuntIDList != '' and jobHuntIDList != null">
  13. and jobHuntId in (${jobHuntIDList})
  14. </if>
  15. <if test="jobUserID != '' and jobUserID != null">
  16. and jobHunt.jobUserID = #{jobUserID}
  17. </if>
  18. <if test="jobUserName != '' and jobUserName != null">
  19. and jobUser.name like Concat('%',#{jobUserName},'%')
  20. </if>
  21. <if test="workName != '' and workName != null">
  22. and jobHunt.workName like Concat('%',#{workName},'%')
  23. </if>
  24. <if test="minWorkYear != '' and minWorkYear != null">
  25. and jobHunt.workYear <![CDATA[ >= ]]> #{minWorkYear}
  26. </if>
  27. <if test="maxWorkYear != '' and maxWorkYear != null">
  28. and jobHunt.workYear <![CDATA[ <= ]]> #{maxWorkYear}
  29. </if>
  30. <if test="jobHuntTypeID != '' and jobHuntTypeID != null">
  31. and jobHuntType = #{jobHuntTypeID}
  32. </if>
  33. <if test="jobUserTypeID != '' and jobUserTypeID != null">
  34. and jobUserType = #{jobUserTypeID}
  35. </if>
  36. <if test="minSalary != '' and minSalary != null and (maxSalary == '' or maxSalary == null)" >
  37. and jobHunt.minSalary <![CDATA[ >= ]]> #{minSalary} and jobHunt.maxSalary <![CDATA[ >= ]]> #{minSalary}
  38. </if>
  39. <if test="maxSalary != '' and maxSalary != null and (minSalary == '' or minSalary == null)">
  40. and jobHunt.minSalary <![CDATA[ <= ]]> #{maxSalary} and jobHunt.maxSalary <![CDATA[ >= ]]> #{maxSalary}
  41. </if>
  42. <if test="minSalary != '' and minSalary != null and maxSalary != '' and maxSalary != null">
  43. and (jobHunt.minSalary <![CDATA[ <= ]]> #{maxSalary})
  44. or (jobHunt.minSalary <![CDATA[ <= ]]> #{minSalary} and jobHunt.maxSalary <![CDATA[ >= ]]> #{minSalary})
  45. </if>
  46. <!-- <if test="isAccomplish != '' and isAccomplish != null">
  47. and isAccomplish = #{isAccomplish}
  48. </if>-->
  49. order by jobHunt.CreateTime desc
  50. </select>
  51. </mapper>