|
|
@@ -5,29 +5,61 @@
|
|
|
|
|
|
|
|
|
<select id="selectResumesList" resultType="com.sqx.modules.resumes.entity.Resumes">
|
|
|
- select r.*,u.user_name as userName,u.avatar from resumes r
|
|
|
+ select
|
|
|
+ r.resumes_id, u.user_name as resumes_name, u.sex as resumes_sex, u.age as resumes_age, r.resumes_phone, e.degree as resumes_education,
|
|
|
+ r.resumes_marriage, i.salary_range as resumes_compensation, r.resumes_email, r.resumes_work_experience,
|
|
|
+ r.resumes_intention, r.resumes_major, i.rule_classify_name as resumes_post, r.adv as resumes_details, r.resumes_image_name,
|
|
|
+ r.resumes_image, r.user_id, r.status, r.update_time, r.create_time, r.audit_content, e.school as school,
|
|
|
+ r.rule_post_name, r.rule_post_id, r.is_recommend, r.city, r.rule_classify_id, r.rule_major, r.address,
|
|
|
+ e.profession as major, r.money, r.industry_id, r.industry_one_id, r.classify_one_id, r. classify_two_id, r.resumes_status,
|
|
|
+ e.end_time as graduation_time, r.industry_name, r.is_show, r.if_exp, r.birthday, r.adv, r.picture, r.resumes_attachment,
|
|
|
+ u.user_name as userName,u.avatar from resumes r
|
|
|
left join tb_user u on u.user_id=r.user_id
|
|
|
+ left join edu e on e.user_id = r.user_id and e.end_time = (select max(b.end_time) from edu b where b.user_id = e.user_id)
|
|
|
+ left join intention i on i.user_id = r.user_Id and i.create_time = (select max(o.create_time) from intention o where o.user_id = i.user_id)
|
|
|
<where>
|
|
|
<if test="resumes.isShow!=null">
|
|
|
and r.is_show = #{resumes.isShow}
|
|
|
</if>
|
|
|
+ <if test="resumes.status!=null and resumes.status!=0">
|
|
|
+ and r.status=#{resumes.status}
|
|
|
+ </if>
|
|
|
<if test="resumes.resumesName!=null and resumes.resumesName!=''">
|
|
|
- and r.resumes_name like concat('%',#{resumes.resumesName},'%')
|
|
|
+ and u.user_name like concat('%',#{resumes.resumesName},'%')
|
|
|
</if>
|
|
|
<if test="resumes.resumesPhone!=null and resumes.resumesPhone!=''">
|
|
|
- and r.resumes_phone like concat('%',#{resumes.resumesPhone},'%')
|
|
|
+ and u.phone like concat('%',#{resumes.resumesPhone},'%')
|
|
|
</if>
|
|
|
- <if test="resumes.resumesMajor!=null and resumes.resumesMajor!=''">
|
|
|
- and r.resumes_major like concat('%',#{resumes.resumesMajor},'%')
|
|
|
+ <if test="resumes.school!=null and resumes.school!=''">
|
|
|
+ and e.school like concat('%',#{resumes.school},'%')
|
|
|
+ </if>
|
|
|
+ <if test="resumes.resumesEducation!=null and resumes.resumesEducation!=''">
|
|
|
+ and e.degree like concat('%',#{resumes.resumesEducation},'%')
|
|
|
</if>
|
|
|
<if test="resumes.resumesPost!=null and resumes.resumesPost!=''">
|
|
|
- and r.resumes_post like concat('%',#{resumes.resumesPost},'%')
|
|
|
+ and i.rule_classify_name like concat('%',#{resumes.resumesPost},'%')
|
|
|
+ </if>
|
|
|
+ <if test="resumes.industryName!=null and resumes.industryName!=''">
|
|
|
+ and r.industry_name like concat('%',#{resumes.industryName},'%')
|
|
|
</if>
|
|
|
+ <if test="resumes.resumesAge!=null and resumes.resumesAge!=''">
|
|
|
+ and u.age =#{resumes.resumesAge}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and startTime!='' and startTime!=null and startTime!=''">
|
|
|
+ and date_format(r.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
|
|
|
+ and date_format(cr.create_time,'%Y-%m-%d') >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
|
|
|
+ and date_format(r.create_time,'%Y-%m-%d') <= #{endTime}
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="resumes.resumesWorkExperience!=null and resumes.resumesWorkExperience!=''">
|
|
|
and r.resumes_work_experience like concat('%',#{resumes.resumesWorkExperience},'%')
|
|
|
</if>
|
|
|
- <if test="resumes.status!=null and resumes.status!=0">
|
|
|
- and r.status=#{resumes.status}
|
|
|
+ <if test="resumes.resumesMajor!=null and resumes.resumesMajor!=''">
|
|
|
+ and r.resumes_major like concat('%',#{resumes.resumesMajor},'%')
|
|
|
</if>
|
|
|
<if test="resumes.isRecommend!=null and resumes.isRecommend==1">
|
|
|
and (r.is_recommend =1 or r.is_recommend is null )
|
|
|
@@ -35,36 +67,15 @@
|
|
|
<if test="resumes.isRecommend!=null and resumes.isRecommend==2">
|
|
|
and r.is_recommend=#{resumes.isRecommend}
|
|
|
</if>
|
|
|
- <if test="resumes.resumesEducation!=null and resumes.resumesEducation!=''">
|
|
|
- and r.resumes_education like concat('%',#{resumes.resumesEducation},'%')
|
|
|
- </if>
|
|
|
<if test="resumes.resumesMarriage!=null and resumes.resumesMarriage!=''">
|
|
|
and r.resumes_marriage like concat('%',#{resumes.resumesMarriage},'%')
|
|
|
</if>
|
|
|
- <if test="resumes.industryName!=null and resumes.industryName!=''">
|
|
|
- and r.industry_name like concat('%',#{resumes.industryName},'%')
|
|
|
- </if>
|
|
|
<if test="resumes.rulePostName!=null and resumes.rulePostName!=''">
|
|
|
and r.rule_post_name like concat('%',#{resumes.rulePostName},'%')
|
|
|
</if>
|
|
|
<if test="resumes.resumesCompensation!=null and resumes.resumesCompensation!=''">
|
|
|
and r.resumes_compensation like concat('%',#{resumes.resumesCompensation},'%')
|
|
|
</if>
|
|
|
- <if test="resumes.school!=null and resumes.school!=''">
|
|
|
- and r.school like concat('%',#{resumes.school},'%')
|
|
|
- </if>
|
|
|
- <if test="resumes.resumesAge!=null and resumes.resumesAge!=''">
|
|
|
- and r.resumes_age =#{resumes.resumesAge}
|
|
|
- </if>
|
|
|
- <if test="startTime!=null and startTime!='' and startTime!=null and startTime!=''">
|
|
|
- and date_format(r.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
|
|
|
- </if>
|
|
|
- <if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
|
|
|
- and date_format(cr.create_time,'%Y-%m-%d') >= #{startTime}
|
|
|
- </if>
|
|
|
- <if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
|
|
|
- and date_format(r.create_time,'%Y-%m-%d') <= #{endTime}
|
|
|
- </if>
|
|
|
</where>
|
|
|
order by r.update_time desc
|
|
|
</select>
|
|
|
@@ -532,11 +543,21 @@
|
|
|
|
|
|
</select>
|
|
|
<select id="selectResumesByResumesId" resultType="com.sqx.modules.resumes.entity.Resumes">
|
|
|
- select *
|
|
|
+ select
|
|
|
+ r.resumes_id, u.user_name as resumes_name, u.sex as resumes_sex, u.age as resumes_age, r.resumes_phone, e.degree as resumes_education,
|
|
|
+ r.resumes_marriage, i.salary_range as resumes_compensation, r.resumes_email, r.resumes_work_experience,
|
|
|
+ r.resumes_intention, r.resumes_major, i.rule_classify_name as resumes_post, r.adv as resumes_details, r.resumes_image_name,
|
|
|
+ r.resumes_image, r.user_id, r.status, r.update_time, r.create_time, r.audit_content, e.school as school,
|
|
|
+ r.rule_post_name, r.rule_post_id, r.is_recommend, r.city, r.rule_classify_id, r.rule_major, r.address,
|
|
|
+ e.profession as major, r.money, r.industry_id, r.industry_one_id, r.classify_one_id, r. classify_two_id, r.resumes_status,
|
|
|
+ e.end_time as graduation_time, r.industry_name, r.is_show, r.if_exp, r.birthday, r.adv, r.picture, r.resumes_attachment
|
|
|
<if test="userId!=null">
|
|
|
,(select if(count(0)>0,1,0) from my_collection m where m.resumes_id = r.resumes_id and m.user_id = #{userId} and m.type =2 ) as isCollection
|
|
|
</if>
|
|
|
from resumes r
|
|
|
+ left join tb_user u on u.user_id=r.user_id
|
|
|
+ left join edu e on e.user_id = r.user_id and e.end_time = (select max(b.end_time) from edu b where b.user_id = e.user_id)
|
|
|
+ left join intention i on i.user_id = r.user_Id and i.create_time = (select max(o.create_time) from intention o where o.user_id = i.user_id)
|
|
|
where r.resumes_id = #{resumesId}
|
|
|
|
|
|
</select>
|