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


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


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


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


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


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


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


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



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


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


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

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


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


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