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


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


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


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


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


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


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


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



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


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


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

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


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


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