修改es查询按照发布时间倒叙
This commit is contained in:
@@ -563,6 +563,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
|||||||
if(esJobSearch.getOrder()==3){
|
if(esJobSearch.getOrder()==3){
|
||||||
wrapper.orderByDesc(ESJobDocument::getMaxSalary);
|
wrapper.orderByDesc(ESJobDocument::getMaxSalary);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
//默认按照发布时间倒叙
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getPostingDate);
|
||||||
}
|
}
|
||||||
//企业用户排除es去除jobIds
|
//企业用户排除es去除jobIds
|
||||||
boolean isCompanyUser = StringUtil.IS_COMPANY_USER.equals(esJobSearch.getUserType());
|
boolean isCompanyUser = StringUtil.IS_COMPANY_USER.equals(esJobSearch.getUserType());
|
||||||
@@ -639,6 +642,9 @@ public class ESJobSearchImpl implements IESJobSearchService
|
|||||||
wrapper.orderByDesc(ESJobDocument::getApplyNum);
|
wrapper.orderByDesc(ESJobDocument::getApplyNum);
|
||||||
wrapper.orderByDesc(ESJobDocument::getView);
|
wrapper.orderByDesc(ESJobDocument::getView);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
//默认按照发布时间倒叙
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getPostingDate);
|
||||||
}
|
}
|
||||||
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = esJobDocumentMapper.pageQuery(wrapper, pageNum, pageSize);
|
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = esJobDocumentMapper.pageQuery(wrapper, pageNum, pageSize);
|
||||||
return esJobDocumentEsPageInfo;
|
return esJobDocumentEsPageInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user