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

/** 创建花销统计记录 POST /operation/createExpenseRecord */
export async function createExpenseRecord(
  body: BusinessAPI.ExpenseRecordCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseExpenseRecordVO>(
    "/operation/createExpenseRecord",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 花销统计记录列表 GET /operation/listExpenseRecord */
export async function listExpenseRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listExpenseRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseExpenseRecordVO>(
    "/operation/listExpenseRecord",
    {
      method: "GET",
      params: {
        ...params,
        expenseRecordListQry: undefined,
        ...params["expenseRecordListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 花销统计记录详情 GET /operation/showExpenseRecord */
export async function showExpenseRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showExpenseRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseExpenseRecordVO>(
    "/operation/showExpenseRecord",
    {
      method: "GET",
      params: {
        ...params,
        expenseRecordShowQry: undefined,
        ...params["expenseRecordShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 花销统计记录更新 PUT /operation/updateExpenseRecord */
export async function updateExpenseRecord(
  body: BusinessAPI.ExpenseRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseExpenseRecordVO>(
    "/operation/updateExpenseRecord",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 花销统计记录更新 PATCH /operation/updateExpenseRecord */
export async function updateExpenseRecord1(
  body: BusinessAPI.ExpenseRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseExpenseRecordVO>(
    "/operation/updateExpenseRecord",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
