import request from '@/utils/request'

// 查询订单商品列表
export function listOrderFoods(query) {
  return request({
    url: '/admin/orderFoods/list',
    method: 'get',
    params: query
  })
}

// 查询订单商品详细
export function getOrderFoods(id) {
  return request({
    url: '/admin/orderFoods/' + id,
    method: 'get'
  })
}

// 新增订单商品
export function addOrderFoods(data) {
  return request({
    url: '/admin/orderFoods',
    method: 'post',
    data: data
  })
}

// 修改订单商品
export function updateOrderFoods(data) {
  return request({
    url: '/admin/orderFoods',
    method: 'put',
    data: data
  })
}

// 删除订单商品
export function delOrderFoods(id) {
  return request({
    url: '/admin/orderFoods/' + id,
    method: 'delete'
  })
}
