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


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


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


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


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


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


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


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



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


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


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

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


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


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

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