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

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

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

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

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

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

/**
 * 单字段快速更新
 * @param obj
 */
export const editQuickField = (obj: any) => {
	return request({
		url: '/recruit/recruitstudentplan/editQuickField',
		method: 'post',
		data: obj,
	});
};



/**
 * 按教育程度列表
 * @param query
 */
export const listByEdu = (query?: any) => {
	return request({
		url: '/recruit/recruitstudentplan/listByEdu',
		method: 'get',
		params: query,
	});
};

/**
 * 按学历列表	初中
 * @param query
 */
export const listcz = (query?: any) => {
	return request({
		url: '/recruit/recruitstudentplan/listcz',
		method: 'get',
		params: query,
	});
};

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