import { stringify } from 'qs';
import { request } from '@umijs/max';
import webpath from '@/utils/webPath';


export async function deleteByPrimaryKeyForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/get?${stringify(params)}`);
}


export async function insertForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForCarouselAdv(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/carouseladv/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}
