import request from '@/utils/request'

// 查询转账列表
export function listTransfer(query) {
  return request({
    url: '/ss/transfer/list',
    method: 'get',
    params: query
  })
}

// 查询转账详细
export function getTransfer(batchId) {
  return request({
    url: '/ss/transfer/' + batchId,
    method: 'get'
  })
}

// 新增转账
export function addTransfer(data) {
  return request({
    url: '/ss/transfer',
    method: 'post',
    data: data
  })
}

// 修改转账
export function updateTransfer(data) {
  return request({
    url: '/ss/transfer',
    method: 'put',
    data: data
  })
}

// 删除转账
export function delTransfer(batchId) {
  return request({
    url: '/ss/transfer/' + batchId,
    method: 'delete'
  })
}

// 刷新转账结果
export function refreshTransferStatus(batchId) {
  return request({
    url: `/ss/transfer/${batchId}/refresh`,
    method: 'put'
  })
}
