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


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


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


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


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


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


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


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



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


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


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

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


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


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