岗位列表 添加公司类型查询

This commit is contained in:
zk
2026-07-17 15:01:33 +08:00
parent 7601f9c5a5
commit 7c21c82dba
4 changed files with 12 additions and 2 deletions
@@ -24,6 +24,9 @@ public class JobQueryParam extends PageParam {
/** 行业ID列表 */ /** 行业ID列表 */
private List<Long> industryIds; private List<Long> industryIds;
/** 公司类型列表(上市企业、独角兽、国企等,可多选) */
private List<String> companyTypes;
/** 工作类型 0=全职 1=兼职 */ /** 工作类型 0=全职 1=兼职 */
private Integer employmentType; private Integer employmentType;
@@ -127,7 +127,7 @@ public class JobService {
// 6. 执行分页查询 // 6. 执行分页查询
Page<JobListItemVo> pageParam = param.toPage(); Page<JobListItemVo> pageParam = param.toPage();
pageParam.setSearchCount(false); pageParam.setSearchCount(false);
Page<JobListItemVo> page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds, param.getRecruitCategory()); Page<JobListItemVo> page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds, param.getRecruitCategory(), param.getCompanyTypes());
// 7. 查询收藏状态 // 7. 查询收藏状态
List<Long> jobIds = page.getRecords().stream().map(JobListItemVo::getId).collect(Collectors.toList()); List<Long> jobIds = page.getRecords().stream().map(JobListItemVo::getId).collect(Collectors.toList());
@@ -19,5 +19,5 @@ public interface JobMapper extends CommonMapper<Job> {
/** /**
* 分页查询岗位列表 * 分页查询岗位列表
*/ */
Page<JobListItemVo> selectJobPage(Page<JobListItemVo> page, @Param("jobIds") List<Long> jobIds, @Param("statusFilter") List<Integer> statusFilter, @Param("keyword") String keyword, @Param("regionCodes") List<String> regionCodes, @Param("categoryIds") List<Long> categoryIds, @Param("industryIds") List<Long> industryIds, @Param("employmentType") Integer employmentType, @Param("excludeJobIds") List<Long> excludeJobIds, @Param("excludeCompanyIds") List<Long> excludeCompanyIds, @Param("excludeRegionCodes") List<String> excludeRegionCodes, @Param("excludeIndustryIds") List<Long> excludeIndustryIds, @Param("recruitCategory") Integer recruitCategory); Page<JobListItemVo> selectJobPage(Page<JobListItemVo> page, @Param("jobIds") List<Long> jobIds, @Param("statusFilter") List<Integer> statusFilter, @Param("keyword") String keyword, @Param("regionCodes") List<String> regionCodes, @Param("categoryIds") List<Long> categoryIds, @Param("industryIds") List<Long> industryIds, @Param("employmentType") Integer employmentType, @Param("excludeJobIds") List<Long> excludeJobIds, @Param("excludeCompanyIds") List<Long> excludeCompanyIds, @Param("excludeRegionCodes") List<String> excludeRegionCodes, @Param("excludeIndustryIds") List<Long> excludeIndustryIds, @Param("recruitCategory") Integer recruitCategory, @Param("companyTypes") List<String> companyTypes);
} }
@@ -142,6 +142,13 @@
<if test="recruitCategory != null"> <if test="recruitCategory != null">
AND j.recruit_category = #{recruitCategory} AND j.recruit_category = #{recruitCategory}
</if> </if>
<!-- 筛选条件:公司类型(可多选) -->
<if test="companyTypes != null and companyTypes.size() > 0">
AND c.company_type IN
<foreach collection="companyTypes" item="type" open="(" separator="," close=")">
#{type}
</foreach>
</if>
ORDER BY j.id DESC ORDER BY j.id DESC
</select> </select>