From ec7a61f2866fa62a6bc09b0dad9341ad0c6f120a Mon Sep 17 00:00:00 2001 From: sh Date: Fri, 8 May 2026 19:11:03 +0800 Subject: [PATCH] =?UTF-8?q?es=E6=9F=A5=E8=AF=A2=E6=97=B6=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=B2=A1=E6=9C=89=E6=8E=92=E5=BA=8F=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=8C=89=E7=85=A7=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=80=92=E5=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) 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;