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


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


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


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


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


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


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


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

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

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


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


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

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


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


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

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