import request from '@/config/axios'

export interface PayOrderExtensionVO {
  id: number
  no: string
  orderId: number
  channelId: number
  accountCode: string
  userIp: string
  status: number
  channelExtras: string
  channelNotifyData: string
  accountName: string
}

// 查询支付订单列表
export const getPayOrderExtensionPage = async (params) => {
  return await request.get({ url: `/member/pay-order-extension/page`, params })
}

// 查询支付订单详情
export const getPayOrderExtension = async (id: number) => {
  return await request.get({ url: `/member/pay-order-extension/get?id=` + id })
}

// 新增支付订单

export const createPayOrderExtension = async (data: PayOrderExtensionVO) => {
  return await request.post({ url: `/member/pay-order-extension/create`, data })
}

// 修改支付订单

export const updatePayOrderExtension = async (data: PayOrderExtensionVO) => {
  return await request.put({ url: `/member/pay-order-extension/update`, data })
}

// 删除支付订单

export const deletePayOrderExtension = async (id: number) => {
  return await request.delete({ url: `/member/pay-order-extension/delete?id=` + id })
}

// 导出支付订单Excel
export const exportPayOrderExtension = async (params) => {
  return await request.download({ url: `/member/pay-order-extension/export-excel`, params })
}
