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


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


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


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


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


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


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


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



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


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


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

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


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


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