diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java index 08aebc7..abdb71e 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java @@ -584,6 +584,9 @@ public class ESJobSearchImpl implements IESJobSearchService if(esJobSearch.getOrder()==3){ wrapper.orderByDesc(ESJobDocument::getMaxSalary); } + }else{ + //默认按照发布时间倒叙 + wrapper.orderByDesc(ESJobDocument::getPostingDate); } //企业用户排除es去除jobIds boolean isCompanyUser = StringUtil.IS_COMPANY_USER.equals(esJobSearch.getUserType()); @@ -700,6 +703,9 @@ public class ESJobSearchImpl implements IESJobSearchService wrapper.orderByDesc(ESJobDocument::getApplyNum); wrapper.orderByDesc(ESJobDocument::getView); } + }else{ + //默认按照发布时间倒叙 + wrapper.orderByDesc(ESJobDocument::getPostingDate); } EsPageInfo esJobDocumentEsPageInfo = esJobDocumentMapper.pageQuery(wrapper, pageNum, pageSize); return esJobDocumentEsPageInfo;