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


export async function deleteByPrimaryKeyForEbookArticleType(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/ebookarticletype/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForEbookArticleType(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/ebookarticletype/get?${stringify(params)}`);
}


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


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


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


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


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



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


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


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

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


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


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