import { requestClient ,fullUrl } from '#/api/request';

async function queryPage(param) {
  return requestClient.post('/auth/RobotAccount/queryPage', param);
}

async function queryList(param) {
  return requestClient.post('/auth/RobotAccount/queryList', param);
}

async function create(param) {
  return requestClient.post('/auth/RobotAccount/addOne', param);
}

async function removeByUid(param) {
  return requestClient.post('/auth/RobotAccount/removeByUid/' + param.uuid, param);
}

async function updateByUid(param) {
  return requestClient.post('/auth/RobotAccount/updateByUid/' + param.uuid, param);
}

/**
 * 更新多个账号状态
 */
async function updateByUids(param) {
  return requestClient.post('/auth/RobotAccount/updateByUids', param);
}

async function getById(param) {
  return requestClient.post('/auth/RobotAccount/getById', param);
}

async function getByUuid(param) {
  return requestClient.post('/auth/RobotAccount/getByUuid', param);
}

async function isValidAll(param) {
  return requestClient.post('/auth/RobotAccount/isValidAll', param);
}

async function isValid(param) {
  return requestClient.post('/auth/RobotAccount/isValid/' + param.uuid, param);
}
async function isValidNot(param) {
  return requestClient.post('/auth/RobotAccount/isValidNot', param);
}
 function importUrl(param){
  return fullUrl('/auth/RobotAccount/import', param);
}

function importBatchUpdateUrl(param){
  return fullUrl('/auth/RobotAccount/importBatchUpdate', param);
}

 function dwonloadTemplateUrl(param){
  return fullUrl('/auth/RobotAccount/dwonloadTemplate', param);
}

 function exportAllUrl(param){
  return fullUrl('/auth/RobotAccount/export', param);
}

 function exportPartUrl(param){
  return fullUrl('/auth/RobotAccount/export', param);
}

async function importExcel(param){
  return requestClient.post('/auth/RobotAccount/import', param);
}

/**
 * 批量更新账号状态
 */
async function importBatchUpdate(param){
  return requestClient.post('/auth/RobotAccount/importBatchUpdate', param);
}



async function dwonloadTemplate(param){
  return requestClient.post('/auth/RobotAccount/dwonloadTemplate', param);
}

async function exportAll(param){
  return requestClient.post('/auth/RobotAccount/export', param);
}

async function exportPart(param){
  return requestClient.post('/auth/RobotAccount/exportPart', param);
}



export const robotAccount = {
  queryPage,
  queryList,
  create,
  removeByUid,
  updateByUid,
  updateByUids,
  getById,
  getByUuid,
  importUrl,
  importBatchUpdateUrl,
  dwonloadTemplateUrl,
  exportAllUrl,
  exportPartUrl,
  importExcel,
  importBatchUpdate,
  dwonloadTemplate,
  exportAll,
  exportPart,
  isValidAll,
  isValid,
  isValidNot
}