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


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


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


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


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


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


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


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



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


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


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

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


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


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