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


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


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


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


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


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


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


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



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


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


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

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


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


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