import request from '@/utils/request'
import { preventRepeatFu } from "@/utils/hciot";

// 查询租户设置列表
export function listConfig(query) {
    return request({
        url: '/system/tconfig/list',
        method: 'get',
        params: query
    })
}

// 查询租户设置详细
export function getConfig(configId) {
    return request({
        url: '/system/tconfig/' + configId,
        method: 'get'
    })
}

// 新增租户设置
export function addConfig(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/tconfig',
        method: 'post',
        data: data
    })
}

// 修改租户设置
export function updateConfig(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/tconfig',
        method: 'put',
        data: data
    })
}

// 删除租户设置
export function delConfig(configId) {
    return request({
        url: '/system/tconfig/' + configId,
        method: 'delete'
    })
}

// 查询租户设置列表map
export function mlistConfig(query) {
    return request({
        url: '/system/tconfig/mlist',
        method: 'get',
        params: query
    })
}