import instance from "@/utils/request";

// 创建岗位
export const createJobApi = params => instance.post("/b/position/add", params);

//更新岗位
export const updateJobApi = params => instance.post("/b/position/update", params);

// 职位列表
export const getJobListApi = params => instance.post("/company/job/list", params);

// 获取推荐简历列表
export const getRecommendedResumeListApi = params => instance.post("/position/resume/recommend/list", params);

// 已投递简历列表
export const getResumeByUserId = userId => instance.post(`/position/resume/detail/${userId}`);

// 更具用户id查询简历
export const getApplicationListApi = params => instance.post("/position/application/list", params);

// 查询职位信息
export const getJobByIdApi = id => instance.post(`/b/position/${id}`);

// 统计职位投递信息
export const getListStatisticsApi = params => instance.post("/b/position/statistics", params);
// 职位列表统计
export const getPositionListApi = params => instance.post("/b/position/list", params);

//获取投递信息通过id
export const getApplicationByIdApi = id => instance.post(`/position/application/${id}`);

//邀请面试
export const inviteInterviewApi = params => instance.post(`/position/application/interview`, params);

//获取投递列表/
// export const getApplicationListApi = params => instance.post("/company/job/getApplicationList", params);

//获取投递列表
// export const getUserResumeApi = params => instance.post(`/company/job/getUserResume`, params);
export const getUserResumeApi = id => instance.post(`/position/resume/detail/${id}`);

// 获取职位详情
export const getUserResumeByApplicationIdApi = id => instance.post(`/position/application/resume/${id}`);

// 职位发布（上线）
export const jobReleaseApi = id => instance.post(`/b/position/release/${id}`);

// 职位下线
export const jobOfflineApi = id => instance.post(`/b/position/offline/${id}`);
// 职位置顶
export const jobOfftopApi = id => instance.post(`/b/position/top/${id}`);
// 职位置顶
export const jobOffuntopApi = id => instance.post(`/b/position/untop/${id}`);

// 拒绝申请
export const rejectApplicationApi = id => instance.post(`/position/application/reject/${id}`);

// 拒绝推荐
export const resumeInappropriateApi = params => instance.post(`/position/resume/inappropriate`, params);
