岗位表 修改查询相关字段
This commit is contained in:
@@ -2,6 +2,7 @@ package org.jiayunet.pojo.dto.job;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -41,6 +42,15 @@ public class JobDetailDto {
|
||||
/** 要求的行业经验名称 */
|
||||
private String requiredIndustryName;
|
||||
|
||||
/** 发布日期 */
|
||||
private Instant expireAt;
|
||||
|
||||
/** 脚本名字 */
|
||||
private String pyname;
|
||||
|
||||
/** 招聘分类 0=校招 1=实习 2=社招 3=其他 */
|
||||
private Integer recruitCategory;
|
||||
|
||||
// ========== 公司信息 ==========
|
||||
/** 公司ID */
|
||||
private Long companyId;
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.jiayunet.pojo.dto.job;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,6 +55,15 @@ public class JobDto {
|
||||
/** 岗位状态(0=有效 1=已下架 2=已过期) */
|
||||
private Integer status;
|
||||
|
||||
/** 发布日期 */
|
||||
private Instant expireAt;
|
||||
|
||||
/** 脚本名字 */
|
||||
private String pyname;
|
||||
|
||||
/** 招聘分类 0=校招 1=实习 2=社招 3=其他 */
|
||||
private Integer recruitCategory;
|
||||
|
||||
/** 匹配总分(0-100) */
|
||||
private Integer matchScore;
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ public class JobQueryParam extends PageParam {
|
||||
/** 排除岗位ID列表(用于推荐时排除已推荐过的) */
|
||||
private List<Long> excludeJobIds;
|
||||
|
||||
/** 招聘分类 0=校招 1=实习 2=社招 3=其他 */
|
||||
private Integer recruitCategory;
|
||||
|
||||
/** 岗位状态过滤(0=有效 1=已下架 2=已过期,可多选,null或空=查所有) */
|
||||
private List<Integer> statusFilter;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class JobService {
|
||||
List<UserJobDislike> dislikes = userJobDislikeMapper.selectList(new LambdaQueryWrapper<UserJobDislike>().eq(UserJobDislike::getUserId, userId));
|
||||
|
||||
// 3. 提取排除列表
|
||||
List<Long> excludeJobIds = new ArrayList<>(dislikes.stream().map(UserJobDislike::getJobId).filter(Objects::nonNull).distinct().collect(Collectors.toList()));
|
||||
List<Long> excludeJobIds = dislikes.stream().map(UserJobDislike::getJobId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if (param.getExcludeJobIds() != null && !param.getExcludeJobIds().isEmpty()) {
|
||||
excludeJobIds.addAll(param.getExcludeJobIds());
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class JobService {
|
||||
// 6. 执行分页查询
|
||||
Page<JobListItemVo> pageParam = param.toPage();
|
||||
pageParam.setSearchCount(false);
|
||||
Page<JobListItemVo> page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds);
|
||||
Page<JobListItemVo> page = jobMapper.selectJobPage(pageParam, param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds, param.getRecruitCategory());
|
||||
|
||||
// 7. 查询收藏状态
|
||||
List<Long> jobIds = page.getRecords().stream().map(JobListItemVo::getId).collect(Collectors.toList());
|
||||
@@ -292,6 +292,9 @@ public class JobService {
|
||||
dto.setTags(job.getTags());
|
||||
dto.setSkillTags(job.getSkillTags());
|
||||
dto.setSourceUrl(job.getSourceUrl());
|
||||
dto.setExpireAt(job.getExpireAt());
|
||||
dto.setPyname(job.getPyname());
|
||||
dto.setRecruitCategory(job.getRecruitCategory());
|
||||
dto.setCategoryName(categoryName);
|
||||
dto.setRequiredIndustryName(requiredIndustryName);
|
||||
dto.setCompanyId(company.getId());
|
||||
|
||||
@@ -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);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ public class Job {
|
||||
/** 发布日期 */
|
||||
private Instant expireAt;
|
||||
|
||||
/** 脚本名字 */
|
||||
private String pyname;
|
||||
|
||||
/** 状态 0=上架 1=下架 2=已失效 */
|
||||
private Integer status;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.Data;
|
||||
import org.jiayunet.config.LongListTypeHandler;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -73,4 +74,13 @@ public class JobListItemVo {
|
||||
|
||||
/** 岗位状态(0=有效 1=已下架 2=已过期) */
|
||||
private Integer status;
|
||||
|
||||
/** 发布日期 */
|
||||
private Instant expireAt;
|
||||
|
||||
/** 脚本名字 */
|
||||
private String pyname;
|
||||
|
||||
/** 招聘分类 0=校招 1=实习 2=社招 3=其他 */
|
||||
private Integer recruitCategory;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<result column="required_major_ids" property="requiredMajorIds" typeHandler="org.jiayunet.config.LongListTypeHandler"/>
|
||||
<result column="major_sensitivity" property="majorSensitivity"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="expire_at" property="expireAt"/>
|
||||
<result column="pyname" property="pyname"/>
|
||||
<result column="recruit_category" property="recruitCategory"/>
|
||||
<result column="company_id" property="companyId"/>
|
||||
<result column="company_name" property="companyName"/>
|
||||
<result column="company_short_name" property="companyShortName"/>
|
||||
@@ -36,6 +39,9 @@
|
||||
j.required_major_ids,
|
||||
j.major_sensitivity,
|
||||
j.status,
|
||||
j.expire_at,
|
||||
j.pyname,
|
||||
j.recruit_category,
|
||||
c.id AS company_id,
|
||||
c.name AS company_name,
|
||||
c.short_name AS company_short_name,
|
||||
@@ -126,6 +132,10 @@
|
||||
<if test="employmentType != null">
|
||||
AND j.employment_type = #{employmentType}
|
||||
</if>
|
||||
<!-- 筛选条件:招聘分类 -->
|
||||
<if test="recruitCategory != null">
|
||||
AND j.recruit_category = #{recruitCategory}
|
||||
</if>
|
||||
ORDER BY j.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user