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


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


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


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


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


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


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


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



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


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


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

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


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


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