import request from '@/utils/request'

// 查询MQTT设备列表
export function listMqttDevice(query) {
  return request({
    url: '/worn/mqttDevice/list',
    method: 'get',
    params: query
  })
}

// 查询MQTT设备详细
export function getMqttDevice(id) {
  return request({
    url: '/worn/mqttDevice/' + id,
    method: 'get'
  })
}

// 新增MQTT设备
export function addMqttDevice(data) {
  return request({
    url: '/worn/mqttDevice',
    method: 'post',
    data: data
  })
}

// 修改MQTT设备
export function updateMqttDevice(data) {
  return request({
    url: '/worn/mqttDevice',
    method: 'put',
    data: data
  })
}

// 删除MQTT设备
export function delMqttDevice(id) {
  return request({
    url: '/worn/mqttDevice/' + id,
    method: 'delete'
  })
}
