import request from '@/utils/request'

// 查询客户统计数据列表
export function listCustomerStatistics(query) {
  return request({
    url: '/wecom/customerStatistics/list',
    method: 'get',
    params: query
  })
}

// 查询客户统计数据详细
export function getCustomerStatistics(id) {
  return request({
    url: '/wecom/customerStatistics/' + id,
    method: 'get'
  })
}

// 新增客户统计数据
export function addCustomerStatistics(data) {
  return request({
    url: '/wecom/customerStatistics',
    method: 'post',
    data: data
  })
}

// 修改客户统计数据
export function updateCustomerStatistics(date,cost,attr) {
  return request({
    url: '/wecom/customerStatistics',
    method: 'put',
    params: {
      curDate: date,
      totalCost: cost,
      attr: attr
    }
  })
}

// 删除客户统计数据
export function delCustomerStatistics(ids) {
  return request({
    url: '/wecom/customerStatistics/' + ids,
    method: 'delete'
  })
}

// 导出客户统计数据
export function exportCustomerStatistics(query) {
  return request({
    url: '/wecom/customerStatistics/export',
    method: 'post',
    params: query,
    responseType: 'blob'
  })
}
