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

/** 创建公司管理 POST /operation/createCompany */
export async function createCompany(
  body: BusinessAPI.CompanyCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCompanyVO>(
    "/operation/createCompany",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 公司管理删除 DELETE /operation/destroyCompany */
export async function destroyCompany(
  body: BusinessAPI.CompanyDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/destroyCompany", {
    method: "DELETE",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 公司管理列表 GET /operation/listCompany */
export async function listCompany(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listCompanyParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseCompanyVO>("/operation/listCompany", {
    method: "GET",
    params: {
      ...params,
      companyListQry: undefined,
      ...params["companyListQry"],
    },
    ...(options || {}),
  });
}

/** 公司管理列表 GET /operation/pageCompany */
export async function pageCompany(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageCompanyParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseCompanyVO>("/operation/pageCompany", {
    method: "GET",
    params: {
      ...params,
      companyPageQry: undefined,
      ...params["companyPageQry"],
    },
    ...(options || {}),
  });
}

/** 公司管理详情 GET /operation/showCompany */
export async function showCompany(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showCompanyParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCompanyVO>(
    "/operation/showCompany",
    {
      method: "GET",
      params: {
        ...params,
        companyShowQry: undefined,
        ...params["companyShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 公司管理更新 PUT /operation/updateCompany */
export async function updateCompany(
  body: BusinessAPI.CompanyUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCompanyVO>(
    "/operation/updateCompany",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 公司管理更新 PATCH /operation/updateCompany */
export async function updateCompany1(
  body: BusinessAPI.CompanyUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCompanyVO>(
    "/operation/updateCompany",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
