app/job/list添加查询条件,岗位分类,开始时间,截至时间
This commit is contained in:
@@ -693,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()));
|
||||
}
|
||||
@@ -714,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