From 9ce99ab3d7a9fff38eacdf675f0311a251931812 Mon Sep 17 00:00:00 2001 From: zk Date: Wed, 5 Aug 2026 11:08:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=20=E5=92=8C=20=E6=95=99=E8=82=B2?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jiayunet/pojo/param/job/JobQueryParam.java | 10 ++++++++++ .../java/org/jiayunet/service/JobService.java | 2 +- .../main/java/org/jiayunet/mapper/JobMapper.java | 3 ++- manager/src/main/resources/mapper/JobMapper.xml | 15 +++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/client-api/src/main/java/org/jiayunet/pojo/param/job/JobQueryParam.java b/client-api/src/main/java/org/jiayunet/pojo/param/job/JobQueryParam.java index dbc846a..3c40c2f 100644 --- a/client-api/src/main/java/org/jiayunet/pojo/param/job/JobQueryParam.java +++ b/client-api/src/main/java/org/jiayunet/pojo/param/job/JobQueryParam.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.jiayunet.pojo.PageParam; +import java.time.Instant; import java.util.List; /** @@ -44,4 +45,13 @@ public class JobQueryParam extends PageParam { /** 公司ID */ private Long companyId; + + /** 学历要求列表 0=不限 1=大专 2=本科 3=硕士 4=博士(可多选,null或空=不限制) */ + private List educations; + + /** 发布开始时间(对应 bg_job.expire_at,闭区间) */ + private Instant publishStartTime; + + /** 发布截止时间(对应 bg_job.expire_at,闭区间) */ + private Instant publishEndTime; } diff --git a/client-api/src/main/java/org/jiayunet/service/JobService.java b/client-api/src/main/java/org/jiayunet/service/JobService.java index 8a90902..1432311 100644 --- a/client-api/src/main/java/org/jiayunet/service/JobService.java +++ b/client-api/src/main/java/org/jiayunet/service/JobService.java @@ -127,7 +127,7 @@ public class JobService { // 6. 执行分页查询 Page pageParam = param.toPage(); pageParam.setSearchCount(false); - Page page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds, param.getRecruitCategory(), param.getCompanyTypes(), param.getCompanyId()); + Page page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds, param.getRecruitCategory(), param.getCompanyTypes(), param.getCompanyId(), param.getEducations(), param.getPublishStartTime(), param.getPublishEndTime()); // 7. 查询收藏状态 List jobIds = page.getRecords().stream().map(JobListItemVo::getId).collect(Collectors.toList()); diff --git a/manager/src/main/java/org/jiayunet/mapper/JobMapper.java b/manager/src/main/java/org/jiayunet/mapper/JobMapper.java index c89adf5..b4a5616 100644 --- a/manager/src/main/java/org/jiayunet/mapper/JobMapper.java +++ b/manager/src/main/java/org/jiayunet/mapper/JobMapper.java @@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param; import org.jiayunet.pojo.po.Job; import org.jiayunet.pojo.vo.JobListItemVo; +import java.time.Instant; import java.util.List; /** @@ -19,5 +20,5 @@ public interface JobMapper extends CommonMapper { /** * 分页查询岗位列表 */ - Page selectJobPage(Page page, @Param("jobIds") List jobIds, @Param("statusFilter") List statusFilter, @Param("keyword") String keyword, @Param("regionCodes") List regionCodes, @Param("categoryIds") List categoryIds, @Param("industryIds") List industryIds, @Param("employmentType") Integer employmentType, @Param("excludeJobIds") List excludeJobIds, @Param("excludeCompanyIds") List excludeCompanyIds, @Param("excludeRegionCodes") List excludeRegionCodes, @Param("excludeIndustryIds") List excludeIndustryIds, @Param("recruitCategory") Integer recruitCategory, @Param("companyTypes") List companyTypes, @Param("companyId") Long companyId); + Page selectJobPage(Page page, @Param("jobIds") List jobIds, @Param("statusFilter") List statusFilter, @Param("keyword") String keyword, @Param("regionCodes") List regionCodes, @Param("categoryIds") List categoryIds, @Param("industryIds") List industryIds, @Param("employmentType") Integer employmentType, @Param("excludeJobIds") List excludeJobIds, @Param("excludeCompanyIds") List excludeCompanyIds, @Param("excludeRegionCodes") List excludeRegionCodes, @Param("excludeIndustryIds") List excludeIndustryIds, @Param("recruitCategory") Integer recruitCategory, @Param("companyTypes") List companyTypes, @Param("companyId") Long companyId, @Param("educations") List educations, @Param("publishStartTime") Instant publishStartTime, @Param("publishEndTime") Instant publishEndTime); } diff --git a/manager/src/main/resources/mapper/JobMapper.xml b/manager/src/main/resources/mapper/JobMapper.xml index b9e9cbf..7697f88 100644 --- a/manager/src/main/resources/mapper/JobMapper.xml +++ b/manager/src/main/resources/mapper/JobMapper.xml @@ -153,6 +153,21 @@ AND j.company_id = #{companyId} + + + AND j.education IN + + #{education} + + + + + AND j.expire_at >= #{publishStartTime} + + + + AND j.expire_at <= #{publishEndTime} + ORDER BY j.id DESC