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


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


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


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


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


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


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


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



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


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


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

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


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


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