import request from '@/utils/request'

// 查询客户公海信息列表
export function listPool(query) {
  return request({
    url: '/customer/customerInfo/customerList',
    method: 'get',
    params: {
      ...query,
      isHighSeas: 'true'
    }
  })
}

// 公海客户认领
export function claimPool(data) {
  return request({
    url: '/customer/customerInfo/claimPool',
    method: 'put',
    data: data
  })
}

// 详情接口
export function getPool(id) {
  return request({
      url: `/customer/customerInfo/${id}`,
      method: 'get'
  })
}

// 新增客户公海
export function addPool(data) {
  return request({
    url: '/customer/customerInfo',
    method: 'post',
    data: data
  })
}

// 修改客户公海
export function updatePool(data) {
  return request({
    url: '/customer/customerInfo',
    method: 'put',
    data: data
  })
}
