1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?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.PostCQuery">
- <select id="selectPostList" resultType="com.hz.employmentsite.vo.companyService.PostVo">
- select
- post.postID,post.workCode,post.workName,post.recruitCount,post.companyID,post.postName,post.recordStatus,post.workNature,post.validDay,
- post.workYear,post.cultureRank,post.postDesc,post.maxSalary,post.minSalary,post.welfare,post.postEmail,post.workTime,post.isTrail,post.trailMonths,
- post.TrailMaxSalary,post.trailMinSalary,post.createUserID,post.createTime,post.modifyUserID,post.modifyTime,post.validTime,post.startTime,post.endTime,
- post.contactName,post.contactMobile,post.contactEmail,
- post.jobPlace,post.contactName,post.contactMobile,post.contactEmail,post.workNatureID,post.tagID,company.userName,company.userMobile,company.companyEmail,
- company.CompanyName,company.insuredCount,company.bonus,item.`Name` as cultureLevelName,work_nature.Name as
- workNatureName,
- post.ProfessionID,pro.ProfessionName,pro.parentProfessionID,
- company.CompanyName,company.insuredCount,company.bonus,item.`Name` as cultureLevelName,work_nature.Name as
- workNatureName,
- post.ProfessionID,pro.ProfessionName,pro.parentProfessionID,item2.`Name` as workYearStr
- , IFNULL(count(rmgt.RecommendMgtID),0) as recommendNum
- , site.SiteID, site.SiteName, inSites.InstitutionID as institutionID, company.RegionCode
- from pc_post post
- left join pc_company company on post.CompanyID = company.CompanyID
- left join sys_dictionary_item item on item.value=post.CultureRank and item.DictionaryCode='CultureLevel'
- left join sys_dictionary_item item2 on item2.value=post.workYear and item2.DictionaryCode='WorkYearType'
- left join sys_dictionary_item work_nature on work_nature.value=post.WorkNatureID and
- work_nature.DictionaryCode='WorkNature'
- left join pc_profession pro on post.ProfessionID = pro.ProfessionID
- left join pc_recommend_mgt rmgt on post.PostID = rmgt.PostID
- left join pc_site site on company.siteID = site.siteID
- left join pc_site_institution inSites on site.SiteID = inSites.SiteID
- left join pc_institution institution on inSites.institutionID = institution.InstitutionID
- <where>
- <if test="postIDList != '' and postIDList != null">
- and post.postID in (${postIDList})
- </if>
- <if test="professionName != '' and professionName != null">
- and pro.ProfessionName like Concat('%',#{professionName},'%')
- </if>
- <if test="minCount != null and minCount != ''">
- and post.RecruitCount <![CDATA[ >= ]]> #{minCount}
- </if>
- <if test="maxCount != null and maxCount != ''">
- and post.RecruitCount <![CDATA[ <= ]]> #{maxCount}
- </if>
- <if test="companyName != null and companyName != ''">
- and company.CompanyName like Concat('%',#{companyName},'%')
- </if>
- <if test="RecordStatus != null and RecordStatus != ''">
- and post.RecordStatus = #{RecordStatus}
- </if>
- <if test="companyID != null and companyID != ''">
- and post.CompanyID = #{companyID}
- </if>
- </where>
- group by
- post.postID,post.workCode,post.workName,post.recruitCount,post.companyID,post.postName,post.recordStatus,post.workNature,post.validDay,
- post.workYear,post.cultureRank,post.postDesc,post.maxSalary,post.minSalary,post.welfare,post.postEmail,post.workTime,post.isTrail,post.trailMonths,
- post.TrailMaxSalary,post.trailMinSalary,post.createUserID,post.createTime,post.modifyUserID,post.modifyTime,post.validTime,post.startTime,post.endTime,
- post.jobPlace,company.userName,company.userMobile,company.companyEmail,company.CompanyName,company.insuredCount,item.`Name`,
- post.ProfessionID,pro.ProfessionName,pro.parentProfessionID,site.SiteID,site.SiteName,inSites.InstitutionID,company.RegionCode
- order by post.CreateTime desc
- </select>
- <select id="selectRecommendPostList" resultType="com.hz.employmentsite.vo.companyService.RecommendPostVo">
- select post.*,
- recommend.recommendID,
- jobhunt.JobUserID,
- recommend.isRead,
- recommend.isSendNotes,
- company.CompanyName,
- company.InsuredCount
- from (select * from pc_post where PostID in (select PostID from pc_jobhunt where JobUserID = #{jobUserID})) post
- left join pc_company company on post.CompanyID = company.CompanyID
- left join (select * from pc_recommend where JobUserID = #{jobUserID}) recommend
- on post.PostID = recommend.PostID
- left join pc_jobhunt jobhunt on post.PostID = jobhunt.PostID
- where jobhunt.JobUserID = #{jobUserID}
- order by post.CreateTime desc
- </select>
- </mapper>
|