import request from '/@/utils/request';

/**
 * 获取列表
 * @param query
 */
export const fetchList = (query?: any) => {
	return request({
		url: '/recruit/recruitprestudent/page',
		method: 'get',
		params: query,
	});
};

/**
 * 获取统计列表
 * @param query
 */
export const fetchListStatic = (query?: any) => {
	return request({
		url: '/recruit/recruitprestudent/static',
		method: 'get',
		params: query,
	});
};

/**
 * 新增
 * @param obj
 */
export const addObj = (obj: any) => {
	return request({
		url: '/recruit/recruitprestudent/add',
		method: 'post',
		data: obj,
	});
};

/**
 * 新增学生数据
 * @param obj
 */
export const addObjStu = (obj: any) => {
	return request({
		url: '/recruit/recruitprestudent/add',
		method: 'post',
		data: obj,
	});
};

/**
 * 获取详情
 * @param id
 */
export const getObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitprestudent/getById`,
		method: 'get',
		params:	{id:id}
	});
};

/**
 * 删除
 * @param id
 */
export const delObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitprestudent/deleteById`,
		method: 'post',
		data:{id:id}
	});
};

/**
 * 更新
 * @param obj
 */
export const putObj = (obj: any) => {
	return request({
		url: '/recruit/recruitprestudent/edit',
		method: 'post',
		data: obj,
	});
};

/**
 * 确认登记
 * @param obj
 */
export const sureDJ = (obj: any) => {
	return request({
		url: '/recruit/recruitprestudent/sureDJ',
		method: 'post',
		data: obj,
	});
};
