feat: add recruitment fair statistics dashboard
This commit is contained in:
45
src/services/jobfair/fairStatistics.ts
Normal file
45
src/services/jobfair/fairStatistics.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
const BASE_URL = '/api/cms/fair-statistics';
|
||||
|
||||
export type RecruitmentFairType = 'online' | 'outdoor';
|
||||
|
||||
export interface FairStatisticsFairItem {
|
||||
fairId: string;
|
||||
fairTitle: string;
|
||||
startTime?: string;
|
||||
companyCount: number;
|
||||
jobCount: number;
|
||||
demandCount: number;
|
||||
/** 线上为投递岗位数,户外为签到数。 */
|
||||
interactionCount: number;
|
||||
}
|
||||
|
||||
export interface FairStatisticsSummary {
|
||||
fairType: RecruitmentFairType;
|
||||
fairCount: number;
|
||||
companyCount: number;
|
||||
jobCount: number;
|
||||
demandCount: number;
|
||||
interactionCount: number;
|
||||
fairs: FairStatisticsFairItem[];
|
||||
}
|
||||
|
||||
export interface FairStatisticsSummaryParams {
|
||||
fairType: RecruitmentFairType;
|
||||
/** 传该值时统计一场招聘会。 */
|
||||
fairId?: string;
|
||||
/** 与 fairId 二选一,按招聘会起始时间统计。 */
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
}
|
||||
|
||||
export async function getFairStatisticsSummary(params: FairStatisticsSummaryParams) {
|
||||
return request<{ code: number; msg?: string; data?: FairStatisticsSummary }>(
|
||||
`${BASE_URL}/summary`,
|
||||
{
|
||||
method: 'GET',
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user