import request from '@/utils/request'

// 查询礼品登记列表
export function listGift(query) {
  return request({
    url: '/canteen/gift/list',
    method: 'get',
    params: query
  })
}

// 查询礼品登记详细
export function getGift(giftId) {
  return request({
    url: '/canteen/gift/' + giftId,
    method: 'get'
  })
}

// 新增礼品登记
export function addGift(data) {
  return request({
    url: '/canteen/gift',
    method: 'post',
    data: data
  })
}

// 修改礼品登记
export function updateGift(data) {
  return request({
    url: '/canteen/gift',
    method: 'put',
    data: data
  })
}

// 删除礼品登记
export function delGift(giftId) {
  return request({
    url: '/canteen/gift/' + giftId,
    method: 'delete'
  })
}

// 导出礼品登记
export function exportGift(query) {
  return request({
    url: '/canteen/gift/export',
    method: 'get',
    params: query
  })
}