import request from '@/utils/request'

// 查询果园列表
export function listOrchard(query) {
  return request({
    url: '/business/orchard/list',
    method: 'get',
    params: query
  })
}

// 查询果园详细
export function getOrchard(orchardId) {
  return request({
    url: '/business/orchard/' + orchardId,
    method: 'get'
  })
}

// 新增果园
export function addOrchard(data) {
  return request({
    url: '/business/orchard',
    method: 'post',
    data: data
  })
}

// 修改果园
export function updateOrchard(data) {
  return request({
    url: '/business/orchard',
    method: 'put',
    data: data
  })
}

// 删除果园
export function delOrchard(orchardId) {
  return request({
    url: '/business/orchard/' + orchardId,
    method: 'delete'
  })
}

// 导出果园数据
export function exportOrchard(query) {
  return request({
    url: '/business/orchard/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}