From 4feffc1c48d8518951d50a869b11d3d3d3bbe154 Mon Sep 17 00:00:00 2001 From: sh Date: Fri, 12 Jun 2026 16:40:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=9E=E4=BA=89=E5=8A=9B?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/JobCollectionServiceImpl.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/JobCollectionServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/JobCollectionServiceImpl.java index 1f6fbe5..5229e6c 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/JobCollectionServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/JobCollectionServiceImpl.java @@ -354,13 +354,31 @@ public class JobCollectionServiceImpl extends ServiceImpl jobMaxSalary)) { + if (jobMinSalary == null) { + matchScore += 1.0; + } else { + double salaryThreshold = jobMinSalary * 0.8; + if (userMinSalary >= jobMinSalary) { + matchScore += 1.0; + } else if (userMinSalary >= salaryThreshold) { + matchScore += 0.5; + } + } + } + } + /*if (userMinSalary != null && userMinSalary <= job.getMaxSalary()) { if (userMinSalary >= job.getMinSalary()) { matchScore += 1; } else if (userMinSalary >= job.getMinSalary() * 0.8) { matchScore += 0.5; } - } + }*/ //判断区域 if (user.getArea() != null && job.getJobLocationAreaCode() != null) { //if(user.getArea().contains(job.getJobLocation()) || job.getJobLocation().contains(user.getArea())){