import request from '@/utils/request'

// 查询食堂订单明细列表
export function shopOrderStat(eventId) {
  return request({
    url: '/gift/detail/shopOrder/stat?eventId=' + eventId,
    method: 'get'
  })
}

// 查询食堂订单明细列表
export function shopOrderStatExport(eventId) {
  return request({
    url: '/gift/detail/shopOrderStatExport?eventId=' + eventId,
    method: 'get'
  })
}

// 查询食堂订单明细列表
export function listDetail(query) {
  return request({
    url: '/gift/detail/list',
    method: 'get',
    params: query
  })
}

// 查询食堂订单明细详细
export function getDetail(detailId) {
  return request({
    url: '/gift/detail/' + detailId,
    method: 'get'
  })
}

// 新增食堂订单明细
export function addDetail(data) {
  return request({
    url: '/gift/detail',
    method: 'post',
    data: data
  })
}

// 修改食堂订单明细
export function updateDetail(data) {
  return request({
    url: '/gift/detail',
    method: 'put',
    data: data
  })
}

// 删除食堂订单明细
export function delDetail(detailId) {
  return request({
    url: '/gift/detail/' + detailId,
    method: 'delete'
  })
}

// 导出食堂订单明细
export function exportDetail(query) {
  return request({
    url: '/gift/detail/export',
    method: 'get',
    params: query
  })
}
