import request from '@/utils/request'

// 创建汇率管理
export function createExchangeRate(data) {
  return request({
    url: '/ecw/exchange-rate/create',
    method: 'post',
    data: data
  })
}

// 更新汇率管理
export function updateExchangeRate(data) {
  return request({
    url: '/ecw/exchange-rate/update',
    method: 'put',
    data: data
  })
}

// 删除汇率管理
export function deleteExchangeRate(id) {
  return request({
    url: '/ecw/exchange-rate/delete?id=' + id,
    method: 'delete'
  })
}

// 获得汇率管理
export function getExchangeRate(id) {
  return request({
    url: '/ecw/exchange-rate/get?id=' + id,
    method: 'get'
  })
}

// 获得汇率管理分页
export function getExchangeRatePage(query) {
  return request({
    url: '/ecw/exchange-rate/page',
    method: 'get',
    params: query
  })
}
// 汇率日志查询
export function getExchangeRateLogList(params){
  return request({
      url:'/ecw/exchange-rate-log/page',
      method:'get',
      params,
  })
}
// 导出汇率管理 Excel
export function exportExchangeRateExcel(query) {
  return request({
    url: '/ecw/exchange-rate/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
