import request from '@/utils/request'

// 商户查询订单统计
export function mchCountBill(query) {
  return request({
    url: '/mch/bill/count',
    method: 'get',
    params: query
  })
}

// 查询本人收款订单列表
export function incomeBillList(query) {
  return request({
    url: '/app/bill/incomeList',
    method: 'get',
    params: query
  })
}

// 商户订单退款
export function mchRefundBill(billId, refundAmount) {
  return request({
    url: '/app/bill/refund',
    method: 'put',
    data: {
      billId,
      refundAmount
    }
  })
}

// 商户获取订单详情
export function mchGetBill(billId) {
  return request({
    url: `/mch/bill/${billId}`,
    method: 'get',
  })
}
