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


export async function deleteByPrimaryKeyForGfb(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/gfb/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForGfb(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/gfb/get?${stringify(params)}`);
}


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


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


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


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


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



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


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


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

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


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


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