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

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

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

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

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

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

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