import request from '@/utils/request'

// 商户类型统计
export function businessStatistics(data) {
  return request({
    url: '/system/home/business-statistics',
    method: 'get',
  })
}
// 商户订单TOP10数
export function ticketOrderStatistics(data) {
  return request({
    url: '/system/home/ticket-order-statistics',
    method: 'get',
  })
}
// 头部合计
export function homeTop(data) {
  return request({
    url: '/system/home/top',
    method: 'get',
  })
}
// 用户最近七日注册数
export function userStatistics(data) {
  return request({
    url: '/system/home/user-statistics',
    method: 'get',
  })
}

// 根据时间（天）统计订单
export function shopOrderDaysCount(query) {
  return request({
    url: '/order/shopOrder/days-count',
    method: 'get',
    params: query
  })
}
// 商家订单单值统计
export function shopOrderSingleCount() {
  return request({
    url: '/order/shopOrder/single-count',
    method: 'get',
  })
}
// 统计订单数与同比值
export function statisticsOrderNum(query) {
  return request({
    url: '/order/shopOrder/statistics-order-num/year-on-year',
    method: 'get',
    params: query
  })
}
// 统计订单销售额与同比值
export function statisticsOrderAmount(query) {
  return request({
    url: '/order/shopOrder/statistics-order-amount/year-on-year',
    method: 'get',
    params: query
  })
}
// 商品统计
export function productCount(query) {
  return request({
    url: '/shop/product/count',
    method: 'get',
    params: query
  })
}
// 会员统计
export function userBusinessRoleCount(query) {
  return request({
    url: '/user/userBusinessRole/count',
    method: 'get',
    params: query
  })
}