import request from '@/utils/request'

// 查询就餐地列表
export function listPlace(query) {
  return request({
    url: '/canteen/place/list',
    method: 'get',
    params: query
  })
}

// 查询积分兑换领取地点列表
export function integralExchangeGetPlace() {
  return request({
    url: '/canteen/place/integralExchangeGetPlace',
    method: 'get'
  })
}

// 查询就餐地详细
export function getPlace(placeId) {
  return request({
    url: '/canteen/place/' + placeId,
    method: 'get'
  })
}

// 新增就餐地
export function addPlace(data) {
  return request({
    url: '/canteen/place',
    method: 'post',
    data: data
  })
}

// 修改就餐地
export function updatePlace(data) {
  return request({
    url: '/canteen/place',
    method: 'put',
    data: data
  })
}

// 删除就餐地
export function delPlace(placeId) {
  return request({
    url: '/canteen/place/' + placeId,
    method: 'delete'
  })
}

// 导出就餐地
export function exportPlace(query) {
  return request({
    url: '/canteen/place/export',
    method: 'get',
    params: query
  })
}
