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


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


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


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


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


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


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


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



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


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


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

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


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


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