import request from '@/utils/request'

// 查询客户历史订单列表
export function listCustomerHisOrder(query) {
  return request({
    url: '/crm/customerHisOrder/list',
    method: 'get',
    params: query
  })
}

// 查询客户历史订单详细
export function getCustomerHisOrder(orderId) {
  return request({
    url: '/crm/customerHisOrder/' + orderId,
    method: 'get'
  })
}

// 新增客户历史订单
export function addCustomerHisOrder(data) {
  return request({
    url: '/crm/customerHisOrder',
    method: 'post',
    data: data
  })
}

// 修改客户历史订单
export function updateCustomerHisOrder(data) {
  return request({
    url: '/crm/customerHisOrder',
    method: 'put',
    data: data
  })
}

// 删除客户历史订单
export function delCustomerHisOrder(orderId) {
  return request({
    url: '/crm/customerHisOrder/' + orderId,
    method: 'delete'
  })
}

// 导出客户历史订单
export function exportCustomerHisOrder(query) {
  return request({
    url: '/crm/customerHisOrder/export',
    method: 'get',
    params: query
  })
}