招聘会
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
109
src/services/jobfair/publicJobFair.ts
Normal file
109
src/services/jobfair/publicJobFair.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
const BASE_URL = '/api/cms/publicJobFair';
|
||||
|
||||
/** 查询招聘会列表 */
|
||||
export async function getPublicJobFairList(params?: API.PublicJobFair.ListParams) {
|
||||
return request<API.PublicJobFair.ListResult>(`${BASE_URL}/list`, {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取招聘会详情 */
|
||||
export async function getPublicJobFairDetail(jobFairId: string) {
|
||||
return request<API.PublicJobFair.DetailResult>(`${BASE_URL}/${jobFairId}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/** 新增招聘会 */
|
||||
export async function addPublicJobFair(data: API.PublicJobFair.JobFairForm) {
|
||||
return request<API.PublicJobFair.CommonResult>(BASE_URL, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改招聘会 */
|
||||
export async function updatePublicJobFair(data: API.PublicJobFair.JobFairForm) {
|
||||
return request<API.PublicJobFair.CommonResult>(BASE_URL, {
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除招聘会 */
|
||||
export async function deletePublicJobFair(jobFairIds: string) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/${jobFairIds}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加企业到招聘会 */
|
||||
export async function addCompanyToJobFair(data: API.PublicJobFair.AddCompanyParams) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/company`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 批量添加企业到招聘会 */
|
||||
export async function batchAddCompanyToJobFair(data: API.PublicJobFair.AddCompanyParams[]) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/company/batch`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 移除招聘会企业 */
|
||||
export async function removeCompanyFromJobFair(id: string) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/company/${id}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加岗位到招聘会 */
|
||||
export async function addJobToJobFair(data: API.PublicJobFair.AddJobParams) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/job`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量添加岗位到招聘会 */
|
||||
export async function batchAddJobToJobFair(data: API.PublicJobFair.AddJobParams[]) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/job/batch`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 移除招聘会岗位 */
|
||||
export async function removeJobFromJobFair(id: string) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/job/${id}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询招聘会报名列表 */
|
||||
export async function getJobFairSignups(jobFairId: string, params?: { userName?: string; status?: string }) {
|
||||
return request<API.PublicJobFair.SignupListResult>(`${BASE_URL}/signups/${jobFairId}`, {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询招聘会企业及岗位 */
|
||||
export async function getJobFairCompanies(jobFairId: string) {
|
||||
return request<API.PublicJobFair.CommonResult>(`${BASE_URL}/companies/${jobFairId}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出招聘会 */
|
||||
export async function exportPublicJobFair(params?: API.PublicJobFair.ListParams) {
|
||||
return downLoadXlsx(`${BASE_URL}/export`, { params }, `job_fair_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
Reference in New Issue
Block a user