优化岗位列表接口性能
This commit is contained in:
@@ -125,7 +125,9 @@ public class JobService {
|
||||
List<Long> excludeIndustryIds = dislikes.stream().map(UserJobDislike::getIndustryId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
|
||||
// 6. 执行分页查询
|
||||
Page<JobListItemVo> page = jobMapper.selectJobPage(param.toPage(), param.getJobIds(),param.getStatusFilter(), param.getKeyword(), expandedRegionCodes, expandedCategoryIds, expandedIndustryIds, param.getEmploymentType(), excludeJobIds, excludeCompanyIds, excludeRegionCodes, excludeIndustryIds);
|
||||
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);
|
||||
|
||||
// 7. 查询收藏状态
|
||||
List<Long> jobIds = page.getRecords().stream().map(JobListItemVo::getId).collect(Collectors.toList());
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<if test="employmentType != null">
|
||||
AND j.employment_type = #{employmentType}
|
||||
</if>
|
||||
ORDER BY j.create_time DESC
|
||||
ORDER BY j.id DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user