import request from '@/utils/request'

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

// 订单商品客户购买数量统计
export function selectMallOrderGoodsTotal(query) {
  return request({
    url: '/mall/mallOrderGoods/selectMallOrderGoodsTotal',
    method: 'get',
    params: query
  })
}

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

// 新增订单商品
export function addMallOrderGoods(data) {
  return request({
    url: '/mall/mallOrderGoods',
    method: 'post',
    data: data
  })
}

// 修改订单商品
export function updateMallOrderGoods(data) {
  return request({
    url: '/mall/mallOrderGoods',
    method: 'put',
    data: data
  })
}

// 删除订单商品
export function delMallOrderGoods(id) {
  return request({
    url: '/mall/mallOrderGoods/' + id,
    method: 'delete'
  })
}

// 导出订单商品
export function exportMallOrderGoods(query) {
  return request({
    url: '/mall/mallOrderGoods/export',
    method: 'get',
    params: query
  })
}

// 查询订单商品列表
export function getOrderBackList(query) {
  return request({
    url: '/mall/mallOrderGoods/getOrderBackList',
    method: 'get',
    params: query
  })
}
