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


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


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


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


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


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


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


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



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


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


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

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


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


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