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


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


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


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


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


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


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


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



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


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


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

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


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


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