import request from '@/utils/request'

// 查询设备列表
export function listMallDevice(query) {
  return request({
    url: '/mall/mallDevice/list',
    method: 'get',
    params: query
  })
}

// 查询设备详细
export function getMallDevice(deviceId) {
  return request({
    url: '/mall/mallDevice/' + deviceId,
    method: 'get'
  })
}

// 新增设备
export function addMallDevice(data) {
  return request({
    url: '/mall/mallDevice',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateMallDevice(data) {
  return request({
    url: '/mall/mallDevice',
    method: 'put',
    data: data
  })
}

// 删除设备
export function delMallDevice(deviceId) {
  return request({
    url: '/mall/mallDevice/' + deviceId,
    method: 'delete'
  })
}
