From 495692066e1391977f3d51ab10f40b80fc42bfb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=A1=BA=E4=B8=9C?= <577732344@qq.com> Date: Wed, 14 Jan 2026 11:10:03 +0800 Subject: [PATCH] =?UTF-8?q?bugfix-=E4=BC=81=E4=B8=9A=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/cms/service/impl/ESJobSearchImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 9c8f49f..b5d7435 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 @@ -491,11 +491,13 @@ public class ESJobSearchImpl implements IESJobSearchService Integer maxValue = StringUtil.findMaxValue(esJobSearch.getEducation()); wrapper.and(x->x.eq(ESJobDocument::getEducation_int,maxValue)); } - if(Objects.nonNull(esJobSearch.getMaxSalary())){ - wrapper.and(x->x.le(ESJobDocument::getMaxSalary,esJobSearch.getMaxSalary())); - } + // 用户传入最小薪资:查询岗位最大薪资 >= 用户最小薪资(岗位薪资上限至少要达到用户期望) if(Objects.nonNull(esJobSearch.getMinSalary())){ - wrapper.and(x->x.ge(ESJobDocument::getMinSalary,esJobSearch.getMinSalary())); + wrapper.and(x->x.ge(ESJobDocument::getMaxSalary,esJobSearch.getMinSalary())); + } + // 用户传入最大薪资:查询岗位最小薪资 <= 用户最大薪资(岗位薪资下限不能超过用户预算) + if(Objects.nonNull(esJobSearch.getMaxSalary())){ + wrapper.and(x->x.le(ESJobDocument::getMinSalary,esJobSearch.getMaxSalary())); } if(!StringUtil.isEmptyOrNull(esJobSearch.getExperience())){ Integer maxValue = StringUtil.findMaxValue(esJobSearch.getExperience());