179 lines
4.4 KiB
TypeScript
179 lines
4.4 KiB
TypeScript
import request from '@/utils/request'
|
||
import type { ApiResult } from '@/api/auth'
|
||
|
||
// ==================== 校招公告列表接口 ====================
|
||
|
||
/** Instant 时间结构(Java Instant 序列化格式) */
|
||
export interface InstantTime {
|
||
/** 从 1970-01-01T00:00:00Z 起的秒数 */
|
||
seconds: number
|
||
/** 纳秒偏移(0 ~ 999999999) */
|
||
nanos?: number
|
||
}
|
||
|
||
/** 校招公告列表请求参数 */
|
||
export interface AnnouncementListParams {
|
||
/** 当前页码,从1开始 */
|
||
pageNum?: number
|
||
/** 每页条数 */
|
||
pageSize?: number
|
||
/** 关键字 */
|
||
keyword?: string
|
||
/** 发布时间起(不含) */
|
||
publishTimeStart?: InstantTime | null
|
||
/** 发布时间止(含) */
|
||
publishTimeEnd?: InstantTime | null
|
||
/** 投递截止时间起(不含) */
|
||
applyEndTimeStart?: InstantTime | null
|
||
/** 投递截止时间止(含) */
|
||
applyEndTimeEnd?: InstantTime | null
|
||
/** 公司类型列表 */
|
||
companyTypes?: string[]
|
||
/** 学历要求列表 */
|
||
educationNames?: string[]
|
||
/** 招聘届数列表 */
|
||
recruitYears?: number[]
|
||
/** 批次列表 */
|
||
batchNames?: string[]
|
||
/** 岗位大类列表 */
|
||
categoryNames?: string[]
|
||
/** 热招城市列表 */
|
||
cityNames?: string[]
|
||
/** 行业列表 */
|
||
industryNames?: string[]
|
||
/** 标签列表 */
|
||
tagNames?: string[]
|
||
}
|
||
|
||
/** 校招公告列表项 */
|
||
export interface AnnouncementItem {
|
||
/** 公告ID */
|
||
id: number
|
||
/** 公司ID */
|
||
companyId: number
|
||
/** 公司名称 */
|
||
companyName: string
|
||
/** 公司logo */
|
||
logoUrl: string
|
||
/** 公告标题 */
|
||
title: string
|
||
/** 专业要求 */
|
||
majorRequire: string
|
||
/** 发布时间(毫秒时间戳) */
|
||
publishTime: number | null
|
||
/** 投递结束时间 */
|
||
applyEndTime: InstantTime | null
|
||
/** 投递截止描述 */
|
||
applyEndDesc: string
|
||
/** 行业列表 */
|
||
industryNames: string[]
|
||
/** 岗位大类列表 */
|
||
categoryNames: string[]
|
||
/** 热招城市列表 */
|
||
cityNames: string[]
|
||
/** 学历要求列表 */
|
||
educationNames: string[]
|
||
/** 招聘届数列表 */
|
||
recruitYears: number[]
|
||
/** 批次列表 */
|
||
batchNames: string[]
|
||
}
|
||
|
||
/** 校招公告分页数据 */
|
||
export interface AnnouncementPageData {
|
||
/** 当前页码 */
|
||
pageNum: number
|
||
/** 每页条数 */
|
||
pageSize: number
|
||
/** 总记录数 */
|
||
total: number
|
||
/** 数据列表 */
|
||
list: AnnouncementItem[]
|
||
}
|
||
|
||
/**
|
||
* 获取校招公告分页列表
|
||
* POST /public/recruitAnnouncement/page
|
||
*/
|
||
export function fetchAnnouncementList(params: AnnouncementListParams = {}) {
|
||
return request.post<any, ApiResult<AnnouncementPageData>>('/public/recruitAnnouncement/page', {
|
||
pageNum: params.pageNum ?? 1,
|
||
pageSize: params.pageSize ?? 10,
|
||
...params,
|
||
})
|
||
}
|
||
|
||
// ==================== 校招公告详情接口 ====================
|
||
|
||
/** 校招公告详情数据 */
|
||
export interface AnnouncementDetail {
|
||
/** 公告ID */
|
||
id: number
|
||
/** 公司ID */
|
||
companyId: number
|
||
/** 公司名称 */
|
||
companyName: string
|
||
/** 公司logo */
|
||
logoUrl: string
|
||
/** 公司类型 */
|
||
companyType: string
|
||
/** 公告标题 */
|
||
title: string
|
||
/** 公司简介 */
|
||
companyIntro: string
|
||
/** 面向对象 */
|
||
targetAudience: string
|
||
/** 专业要求 */
|
||
majorRequire: string
|
||
/** 招聘岗位 */
|
||
recruitPosition: string
|
||
/** 备注 */
|
||
remark: string
|
||
/** 是否笔试 */
|
||
writtenExam: string
|
||
/** 投递开始时间 */
|
||
applyStartTime: InstantTime | null
|
||
/** 投递结束时间 */
|
||
applyEndTime: InstantTime | null
|
||
/** 投递截止描述 */
|
||
applyEndDesc: string
|
||
/** 专属内推码 */
|
||
inviteCode: string
|
||
/** 信息来源说明 */
|
||
source: string
|
||
/** 发布时间 */
|
||
publishTime: InstantTime | null
|
||
/** 清洗状态 */
|
||
cleanStatus: number
|
||
/** 状态 */
|
||
status: number
|
||
/** 创建时间 */
|
||
createTime: InstantTime | null
|
||
/** 更新时间 */
|
||
updateTime: InstantTime | null
|
||
/** 行业列表 */
|
||
industryNames: string[]
|
||
/** 岗位大类列表 */
|
||
categoryNames: string[]
|
||
/** 热招城市列表 */
|
||
cityNames: string[]
|
||
/** 学历要求列表 */
|
||
educationNames: string[]
|
||
/** 招聘届数列表 */
|
||
recruitYears: number[]
|
||
/** 批次列表 */
|
||
batchNames: string[]
|
||
/** 标签列表 */
|
||
tagNames: string[]
|
||
}
|
||
|
||
/**
|
||
* 获取校招公告详情
|
||
* GET /public/recruitAnnouncement/detail
|
||
*/
|
||
export function fetchAnnouncementDetail(id: string) {
|
||
return request.get<any, ApiResult<AnnouncementDetail>>('/public/recruitAnnouncement/detail', {
|
||
params: { id },
|
||
})
|
||
}
|