添加es中岗位联系方式
This commit is contained in:
@@ -161,6 +161,10 @@ public class ESJobDocument
|
||||
@IndexField(fieldType = FieldType.TEXT)
|
||||
private String companyVoJson;
|
||||
|
||||
@ApiModelProperty("岗位联系人信息")
|
||||
@IndexField(fieldType = FieldType.TEXT)
|
||||
private String jobContactVoJson;
|
||||
|
||||
@ApiModelProperty("是否发布 0未发布 1发布")
|
||||
private Integer isPublish;
|
||||
}
|
||||
|
||||
@@ -188,8 +188,11 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
esJobDocument.setJobCategory(resolveJobCategoryLabel(job.getJobCategory()));
|
||||
//类型转换导致赋值问题,重新赋值
|
||||
esJobDocument.setScale(org.apache.commons.lang3.StringUtils.isNotEmpty(job.getScale()) ? Integer.parseInt(job.getScale()) : 0);
|
||||
//企业信息
|
||||
CompanyVo vo=job.getCompanyVo();
|
||||
esJobDocument.setCompanyVoJson(JSON.toJSONString(vo));
|
||||
//岗位联系人
|
||||
esJobDocument.setJobContactVoJson(JSON.toJSONString(job.getJobContactList()));
|
||||
esJobDocument.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ job.getJobId());
|
||||
if(!StringUtil.isEmptyOrNull(job.getScale())){
|
||||
esJobDocument.setScale(Integer.valueOf(job.getScale()));
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<result property="reviewStatus" column="review_status" />
|
||||
|
||||
<association property="companyVo" resultMap="CompanyResult"/>
|
||||
<association property="jobContactList" resultMap="JomContactResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.cms.domain.vo.CompanyVo" id="CompanyResult">
|
||||
@@ -100,6 +101,11 @@
|
||||
<result property="contactPersonPhone" column="contact_person_phone"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.cms.domain.JobContact" id="JomContactResult">
|
||||
<result property="contactPerson" column="job_contact_person"/>
|
||||
<result property="contactPersonPhone" column="job_contact_person_phone"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectJobVo">
|
||||
select job_id, job_title, min_salary, max_salary, education, experience, company_name, job_location, posting_date, vacancies, del_flag, create_by, create_time, update_by, update_time, remark, latitude, longitude, "view", company_id , is_hot ,is_urgent,apply_num,is_publish, description,job_location_area_code,data_source,job_url,job_category,is_explain,explain_url,cover,job_type,job_address, review_status from job
|
||||
</sql>
|
||||
@@ -285,10 +291,11 @@
|
||||
)
|
||||
</select>
|
||||
<select id="selectAllJob" resultMap="JobEsResult">
|
||||
SELECT j.*,c.industry,c.scale,c.nature as company_nature,c.code,c.description as company_description,c.name,c.company_id,t.contact_person,t.contact_person_phone FROM job as j
|
||||
SELECT j.*,c.industry,c.scale,c.nature as company_nature,c.code,c.description as company_description,c.name,c.company_id,t.contact_person,t.contact_person_phone,jc.contact_person as job_contact_person,jc.contact_person_phone as job_contact_person_phone FROM job as j
|
||||
left join company as c on c.company_id = j.company_id and j.del_flag='0' and c.del_flag='0'
|
||||
LEFT JOIN (SELECT t1.*, ROW_NUMBER() OVER (PARTITION BY t1.company_id ORDER BY t1.id) AS rn FROM company_contact AS t1 WHERE t1.del_flag = '0' ) AS t
|
||||
ON t.company_id = j.company_id AND t.rn = 1 WHERE j.del_flag = '0' AND c.del_flag = '0' limit #{offset},#{batchSize}
|
||||
LEFT JOIN (SELECT t1.*, ROW_NUMBER() OVER (PARTITION BY t1.company_id ORDER BY t1.id) AS rn FROM company_contact AS t1 WHERE t1.del_flag = '0' ) AS t ON t.company_id = j.company_id AND t.rn = 1
|
||||
LEFT JOIN (SELECT jc1.*, ROW_NUMBER() OVER(PARTITION BY jc1.job_id ORDER BY jc1.id) rn FROM job_contact jc1 WHERE jc1.del_flag='0') jc ON jc.job_id = j.job_id AND jc.rn=1
|
||||
WHERE j.del_flag = '0' limit #{offset},#{batchSize}
|
||||
</select>
|
||||
<select id="selectAllInsertRowWork" resultType="com.ruoyi.cms.domain.RowWork">
|
||||
select Id, TaskId, TaskName, Std_class, SF, ZCMC, Aca112, Acb22a, Aac011, Acb240,
|
||||
|
||||
Reference in New Issue
Block a user