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


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


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


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


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


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


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


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



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


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


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

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


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


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