import request from '@/utils/request'

export function index(params){
  return request({
    method:'get',
    url:'/api/admin/order/index',
    params
  })
}

export function getList(params){
  return request({
    method:'get',
    url:'/api/admin/order/get-list',
    params
  })
}



export function getDetail(params){
  return request({
    method:'get',
    url:'/api/admin/order/show',
    params
  })
}

export function itemPreAction(params){
  return request({
    method:'get',
    url:'/api/admin/order/item-pre-action',
    params
  })
}

export function itemAction(data){
  return request({
    method:'post',
    url:'/api/admin/order/item-action',
    data
  })
}

export function getMerchantsByProductType(params){
  return request({
    method:'get',
    url:'/api/admin/order/get-merchants-by-product-type',
    params
  })
}

export function getMerchantsByOrderItem(params){
  return request({
    method:'get',
    url:'/api/admin/order/get-merchants-by-order-item',
    params
  })
}

export function getAssignableProducts(params){
  return request({
    method:'get',
    url:'/api/admin/order/get-assignable-products',
    params
  })
}

export function getItemLogs(params){
  return request({
    method:'get',
    url:'/api/admin/order/get-item-logs',
    params
  })
}

export function save(data){
  return request({
    method:'post',
    url:'/api/admin/order/save',
    data
  })
}
