import request from '@/utils/request'

// 创建银行账户
export function createBankAccount(data) {
  return request({
    url: '/ecw/bank-account/create',
    method: 'post',
    data: data
  })
}

// 更新银行账户
export function updateBankAccount(data) {
  return request({
    url: '/ecw/bank-account/update',
    method: 'put',
    data: data
  })
}

// 更新银行账户
export function updateBankAccountStatus(data) {
  return request({
    url: '/ecw/bank-account/updateStatus',
    method: 'put',
    data: data
  })
}


// 删除银行账户
export function deleteBankAccount(id) {
  return request({
    url: '/ecw/bank-account/delete?id=' + id,
    method: 'delete'
  })
}

// 获得银行账户
export function getBankAccount(id) {
  return request({
    url: '/ecw/bank-account/get?id=' + id,
    method: 'get'
  })
}

// 获得银行账户分页
export function getBankAccountPage(query) {
  return request({
    url: '/ecw/bank-account/page',
    method: 'get',
    params: query
  })
}

// 导出银行账户 Excel
export function exportBankAccountExcel(query) {
  return request({
    url: '/ecw/bank-account/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
