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


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


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


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


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


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


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


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



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


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


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

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


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


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