import request from '@/utils/request'

// 创建客户佣金详情
export function createCustomerCommissionInfo(data) {
  return request({
    url: '/ecw/customer-commission-info/create',
    method: 'post',
    data: data
  })
}

// 更新客户佣金详情
export function updateCustomerCommissionInfo(data) {
  return request({
    url: '/ecw/customer-commission-info/update',
    method: 'put',
    data: data
  })
}

// 删除客户佣金详情
export function deleteCustomerCommissionInfo(id) {
  return request({
    url: '/ecw/customer-commission-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得客户佣金详情
export function getCustomerCommissionInfo(id) {
  return request({
    url: '/ecw/customer-commission-info/get?id=' + id,
    method: 'get'
  })
}

// 获得客户佣金详情分页
export function getCustomerCommissionInfoPage(query) {
  return request({
    url: '/ecw/customer-commission-info/page',
    method: 'get',
    params: query
  })
}

// 导出客户佣金详情 Excel
export function exportCustomerCommissionInfoExcel(query) {
  return request({
    url: '/ecw/customer-commission-info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
