import request from '@/utils/request'

export function listOrderRefundReason(query) {
  return request({
    url: '/store/store/orderRefundReason/list',
    method: 'get',
    params: query
  })
}

export function getOrderRefundReason(id) {
  return request({
    url: '/store/store/orderRefundReason/' + id,
    method: 'get'
  })
}

export function getByOrderCode(orderCode) {
  return request({
    url: '/store/store/orderRefundReason/getByOrderCode',
    method: 'get',
    params: { orderCode }
  })
}

export function addOrderRefundReason(data) {
  return request({
    url: '/store/store/orderRefundReason',
    method: 'post',
    data: data
  })
}

export function updateOrderRefundReason(data) {
  return request({
    url: '/store/store/orderRefundReason',
    method: 'put',
    data: data
  })
}

export function delOrderRefundReason(ids) {
  return request({
    url: '/store/store/orderRefundReason/' + ids,
    method: 'delete'
  })
}
