import request from '@/utils/request'

// 查询收入统计
export function getIncomeStats(query) {
  return request({
    url: '/merchant/finance/income/stats',
    method: 'get',
    params: query
  })
}

// 查询账单明细
export function listBill(query) {
  return request({
    url: '/merchant/finance/bill',
    method: 'get',
    params: query
  })
}

// 查询提现申请列表
export function listWithdraw(query) {
  return request({
    url: '/merchant/finance/withdraw/list',
    method: 'get',
    params: query
  })
}

// 审核提现申请
export function auditWithdraw(data) {
  return request({
    url: '/merchant/finance/withdraw/audit',
    method: 'post',
    data: data
  })
}

// 获取财务概览
export function getFinanceOverview() {
  return request({
    url: '/merchant/finance/overview',
    method: 'get'
  })
}
