123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?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.RecommendMgtCQuery">
- <select id="getRecommendMgtList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo">
- select a.recommendmgtid,a.postid,a.jobhuntid,a.recommendtype,a.entrystate,a.officialaccountsid,
- a.postisread,a.jobpeopleisread,a.createuserid,a.createtime,a.modifyuserid,a.modifytime,
- c.companyname,c.usermobile as companymobile,e.`name`,e.usermobile,f.professionname,
- dic1.`name` as recommendtypename,dic2.`name` as entrystatename,dic3.`name` as postisreadname,
- dic4.`name` as jobpeopleisreadname,g.`name` as pushname, dic5.`name` as gendername
- from pc_recommend_mgt a
- left join pc_post b on a.PostID = b.PostID
- left join pc_company c on b.CompanyID = c.CompanyID
- left join pc_jobhunt d on a.JobHuntID = d.JobHuntID
- left join pc_jobuser e on d.JobUserID = e.JobuserID
- left join pc_profession f on b.ProfessionID = f.ProfessionID
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='RecommendType') dic1 on a.RecommendType = dic1.`Value`
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='EntryState') dic2 on a.EntryState = dic2.`Value`
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic3 on a.PostIsRead = dic3.`Value`
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='IsRead') dic4 on a.JobPeopleIsRead = dic4.`Value`
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='Gender') dic5 on e.Sex = dic5.`Value`
- left join sys_user g on a.CreateUserID = g.UserID
- <where>
- <if test="name != '' and name != null">
- and e.name like Concat('%',#{name},'%')
- </if>
- <if test="companyName != '' and companyName != null">
- and c.CompanyName like Concat('%',#{companyName},'%')
- </if>
- <if test="recommendType != null">
- and a.RecommendType = #{recommendType}
- </if>
- <if test="entryState != null">
- and a.EntryState = #{entryState}
- </if>
- <if test="pushName != '' and pushName != null">
- and g.Name like Concat('%',#{pushName},'%')
- </if>
- <if test="professionID != '' and professionID != null">
- and b.ProfessionID = #{professionID}
- </if>
- </where>
- order by a.createtime desc
- </select>
- <select id="getRecommendCompanyPostList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendCompanyPostVo">
- select a.postid,b.companyname,c.professionname,a.recruitcount,a.starttime,a.endtime,
- case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isRecommend,d.recommendMgtID
- from pc_post a
- left join pc_company b on a.CompanyID = b.CompanyID
- left join pc_profession c on a.ProfessionID = c.ProfessionID
- left join pc_recommend_mgt d on a.PostID = d.PostID and d.JobHuntID = #{jobHuntID}
- <where>
- <if test="professionID!=null and professionID!=''">
- and a.ProfessionID = #{professionID}
- </if>
- <if test="companyName!=null and companyName!=''">
- and b.CompanyName like Concat('%',#{companyName},'%')
- </if>
- <if test="type!=null and type==0">
- and d.RecommendMgtID is null
- </if>
- <if test="type!=null and type==1">
- and d.RecommendMgtID is not null
- </if>
- </where>
- order by a.CreateTime desc
- </select>
- <select id="getRecommendJobList" resultType="com.hz.employmentsite.vo.jobUserManager.RecommendJobVo">
- select a.jobhuntid,b.username,b.usermobile,e.sitename,dic1.`name` as culturerankname,dic2.`name` as keypersontypename,
- case when d.recommendmgtid is null then '未推荐' else '已推荐' end as isrecommend,d.recommendMgtID
- from pc_jobhunt a
- left join pc_jobuser b on a.JobUserID = b.JobUserID
- left join pc_profession c on a.ProfessionID = c.ProfessionID
- left join pc_site e on b.SiteID = e.SiteID
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='CultureLevel') dic1 on b.CultureRank = dic1.`Value`
- left join (select `Value`,`Name` from sys_dictionary_item where DictionaryCode='KeyPersonType') dic2 on b.KeyPersonTypeID = dic2.`Value`
- left join pc_recommend_mgt d on a.JobHuntID = d.JobHuntID and d.PostID = #{postID}
- <where>
- <if test="professionID!=null and professionID!=''">
- and a.ProfessionID = #{professionID}
- </if>
- <if test="userName!=null and userName!=''">
- and b.UserName like Concat('%',#{userName},'%')
- </if>
- <if test="type!=null and type==0">
- and d.RecommendMgtID is null
- </if>
- <if test="type!=null and type==1">
- and d.RecommendMgtID is not null
- </if>
- <if test="keyPersonType!=null and keyPersonType!=''">
- and b.KeyPersonTypeID = #{keyPersonType}
- </if>
- <if test="cultureLeve!=null and cultureLeve!=''">
- and b.CultureRank = #{cultureLeve}
- </if>
- </where>
- order by a.CreateTime desc
- </select>
- </mapper>
|