import request from '@/utils/request'

/**
 * 获取门店经营日报数据
 * @returns {Promise} 返回门店经营日报数据
 */
export function getStoreDashboard() {
  return request({
    url: '/mapi/settlement/store/statistics/dashboard',
    method: 'get'
  })
}

/**
 * 获取门店经营日报数据
 * @param {string} date 日期，格式：yyyy-MM-dd
 * @returns {Promise} 返回门店经营日报数据
 */
export function getStoreDailyStatistics(date) {
  return request({
    url: '/mapi/settlement/store/statistics/daily',
    method: 'get',
    params: { date }
  })
}

/**
 * 获取门店经营日报趋势数据
 * @param {string} startDate 开始日期，格式：yyyy-MM-dd
 * @param {string} endDate 结束日期，格式：yyyy-MM-dd
 * @returns {Promise} 返回门店经营日报趋势数据
 */
export function getStoreDailyTrend(startDate, endDate) {
  return request({
    url: '/mapi/settlement/store/statistics/trend',
    method: 'get',
    params: { startDate, endDate }
  })
}

/**
 * 获取门店每日交易统计列表
 * @param {Object} query 查询参数
 * @returns {Promise} 返回门店每日交易统计列表
 */
export function listStoreStatistics(query) {
  return request({
    url: '/mapi/settlement/store/statistics/list',
    method: 'get',
    params: query
  })
}

/**
 * 获取门店每日充值统计列表
 * @param {Object} query 查询参数
 * @returns {Promise} 返回门店每日充值统计列表
 */
export function listStoreChargeStatistics(query) {
  return request({
    url: '/mapi/settlement/store/statistics/charge/list',
    method: 'get',
    params: query
  })
} 