From ecaedff902ab48e519d043347dd4557858364a3e Mon Sep 17 00:00:00 2001 From: chenshaohua <635616957@qq.com> Date: Mon, 1 Jun 2026 12:44:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9es=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 8a60191..65eadbd 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 @@ -560,12 +560,10 @@ public class ESJobSearchImpl implements IESJobSearchService wrapper.and(x->x.like(ESJobDocument::getJobLocation,esJobSearch.getJobLocation())); } if(Objects.nonNull(esJobSearch.getOrder())){ + wrapper.orderByDesc(ESJobDocument::getPostingDate); if(esJobSearch.getOrder()==1){ wrapper.orderByDesc(ESJobDocument::getIsHot); } - if(esJobSearch.getOrder()==2){ - wrapper.orderByDesc(ESJobDocument::getPostingDate); - } if(esJobSearch.getOrder()==3){ wrapper.orderByDesc(ESJobDocument::getMaxSalary); } @@ -640,9 +638,7 @@ public class ESJobSearchImpl implements IESJobSearchService wrapper.and(a->a.eq(ESJobDocument::getType,jobQuery.getType().trim())); } if(Objects.nonNull(jobQuery.getOrder())){ - if (jobQuery.getOrder()==2){ - wrapper.orderByDesc(ESJobDocument::getPostingDate); - } + wrapper.orderByDesc(ESJobDocument::getPostingDate); if (jobQuery.getOrder()==1){ wrapper.orderByDesc(ESJobDocument::getIsHot); wrapper.orderByDesc(ESJobDocument::getApplyNum);