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


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


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


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


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


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


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


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



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


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


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

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


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


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

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

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

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

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