import request from '@/utils/request'

// 查询每日账单统计列表
export function listDayIncomeStatistics(query) {
  return request({
    url: '/cai/dayIncomeStatistics/list',
    method: 'get',
    params: query
  })
}

// 查询每日账单统计详细
export function getDayIncomeStatistics(id) {
  return request({
    url: '/cai/dayIncomeStatistics/' + id,
    method: 'get'
  })
}

// 新增每日账单统计
export function addDayIncomeStatistics(data) {
  return request({
    url: '/cai/dayIncomeStatistics',
    method: 'post',
    data: data
  })
}

export function refreshTodayDayIncomeStatistics(data) {
  return request({
    url: '/cai/dayIncomeStatistics/refreshToday',
    method: 'post',
    data: data
  })
}

export function refreshLastDayDayIncomeStatistics(data) {
  return request({
    url: '/cai/dayIncomeStatistics/refreshLastDay',
    method: 'post',
    data: data
  })
}

// 修改每日账单统计
export function updateDayIncomeStatistics(data) {
  return request({
    url: '/cai/dayIncomeStatistics',
    method: 'put',
    data: data
  })
}

// 删除每日账单统计
export function delDayIncomeStatistics(id) {
  return request({
    url: '/cai/dayIncomeStatistics/' + id,
    method: 'delete'
  })
}
