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


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


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


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


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


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


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


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



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


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


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

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


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


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