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


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


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


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


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


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


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


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



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


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


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

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


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


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