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


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


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


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


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


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


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


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



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


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


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

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


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


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