import request from '@/utils/request';

function base(module) {
  return `/platform/accountPool/${module}`;
}

export function getAccountPoolList(module, params) {
  return request({
    url: `${base(module)}/list`,
    method: 'get',
    params,
  });
}

export function addAccountPool(module, data) {
  return request({
    url: `${base(module)}/add`,
    method: 'post',
    data,
  });
}

export function batchAddAccountPool(module, rows) {
  return request({
    url: `${base(module)}/batchAdd`,
    method: 'post',
    data: { rows },
  });
}

export function getAccountPoolDetail(module, id) {
  return request({
    url: `${base(module)}/detail/${id}`,
    method: 'get',
  });
}

export function extractAccountPool(module, data) {
  return request({
    url: `${base(module)}/extract`,
    method: 'post',
    data,
  });
}

export function updateAccountPoolRemark(module, data) {
  return request({
    url: `${base(module)}/updateRemark`,
    method: 'post',
    data,
  });
}
