import request from '@/utils/request'


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



//商品类型列表
export function itemTypeListApi(query){
  return request({
    url:'/ecw/product-attr/list',
    method:'get',
    query:query
  })
}
//
export  function customerDropDownList(params){
  return request({
    url:'/ecw/customer/select',
    method:'get',
    params,
  })
}
//商品
export function commodityList(){
  return request({
    url:'/ecw/product/list',
    method:'get',

  })
}
//创建佣金
export function createCommission(query){
  return request({
    url:'/ecw/customer-commission/create',
    method:'post',
    data:query
  })
}
// 获得客户佣金类型详情
export function getCustomerCommission(id) {
  return request({
    url: '/ecw/customer-commission-info/get-by-commission-id?commissionId=' + id,
    method: 'get'
  })
}
//获得客户佣金详情
export function commissionGetByCustomerId (id){
  return request({
    url:'/ecw/customer-commission/getByCustomerId?customerId='+id,
    method:'get'
  })
}

