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


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


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


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


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


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


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


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



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


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


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

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


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


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