import request from '@/utils/request'

// 查询客户列表
export function listCustomer(query) {
  return request({
    url: '/bst/customer/list',
    method: 'get',
    params: query
  })
}

// 根据ID列表查询客户
export function listCustomerByIds(ids) {
  return request({
    url: '/bst/customer/listByIds',
    headers: {
      repeatSubmit: true
    },
    method: 'post',
    data: ids
  })
}

// 查询客户详细
export function getCustomer(id) {
  return request({
    url: '/bst/customer/' + id,
    method: 'get'
  })
}

// 新增客户
export function addCustomer(data) {
  return request({
    url: '/bst/customer',
    method: 'post',
    data: data
  })
}

// 修改客户
export function updateCustomer(data) {
  return request({
    url: '/bst/customer',
    method: 'put',
    data: data
  })
}

// 删除客户
export function delCustomer(id) {
  return request({
    url: '/bst/customer/' + id,
    method: 'delete'
  })
}
