import request from '@/utils/request'

// 查询退款订单列表
export function listRefund(query) {
  return request({
    url: '/ss/refund/list',
    method: 'get',
    params: query
  })
}

// 查询退款订单详细
export function getRefund(refundId) {
  return request({
    url: '/ss/refund/' + refundId,
    method: 'get'
  })
}

// 新增退款订单
export function addRefund(data) {
  return request({
    url: '/ss/refund',
    method: 'post',
    data: data
  })
}

// 修改退款订单
export function updateRefund(data) {
  return request({
    url: '/ss/refund',
    method: 'put',
    data: data
  })
}

// 删除退款订单
export function delRefund(refundId) {
  return request({
    url: '/ss/refund/' + refundId,
    method: 'delete'
  })
}

// 刷新退款订单结果
export function refreshRefund(refundId) {
  return request({
    url: '/ss/refund/refresh/' + refundId,
    method: 'put'
  })
}
