import request from '@/utils/request'

// 查询肉商列表
export function listPurchaser(query) {
  return request({
    url: '/app/purchaser/list',
    method: 'get',
    params: query
  })
}

// 查询肉商全部列表
export function getAllPurchaser() {
  return request({
    url: '/app/purchaser/optionselect',
    method: 'get'
  })
}

// 查询肉商详细
export function getPurchaser(id) {
  return request({
    url: '/app/purchaser/' + id,
    method: 'get'
  })
}

// 新增肉商
export function addPurchaser(data) {
  return request({
    url: '/app/purchaser',
    method: 'post',
    data: data
  })
}

// 修改肉商
export function updatePurchaser(data) {
  return request({
    url: '/app/purchaser',
    method: 'put',
    data: data
  })
}

// 删除肉商
export function delPurchaser(id) {
  return request({
    url: '/app/purchaser/' + id,
    method: 'delete'
  })
}
