import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_API
// 查询企业租户列表
export function listCompletion(query) {
  return request({
    url: baseUrl + '/business/completion/list',
    method: 'get',
    params: query
  })
}

// 查询企业租户详细
export function getCompletion(id) {
  return request({
    url: baseUrl + '/business/completion/' + id,
    method: 'get'
  })
}

// 新增企业租户
export function addCompletion(data) {
  return request({
    url: baseUrl + '/business/completion',
    method: 'post',
    data: data
  })
}

// 修改企业租户
export function updateCompletion(data) {
  return request({
    url: baseUrl + '/business/completion',
    method: 'put',
    data: data
  })
}

// 删除企业租户
export function delCompletion(id) {
  return request({
    url: baseUrl + '/business/completion/' + id,
    method: 'delete'
  })
}

export function listStatistics(query) {
  return request({
    url: baseUrl + '/business/completion/listStatistics',
    method: 'get',
    params: query
  })
}
