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


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


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


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


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


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


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


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



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


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


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

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


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


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

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

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

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

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