// @ts-ignore
/* eslint-disable */
import request from '../request';

/** 创建经销商表 POST /operation/createDealer */
export async function createDealer(
	body: BusinessAPI.DealerCreateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/createDealer',
		{
			method: 'POST',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 经销商表删除 DELETE /operation/destroyDealer */
export async function destroyDealer(
	body: BusinessAPI.DealerDestroyCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/destroyDealer', {
		method: 'DELETE',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 经销商表拖拽排序 PUT /operation/dragDealer */
export async function dragDealer(
	body: BusinessAPI.DealerDragCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/dragDealer', {
		method: 'PUT',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 经销商表拖拽排序 PATCH /operation/dragDealer */
export async function dragDealer1(
	body: BusinessAPI.DealerDragCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/dragDealer', {
		method: 'PATCH',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 经销商表列表 GET /operation/listDealer */
export async function listDealer(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.listDealerParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.MultiResponseDealerVO>('/operation/listDealer', {
		method: 'GET',
		params: {
			...params,
			dealerListQry: undefined,
			...params['dealerListQry'],
		},
		...(options || {}),
	});
}

/** 经销商表列表 GET /operation/pageDealer */
export async function pageDealer(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.pageDealerParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.PageResponseDealerVO>('/operation/pageDealer', {
		method: 'GET',
		params: {
			...params,
			dealerPageQry: undefined,
			...params['dealerPageQry'],
		},
		...(options || {}),
	});
}

/** 经销商表详情 GET /operation/showDealer */
export async function showDealer(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.showDealerParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/showDealer',
		{
			method: 'GET',
			params: {
				...params,
				dealerShowQry: undefined,
				...params['dealerShowQry'],
			},
			...(options || {}),
		},
	);
}

/** 经销商表更新 PUT /operation/updateDealer */
export async function updateDealer(
	body: BusinessAPI.DealerUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealer',
		{
			method: 'PUT',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 经销商表更新 PATCH /operation/updateDealer */
export async function updateDealer1(
	body: BusinessAPI.DealerUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealer',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 更新经销商设置 PUT /operation/updateDealerSettings */
export async function updateDealerSettings(
	body: BusinessAPI.DealerUpdateSettingsCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealerSettings',
		{
			method: 'PUT',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 更新经销商设置 PATCH /operation/updateDealerSettings */
export async function updateDealerSettings1(
	body: BusinessAPI.DealerUpdateSettingsCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealerSettings',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 更新经销商发货单模板 PUT /operation/updateDealerTemplate */
export async function updateDealerTemplate(
	body: BusinessAPI.DealerUpdateTemplateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealerTemplate',
		{
			method: 'PUT',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 更新经销商发货单模板 PATCH /operation/updateDealerTemplate */
export async function updateDealerTemplate1(
	body: BusinessAPI.DealerUpdateTemplateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDealerVO>(
		'/operation/updateDealerTemplate',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}
