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

/**
 * 获取资金池总资金
 */
async function getTotalFund() {
  return requestClient.post('/auth/FundPoolService/getTotalFund');
}

/**
 * 获取资金池详情
 */
async function getFundPoolDetail() {
  return requestClient.post('/auth/FundPoolService/getFundPoolDetail');
}

/**
 * 申请资金
 * @param param 申请资金参数
 */
async function applyForBalance(param) {
  return requestClient.post('/auth/FundPoolService/applyForBalance', param);
}

/**
 * 重置资金池缓存
 */
async function resetCache() {
  return requestClient.post('/auth/FundPoolService/resetCache');
}

/**
 * 清空资金池缓存
 */
async function clearFundPoolCache() {
  return requestClient.post('/auth/FundPoolService/clearFundPoolCache');
}

export const fundPoolService = {
  getTotalFund,
  getFundPoolDetail,
  applyForBalance,
  resetCache,
  clearFundPoolCache
}