import request from '@/utils/request'

// 创建E-Cash汇率单位
export function createCurrencyEcash(data) {
  return request({
    url: '/ecw/currency-ecash/create',
    method: 'post',
    data: data
  })
}

// 更新E-Cash汇率单位
export function updateCurrencyEcash(data) {
  return request({
    url: '/ecw/currency-ecash/update',
    method: 'put',
    data: data
  })
}

// 删除E-Cash汇率单位
export function deleteCurrencyEcash(id) {
  return request({
    url: '/ecw/currency-ecash/delete?id=' + id,
    method: 'delete'
  })
}

// 获得E-Cash汇率单位
export function getCurrencyEcash(id) {
  return request({
    url: '/ecw/currency-ecash/get?id=' + id,
    method: 'get'
  })
}

// 获得E-Cash汇率单位分页
export function getCurrencyEcashPage(query) {
  return request({
    url: '/ecw/currency-ecash/page',
    method: 'get',
    params: query
  })
}

// 导出E-Cash汇率单位 Excel
export function exportCurrencyEcashExcel(query) {
  return request({
    url: '/ecw/currency-ecash/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
