1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.hz.employmentsite.mapper.cquery.JobHuntCQuery">
- <select id="getJobHuntList" resultType="com.hz.employmentsite.vo.jobUserManager.JobHuntVo">
- select jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName,
- jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary,
- jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime,
- jobHunt.OtherDemand
- ,jobUser.name as JobUserName,dic_jobUserType.Name as jobUserTypeStr,dic_huntJobType.Name as jobHuntTypeStr
- ,profession.ProfessionName, profession.ParentProfessionID, IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
- ,jobUser.cultureRank
- , site.SiteID as siteID, inSites.InstitutionID as institutionID, site.RegionCode as regionCode
- from pc_jobhunt jobHunt
- left join pc_jobuser jobUser on jobHunt.JobUserID = jobUser.JobUserID
- left join pc_site site on site.SiteID = jobuser.SiteID
- left join pc_site_institution inSites on site.SiteID = inSites.SiteID
- left join pc_institution institution on inSites.institutionID = institution.InstitutionID
- left join pc_profession profession on jobHunt.professionID = profession.professionID
- left join pc_recommend_mgt rmgt on jobHunt.JobHuntID = rmgt.JobHuntID
- left join (select * from sys_dictionary_item where DictionaryCode ='JobUserType') dic_jobUserType on
- jobHunt.JobUserType = dic_jobUserType.value
- left join (select * from sys_dictionary_item where DictionaryCode ='JobHuntType') dic_huntJobType on
- jobHunt.JobHuntType = dic_huntJobType.value
- where 1=1
- <if test="jobHuntIDList != '' and jobHuntIDList != null">
- and jobHunt.JobHuntID in (${jobHuntIDList})
- </if>
- <if test="jobUserID != '' and jobUserID != null">
- and jobHunt.jobUserID = #{jobUserID}
- </if>
- <if test="jobUserName != '' and jobUserName != null">
- and jobUser.name like Concat('%',#{jobUserName},'%')
- </if>
- <if test="professionName != '' and professionName != null">
- and profession.ProfessionName like Concat('%',#{professionName},'%')
- </if>
- <if test="minWorkYear != '' and minWorkYear != null">
- and jobHunt.workYear <![CDATA[ >= ]]> #{minWorkYear}
- </if>
- <if test="maxWorkYear != '' and maxWorkYear != null">
- and jobHunt.workYear <![CDATA[ <= ]]> #{maxWorkYear}
- </if>
- <if test="jobHuntTypeID != '' and jobHuntTypeID != null">
- and jobHuntType = #{jobHuntTypeID}
- </if>
- <if test="jobUserTypeID != '' and jobUserTypeID != null">
- and jobUserType = #{jobUserTypeID}
- </if>
- <if test="minSalary != '' and minSalary != null and (maxSalary == '' or maxSalary == null)">
- and jobHunt.minSalary <![CDATA[ >= ]]> #{minSalary}
- </if>
- <if test="maxSalary != '' and maxSalary != null and (minSalary == '' or minSalary == null)">
- and jobHunt.maxSalary <![CDATA[ <= ]]> #{maxSalary}
- </if>
- <if test="minSalary != '' and minSalary != null and maxSalary != '' and maxSalary != null">
- and
- (jobHunt.minSalary <![CDATA[ >= ]]> #{minSalary} and jobHunt.maxSalary <![CDATA[ <= ]]> #{maxSalary})
- </if>
- <if test="isAccomplish != '' and isAccomplish != null">
- and rmgt.EntryState = #{isAccomplish}
- </if>
- order by jobHunt.CreateTime desc
- </select>
- <!-- getJobHuntList的分组
- group by jobHunt.JobHuntID, jobHunt.JobUserID, jobHunt.ProfessionID, jobHunt.WorkCode, jobHunt.WorkName,
- jobHunt.AreaWork, jobHunt.InDate, jobHunt.WorkYear, jobHunt.JobHuntType, jobHunt.JobUserType, jobHunt.MinSalary,
- jobHunt.MaxSalary, jobHunt.CreateUserID, jobHunt.CreateTime, jobHunt.ModifyUserID, jobHunt.ModifyTime,
- jobHunt.OtherDemand
- ,jobUser.`Name`,dic_jobUserType.`Name`,dic_huntJobType.`Name`, profession.ProfessionName, profession.ParentProfessionID,jobUser.cultureRank
- -->
- </mapper>
|