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


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


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


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


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


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


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


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



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


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


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

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


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


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