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


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


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


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


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


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


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


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



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


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


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

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


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


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