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


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


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


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


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


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


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


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



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


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


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

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


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


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