import request from '@/utils/request'

// 查询大棚信息（用户-设备关联）列表
export function listUserAgri(query) {
  return request({
    url: '/assets/userAgri/list',
    method: 'get',
    params: query
  })
}

// 查询大棚信息（用户-设备关联）详细
export function getUserAgri(id) {
  return request({
    url: '/assets/userAgri/' + id,
    method: 'get'
  })
}
export function removeAgri(data) {
  return request({
    url: '/assets/userAgri/removeAgri',
    method: 'delete',
    data: data
  })
}
// 新增大棚信息（用户-设备关联）
export function addUserAgri(data) {
  return request({
    url: '/assets/userAgri',
    method: 'post',
    data: data
  })
}

// 修改大棚信息（用户-设备关联）
export function updateUserAgri(data) {
  return request({
    url: '/assets/userAgri',
    method: 'put',
    data: data
  })
}

// 删除大棚信息（用户-设备关联）
export function delUserAgri(id) {
  return request({
    url: '/assets/userAgri/' + id,
    method: 'delete'
  })
}

export function findAgriUser(query) {
  return request({
    url: '/assets/userAgri/findAgriUser',
    method: 'get',
    params: query
  })
}

export function findAllUser(query) {
  return request({
    url: '/assets/userAgri/findAllUser',
    method: 'get',
    params: query
  })
}

export function batchAssociaUser(data) {
  return request({
    url: '/assets/userAgri/batchAssociaUser',
    method: 'post',
    data: data
  })
}
