Merge branch 'main' of http://124.243.245.42:3000/zkr/shz-backend
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()));
|
||||
@@ -690,6 +693,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
if(hasText(jobQuery.getScaleDictCode())){
|
||||
wrapper.and(a->a.eq(ESJobDocument::getScaleDictCode,jobQuery.getScaleDictCode().trim()));
|
||||
}
|
||||
if(hasText(jobQuery.getJobCategory())){
|
||||
wrapper.and(a->a.eq(ESJobDocument::getJobCategory,jobQuery.getJobCategory().trim()));
|
||||
}
|
||||
if(hasText(jobQuery.getIndustry())){
|
||||
wrapper.and(a->a.eq(ESJobDocument::getIndustry,jobQuery.getIndustry().trim()));
|
||||
}
|
||||
@@ -711,7 +717,14 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
if(hasText(jobQuery.getType())){
|
||||
wrapper.and(a->a.eq(ESJobDocument::getType,jobQuery.getType().trim()));
|
||||
}
|
||||
|
||||
//开始时间
|
||||
if(Objects.nonNull(jobQuery.getEndDate())){
|
||||
wrapper.and(x->x.le(ESJobDocument::getPostingDate,jobQuery.getEndDate()));
|
||||
}
|
||||
//截至时间
|
||||
if(Objects.nonNull(jobQuery.getStartDate())){
|
||||
wrapper.and(x->x.ge(ESJobDocument::getPostingDate,jobQuery.getStartDate()));
|
||||
}
|
||||
// 先开启打分、优先按匹配分数排序(关键词前台命中越高越靠前)
|
||||
wrapper.trackScores();
|
||||
wrapper.sortByScore(SortOrder.DESC);
|
||||
|
||||
Reference in New Issue
Block a user