/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import type { CustomRequestOptions } from '@/http/types';

import * as API from './types';

/** 加入黑名单 POST /app/user/addBlackList */
export async function appUserAddBlackListPost({
  body,
  options,
}: {
  body: API.BlockBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/addBlackList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增银行账户 POST /app/user/bank/add */
export async function appUserBankAddPost({
  body,
  options,
}: {
  body: API.AddBankBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/bank/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除银行账户 POST /app/user/bank/delete */
export async function appUserBankDeletePost({
  body,
  options,
}: {
  body: API.OnlyIdBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/bank/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取银行账户详细信息 POST /app/user/bank/detail */
export async function appUserBankDetailPost({
  body,
  options,
}: {
  body: API.OnlyIdBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RBankVo>('/app/user/bank/detail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询银行账户列表 POST /app/user/bank/list */
export async function appUserBankListPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppUserBankListPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoBankVo>('/app/user/bank/list', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改银行账户 POST /app/user/bank/update */
export async function appUserBankUpdatePost({
  body,
  options,
}: {
  body: API.UpdateBankBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/bank/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 绑定新邮箱 POST /app/user/bindNewEmail */
export async function appUserBindNewEmailPost({
  body,
  options,
}: {
  body: API.BindEmailBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/bindNewEmail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 绑定新手机号 POST /app/user/bindNewPhone */
export async function appUserBindNewPhonePost({
  body,
  options,
}: {
  body: API.BindPhoneBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/bindNewPhone', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除用户卡 POST /app/user/card/delete */
export async function appUserCardDeletePost({
  body,
  options,
}: {
  body: API.AppUserCardBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/card/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户卡列表 POST /app/user/card/list */
export async function appUserCardListPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppUserCardListPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoUserCardVo>('/app/user/card/list', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 新增用户卡 POST /app/user/card/save */
export async function appUserCardSavePost({
  body,
  options,
}: {
  body: API.AppUserCardBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RLong>('/app/user/card/save', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询默认 POST /app/user/card/selectDefault */
export async function appUserCardSelectDefaultPost({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RUserCardVo>('/app/user/card/selectDefault', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 修改默认 POST /app/user/card/updateDefault */
export async function appUserCardUpdateDefaultPost({
  body,
  options,
}: {
  body: API.AppUserCardBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/card/updateDefault', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 校验邮箱是否被使用 POST /app/user/checkEmailUnique */
export async function appUserCheckEmailUniquePost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RBoolean>('/app/user/checkEmailUnique', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 校验旧邮箱(绑定邮箱) POST /app/user/checkOldEmail */
export async function appUserCheckOldEmailPost({
  body,
  options,
}: {
  body: API.BindEmailBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/checkOldEmail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 校验旧手机号(绑定新手机号) POST /app/user/checkOldPhone */
export async function appUserCheckOldPhonePost({
  body,
  options,
}: {
  body: API.BindPhoneBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/checkOldPhone', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 校验手机号是否被使用 POST /app/user/checkPhoneUnique */
export async function appUserCheckPhoneUniquePost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RBoolean>('/app/user/checkPhoneUnique', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改登录密码 POST /app/user/editLoginPwd */
export async function appUserEditLoginPwdPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/editLoginPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改支付密码 POST /app/user/editPayPwd */
export async function appUserEditPayPwdPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/editPayPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改用户信息 POST /app/user/editUserInfo */
export async function appUserEditUserInfoPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/editUserInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 忘记支付密码 POST /app/user/forgetPayPwd */
export async function appUserForgetPayPwdPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/forgetPayPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 忘记密码/可不传邮箱 POST /app/user/forgetPwd */
export async function appUserForgetPwdPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/forgetPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 忘记密码/可不传邮箱(未登录之前) POST /app/user/forgetPwdNotLogin */
export async function appUserForgetPwdNotLoginPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/forgetPwdNotLogin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据邮箱查询用户信息 POST /app/user/getByEmail */
export async function appUserGetByEmailPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RUser>('/app/user/getByEmail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据手机号查询用户信息 POST /app/user/getByPhone */
export async function appUserGetByPhonePost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RUser>('/app/user/getByPhone', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取登录用户信息 GET /app/user/getLoginUser */
export async function appUserGetLoginUserGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RUserVo>('/app/user/getLoginUser', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 注销账号 POST /app/user/logOff */
export async function appUserLogOffPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/logOff', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 退出登录 POST /app/user/logout */
export async function appUserLogoutPost({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/logout', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 谷歌换绑 POST /app/user/rebindGoogle */
export async function appUserRebindGooglePost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/rebindGoogle', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 邮箱/手机号注册, 手机号注册不传邮箱即可, 手机号校验类型都一样,不用改 POST /app/user/register */
export async function appUserRegisterPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RMapObject>('/app/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 记录新人优惠券弹窗已经弹过了 POST /app/user/setHasPop */
export async function appUserSetHasPopPost({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/setHasPop', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 设置支付密码 POST /app/user/setPayPwd */
export async function appUserSetPayPwdPost({
  body,
  options,
}: {
  body: API.AppUserBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/user/setPayPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 余额明细列表 POST /app/user/userBalanceDetail/balanceDetailList */
export async function appUserUserBalanceDetailBalanceDetailListPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppUserUserBalanceDetailBalanceDetailListPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoUserBalanceDetailVo>(
    '/app/user/userBalanceDetail/balanceDetailList',
    {
      method: 'POST',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 我的邀请列表 type 1:invited 2:completed 3:expired POST /app/user/userInvite/inviteList */
export async function appUserUserInviteInviteListPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppUserUserInviteInviteListPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoUserInviteVo>(
    '/app/user/userInvite/inviteList',
    {
      method: 'POST',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 申请提现 POST /app/user/withdrawal/applyWithdrawal */
export async function appUserWithdrawalApplyWithdrawalPost({
  body,
  options,
}: {
  body: API.ApplyWithdrawalBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/user/withdrawal/applyWithdrawal', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 实时计算到账金额和手续费 POST /app/user/withdrawal/computeAmountFee */
export async function appUserWithdrawalComputeAmountFeePost({
  body,
  options,
}: {
  body: API.ComputeAmountFeeBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RComputeAmountFeeVo>(
    '/app/user/withdrawal/computeAmountFee',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 提现记录详细信息 POST /app/user/withdrawal/detail */
export async function appUserWithdrawalDetailPost({
  body,
  options,
}: {
  body: API.OnlyIdBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RWithdrawalRecordVo>('/app/user/withdrawal/detail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 提现记录列表 POST /app/user/withdrawal/list */
export async function appUserWithdrawalListPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppUserWithdrawalListPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoWithdrawalRecordVo>(
    '/app/user/withdrawal/list',
    {
      method: 'POST',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 修改用户 PUT /xjpmj/user */
export async function xjpmjUserPut({
  body,
  options,
}: {
  body: API.UserBoEditGroup;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/user', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增用户 POST /xjpmj/user */
export async function xjpmjUserPost({
  body,
  options,
}: {
  body: API.UserBoAddGroup;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/user', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取用户详细信息 GET /xjpmj/user/${param0} */
export async function xjpmjUserIdGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjUseridGetParams;
  options?: CustomRequestOptions;
}) {
  const { id: param0, ...queryParams } = params;

  return request<API.RUserVo>(`/xjpmj/user/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除用户 DELETE /xjpmj/user/${param0} */
export async function xjpmjUserIdsDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjUseridsDeleteParams;
  options?: CustomRequestOptions;
}) {
  const { ids: param0, ...queryParams } = params;

  return request<API.RVoid>(`/xjpmj/user/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 导出用户列表 POST /xjpmj/user/export */
export async function xjpmjUserExportPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjUserExportPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.XjpmjUserExportPostResponse>('/xjpmj/user/export', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询用户列表 GET /xjpmj/user/list */
export async function xjpmjUserListGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjUserListGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoUserVo>('/xjpmj/user/list', {
    method: 'GET',
    params: {
      // selectEntry has a default value: 1
      selectEntry: '1',

      ...params,
    },
    ...(options || {}),
  });
}

/** 会员续期 POST /xjpmj/user/membershipRenewal */
export async function xjpmjUserMembershipRenewalPost({
  body,
  options,
}: {
  body: API.MembershipRenewalBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/user/membershipRenewal', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 重置密码 POST /xjpmj/user/resetPassword */
export async function xjpmjUserResetPasswordPost({
  body,
  options,
}: {
  body: API.ResetPasswordBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/user/resetPassword', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改用户余额 POST /xjpmj/user/updateBalance */
export async function xjpmjUserUpdateBalancePost({
  body,
  options,
}: {
  body: API.UpdateUserAmount;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/user/updateBalance', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
