投诉功能开发
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:
95
src/services/cms/jobComplaint.ts
Normal file
95
src/services/cms/jobComplaint.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
/** 投诉列表查询参数 */
|
||||
export interface JobComplaintListParams {
|
||||
pageSize?: number;
|
||||
currentPage?: number;
|
||||
complaintType?: string;
|
||||
complaintStatus?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/** 投诉记录 */
|
||||
export interface JobComplaint {
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
id: number;
|
||||
userId: number;
|
||||
jobId: number;
|
||||
complaintType: number;
|
||||
complaintContent: string;
|
||||
evidenceUrl: string;
|
||||
contactPhone: string;
|
||||
complaintStatus: number;
|
||||
handleUserId: number | null;
|
||||
handleContent: string;
|
||||
handleTime: string | null;
|
||||
companyId: number;
|
||||
companyName: string;
|
||||
jobTitle: string;
|
||||
name: string;
|
||||
/** 岗位状态:0=上架,1=下架 */
|
||||
jobStatus?: number;
|
||||
/** 企业状态:0=上架,1=下架 */
|
||||
companyStatus?: number;
|
||||
}
|
||||
|
||||
/** 投诉列表分页结果 */
|
||||
export interface JobComplaintPageResult {
|
||||
total: number;
|
||||
rows: JobComplaint[];
|
||||
code: number;
|
||||
msg: string;
|
||||
data: null;
|
||||
}
|
||||
|
||||
/** 查询投诉列表(管理端) */
|
||||
export async function getJobComplaintList(params?: JobComplaintListParams) {
|
||||
return request<JobComplaintPageResult>('/api/cms/jobComplaint/list', {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 岗位上架 */
|
||||
export async function jobUp(jobId: number) {
|
||||
return request<API.Result>(`/api/cms/job/jobUp/${jobId}`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
|
||||
/** 岗位下架 */
|
||||
export async function jobDown(jobId: number) {
|
||||
return request<API.Result>(`/api/cms/job/jobDown/${jobId}`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
|
||||
/** 企业上架 */
|
||||
export async function companyUp(companyId: number) {
|
||||
return request<API.Result>(`/api/cms/company/companyUp/${companyId}`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
|
||||
/** 企业下架 */
|
||||
export async function companyDown(companyId: number) {
|
||||
return request<API.Result>(`/api/cms/company/companyDown/${companyId}`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询我的投诉列表(求职者端) */
|
||||
export async function getMyComplaintList(params?: JobComplaintListParams) {
|
||||
return request<JobComplaintPageResult>('/api/cms/jobComplaint/listSelf', {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤销投诉 */
|
||||
export async function deleteComplaint(ids: number | string) {
|
||||
return request<API.Result>(`/api/cms/jobComplaint/${ids}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user