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

import webpath from '@/utils/webPath';

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


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


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


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


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


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


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



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


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


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

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


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


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

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

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

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

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

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


