import request from '@/apps/mobile/utils/request'

//根据表名和字段查询
export function queryDictionaryByName(data) {
    return request({
        method: 'post',
        url: '/api/tableDicts/query-constant',
        data,
    });
}



// 根据表名和字段查询列表
export function queryDictionaryList(data) {
    return request({
        method: 'post',
        url: '/api/tableDicts/query-page',
        data,
    });
}


// 根据表名和字段新增
export function addDictionary(data) {
    return request({
        method: 'post',
        url: '/api/tableDicts/insert',
        data,
    });
}


// 根据表名和字段修改
export function updateDictionary(data) {
    return request({
        method: 'put',
        url: '/api/tableDicts/update',
        data,
    });
}



// 根据id删除
export function deleteDictionaryById(data) {
    return request({
        method: 'delete',
        url: `/api/tableDicts/delete`,
        data,
    });
}


// 批量删除
export function deleteBatchDictionary(data) {
    return request({
        method: 'delete',
        url: `/api/tableDicts/delete-batch`,
        data,
    });
}
