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

import * as API from './types';

/** 查询商家详情 GET /app/merchant/detail/${param0} */
export async function appMerchantDetailMerchantIdGet({
                                                         params,
                                                         options,
                                                     }: {
    // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
    params: API.AppMerchantDetailmerchantIdGetParams;
    options?: CustomRequestOptions;
}) {
    const {merchantId: param0, ...queryParams} = params;

    return request<API.RMerchantVo>(`/app/merchant/detail/${param0}`, {
        method: 'GET',
        params: {...queryParams},
        ...(options || {}),
    });
}

/** 商户编辑个人信息 POST /app/merchant/edit */
export async function appMerchantEditPost({
                                              body,
                                              options,
                                          }: {
    body: API.MerchantBo;
    options?: CustomRequestOptions;
}) {
    return request<API.R>('/app/merchant/edit', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 查询精选商家列表(首页) POST /app/merchant/featuredList */
export async function appMerchantFeaturedListPost({
                                                      body,
                                                      options,
                                                  }: {
    body: API.LatLogBo;
    options?: CustomRequestOptions;
}) {
    return request<API.RListMerchantVo>('/app/merchant/featuredList', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 查询商户用户的第一个入驻信息 GET /app/merchant/getFirstShopSettled */
export async function appMerchantGetFirstShopSettledGet({
                                                            options,
                                                        }: {
    options?: CustomRequestOptions;
}) {
    return request<API.RShopSettlementVo>('/app/merchant/getFirstShopSettled', {
        method: 'GET',
        ...(options || {}),
    });
}

/** 获取切换商户信息 GET /app/merchant/getLoginMerchant */
export async function appMerchantGetLoginMerchantGet({
                                                         options,
                                                     }: {
    options?: CustomRequestOptions;
}) {
    return request<API.RMerchantVo>('/app/merchant/getLoginMerchant', {
        method: 'GET',
        ...(options || {}),
    });
}

/** 查询商户首页数据 GET /app/merchant/indexData */
export async function appMerchantIndexDataGet({
                                                  body,
                                                  options,
                                              }: {
    body: API.TimeZoneBo;
    options?: CustomRequestOptions;
}) {
    return request<API.RMerchantIndexDataVO>('/app/merchant/indexData', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 查询商户首页数据 POST /app/merchant/indexData */
export async function appMerchantIndexDataPost({
                                                   body,
                                                   options,
                                               }: {
    body: API.TimeZoneBo;
    options?: CustomRequestOptions;
}) {
    return request<API.RMerchantIndexDataVO>('/app/merchant/indexData', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 查询附近商家列表(首页) POST /app/merchant/nearbyList */
export async function appMerchantNearbyListPost({
                                                    body,
                                                    options,
                                                }: {
    body: API.LatLogBo;
    options?: CustomRequestOptions;
}) {
    return request<API.RListMerchantVo>('/app/merchant/nearbyList', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 查询推荐商家列表(首页) POST /app/merchant/recommendList */
export async function appMerchantRecommendListPost({
                                                       params,
                                                       body,
                                                       options,
                                                   }: {
    // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
    params: API.AppMerchantRecommendListPostParams;
    body: API.RecommendMerchantBo;
    options?: CustomRequestOptions;
}) {
    return request<API.TableDataInfoMerchantVo>('/app/merchant/recommendList', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        params: {
            ...params,
        },
        data: body,
        ...(options || {}),
    });
}

/** 切换商户 GET /app/merchant/switch/${param0} */
export async function appMerchantSwitchMerchantIdGet({
                                                         params,
                                                         options,
                                                     }: {
    // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
    params: API.AppMerchantSwitchmerchantIdGetParams;
    options?: CustomRequestOptions;
}) {
    const {merchantId: param0, ...queryParams} = params;

    return request<API.R>(`/app/merchant/switch/${param0}`, {
        method: 'GET',
        params: {...queryParams},
        ...(options || {}),
    });
}

/** 查询当前用户可切换的商户 GET /app/merchant/switch/list */
export async function appMerchantSwitchListGet({
                                                   options,
                                               }: {
    options?: CustomRequestOptions;
}) {
    return request<API.RListMerchantVo>('/app/merchant/switch/list', {
        method: 'GET',
        ...(options || {}),
    });
}

/** 修改商家 PUT /xjpmj/merchant */
export async function xjpmjMerchantPut({
                                           body,
                                           options,
                                       }: {
    body: API.MerchantBoEditGroup;
    options?: CustomRequestOptions;
}) {
    return request<API.RVoid>('/xjpmj/merchant', {
        method: 'PUT',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

/** 新增商家 POST /xjpmj/merchant */
export async function xjpmjMerchantPost({
                                            body,
                                            options,
                                        }: {
    body: API.MerchantBoAddGroup;
    options?: CustomRequestOptions;
}) {
    return request<API.RVoid>('/xjpmj/merchant', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

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

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

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

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

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

/** 查询商家列表 POST /xjpmj/merchant/list */
export async function xjpmjMerchantListPost({
                                                params,
                                                body,
                                                options,
                                            }: {
    // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
    params: API.XjpmjMerchantListPostParams;
    body: API.MerchantListBo;
    options?: CustomRequestOptions;
}) {
    return request<API.TableDataInfoMerchantVo>('/xjpmj/merchant/list', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        params: {
            ...params,
        },
        data: body,
        ...(options || {}),
    });
}

/** 设置商家标签 POST /xjpmj/merchant/setMerchantLabel */
export async function xjpmjMerchantSetMerchantLabelPost({
                                                            body,
                                                            options,
                                                        }: {
    body: API.MerchantBo;
    options?: CustomRequestOptions;
}) {
    return request<API.RVoid>('/xjpmj/merchant/setMerchantLabel', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}

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