|
|
@@ -70,19 +70,28 @@
|
|
|
</select>
|
|
|
<select id="selectResumesListHr" resultType="com.sqx.modules.resumes.entity.ResumesListDto">
|
|
|
SELECT
|
|
|
- u.user_id,
|
|
|
- u.user_name,
|
|
|
- last_work.type AS work_type,
|
|
|
- last_work.company_name,
|
|
|
- last_work.skills,
|
|
|
- last_work.work_content,
|
|
|
- e.school,
|
|
|
- e.degree,
|
|
|
- e.profession,
|
|
|
- intent.rule_classify_name AS expected_position,
|
|
|
- intent.salary_range AS expected_range
|
|
|
+ u.user_name AS userName,
|
|
|
+ last_work.type AS workType,
|
|
|
+ last_work.company_name AS companyName,
|
|
|
+ last_work.skills AS skills,
|
|
|
+ last_work.start_time As lastWorkStartTime,
|
|
|
+ last_work.end_time AS lastWorkEndTime,
|
|
|
+ last_work.work_content AS workContent,
|
|
|
+ e.school AS school,
|
|
|
+ e.degree AS degree,
|
|
|
+ intent.all_expected_positions AS expectedPositions,
|
|
|
+ intent.all_expected_cities AS expectedCity,
|
|
|
+ intent.min_salary AS minSalary,
|
|
|
+ intent.max_salary AS maxSalary,
|
|
|
+ resumes.status AS resumesStatus,
|
|
|
+ resumes.resumes_education AS resumesEducation,
|
|
|
+ resumes.resumes_work_experience AS resumesWorkExperience,
|
|
|
+ resumes.resumes_id AS resumesId
|
|
|
FROM
|
|
|
tb_user u
|
|
|
+ INNER JOIN resumes
|
|
|
+ ON u.user_id = resumes.user_id
|
|
|
+ AND resumes.`status` = 1 -- 简历状态为1(按实际业务含义)
|
|
|
INNER JOIN (
|
|
|
SELECT
|
|
|
edu.*,
|
|
|
@@ -101,34 +110,18 @@
|
|
|
INNER JOIN work_exp_detail wed ON we.work_exp_id = wed.work_exp_id
|
|
|
WHERE we.is_use = 1
|
|
|
) last_work ON u.user_id = last_work.user_id AND last_work.work_rn = 1
|
|
|
+
|
|
|
INNER JOIN (
|
|
|
SELECT
|
|
|
- intent.*,
|
|
|
- ROW_NUMBER() OVER (
|
|
|
- PARTITION BY intent.user_id
|
|
|
- ORDER BY intent.is_default DESC, intent.create_time DESC
|
|
|
- ) AS intent_rn
|
|
|
- FROM intention intent
|
|
|
- ) intent ON u.user_id = intent.user_id AND intent.intent_rn = 1
|
|
|
- <where>
|
|
|
-
|
|
|
- <if test="userName != null and userName != ''">
|
|
|
- AND u.user_name LIKE CONCAT('%', #{userName}, '%')
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="workType != null and workType != ''">
|
|
|
- AND last_work.type = #{workType}
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="degree != null and degree != ''">
|
|
|
- AND e.school LIKE CONCAT('%', #{school}, '%')
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="expectedPosition != null and expectedPosition != ''">
|
|
|
- AND intent.rule_classify_name LIKE CONCAT('%', #{expectedPosition}, '%')
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- ORDER BY u.user_id DESC
|
|
|
+ user_id,
|
|
|
+ GROUP_CONCAT(DISTINCT rule_classify_name SEPARATOR ',') AS all_expected_positions,
|
|
|
+ GROUP_CONCAT(DISTINCT citys SEPARATOR ',') AS all_expected_cities,
|
|
|
+ MIN(min_salary) AS min_salary,
|
|
|
+ MAX(max_salary) AS max_salary
|
|
|
+ FROM intention
|
|
|
+ WHERE is_default = 1
|
|
|
+ GROUP BY user_id
|
|
|
+ ) intent ON u.user_id = intent.user_id;
|
|
|
</select>
|
|
|
<select id="selectResumesListByCompany" resultType="com.sqx.modules.resumes.entity.Resumes">
|
|
|
SELECT
|