import request from '@/utils/request'

// 查询代理商列表
export function listBusiAgents(query) {
  return request({
    url: '/voluntary/busiAgents/list',
    method: 'get',
    params: query
  })
}

// 查询代理商详细
export function getBusiAgents(agentId) {
  return request({
    url: '/voluntary/busiAgents/' + agentId,
    method: 'get'
  })
}

export function getAllAgents(query) {
  return request({
    url: '/voluntary/busiAgents/getAllAgents',
    method: 'get',
    params: query
  })
}

// 新增代理商
export function addBusiAgents(data) {
  return request({
    url: '/voluntary/busiAgents',
    method: 'post',
    data: data
  })
}

// 修改代理商
export function updateBusiAgents(data) {
  return request({
    url: '/voluntary/busiAgents',
    method: 'put',
    data: data
  })
}

// 删除代理商
export function delBusiAgents(agentId) {
  return request({
    url: '/voluntary/busiAgents/' + agentId,
    method: 'delete'
  })
}
