加免登录的岗位列表接口
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
package org.jiayunet.controller;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.jiayunet.annotation.FuncPermission;
|
||||||
|
import org.jiayunet.pojo.PageResult;
|
||||||
|
import org.jiayunet.pojo.dto.job.JobAgentRecommendDto;
|
||||||
|
import org.jiayunet.pojo.dto.job.JobApplicationDto;
|
||||||
|
import org.jiayunet.pojo.dto.job.JobDetailDto;
|
||||||
|
import org.jiayunet.pojo.dto.job.JobDto;
|
||||||
|
import org.jiayunet.pojo.param.job.*;
|
||||||
|
import org.jiayunet.pojo.vo.*;
|
||||||
|
import org.jiayunet.service.JobService;
|
||||||
|
import org.jiayunet.tool.UserSecurityTool;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位接口-公开
|
||||||
|
*
|
||||||
|
* @author zk
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/public/job")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Validated
|
||||||
|
public class JobPublicController {
|
||||||
|
|
||||||
|
private final JobService jobService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位列表查询-公开免登录
|
||||||
|
* <p>支持按地区/岗位类型/行业/工作类型筛选,自动排除不感兴趣的岗位/公司/地区/行业,返回匹配度和收藏状态</p>
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
@FuncPermission(value = "job_list", key = "#param.pageNum")
|
||||||
|
public PageResult<JobDto> listJobs(@Validated @RequestBody JobQueryParam param) {
|
||||||
|
|
||||||
|
Long userId = 0L;
|
||||||
|
try {
|
||||||
|
userId = UserSecurityTool.getUserId();
|
||||||
|
}catch (Exception e) {
|
||||||
|
// 接口允许不登录,不处理
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return jobService.listJobs(param, userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user