From ab53668f58fe9cfa3344b57bdef640d5fead353d Mon Sep 17 00:00:00 2001 From: chenshaohua <635616957@qq.com> Date: Mon, 1 Jun 2026 10:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9es=E6=9F=A5=E8=AF=A2=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E5=8F=91=E5=B8=83=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 92b81c2..8aa4f09 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 @@ -563,6 +563,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()); @@ -639,6 +642,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;