修改竞争力分析-添加area判断为空的情况

This commit is contained in:
sh
2025-12-08 16:25:12 +08:00
parent fe9c72ff6c
commit b61f280567

View File

@@ -262,9 +262,11 @@ public class JobCollectionServiceImpl extends ServiceImpl<JobCollectionMapper,Jo
}
// 4. 地点匹配
if (user.getArea() != null && user.getArea().contains(jobLocation) || jobLocation.contains(user.getArea())) {
if (user.getArea() != null) {
if(user.getArea().contains(jobLocation) || jobLocation.contains(user.getArea())){
matchScore += 1;
}
}
// 5. 年龄估算(从生日计算)
int userAge = getUserAge(DateUtils.stringToDateWithYmd(user.getBirthDate(),DateUtils.YYYY_MM_DD));