import request from '@/utils/request'

// 查询所有设备列表
export const getDeviceList = () =>
  request({
    url: '/device/deviceInfo/getList',
    method: 'get'
  })

//分页查询设备
export const getDeviceFindPageList = (data) =>
  request({
    url: `/device/deviceInfo/findByPage?conditionJson=&currentPage=${data.currentPage}&size=${data.size}`,
    method: 'get'
  })

//ID查询
export const getDeviceID = (id) =>
  request({
    url: `/device/deviceInfo/getById/${id}`,
    method: 'get'
  })

//设备新增
export const addDevice = (data) =>
  request({
    url: '/device/deviceInfo/save',
    method: 'post',
    data
  })

//设备修改
export const updateDevice = (data) =>
  request({
    url: '/device/deviceInfo/updateById',
    method: 'post',
    data
  })

export const deleteDevice = (data) =>
  request({
    url: '/device/deviceInfo/delete',
    method: 'post',
    data
  })
