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


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


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


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


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


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


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


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



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


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


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

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


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


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