import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listCurrency(query) {
  return request({
    url: '/user/currency/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getCurrency(currencyId) {
  return request({
    url: '/user/currency/' + currencyId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addCurrency(data) {
  return request({
    url: '/user/currency',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateCurrency(data) {
  return request({
    url: '/user/currency',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delCurrency(currencyId) {
  return request({
    url: '/user/currency/' + currencyId,
    method: 'delete'
  })
}

// 根據币种查询可用的汇率
export function getUsableCurrencyRate() {
  return request({
    url: '/user/currency/usable',
    method: 'get'
  })
}

// 查询【请填写功能名称】列表
export function listAllCurrency(query) {
  return request({
    url: '/user/currency/listAll',
    method: 'get',
    params: query
  })
}

