import request from '@/utils/request'

// 分页查询访客访问记录列表
export function pageListRecord(query) {
  return request({
    url: '/visit/record/pageList',
    method: 'get',
    params: query
  })
}

// 查询访客访问记录列表
export function listRecord(query) {
  return request({
    url: '/visit/record/list',
    method: 'get',
    params: query
  })
}

// 查询访客访问记录详细
export function getRecord(id) {
  return request({
    url: '/visit/record/' + id,
    method: 'get'
  })
}

// 新增访客访问记录
export function addRecord(data) {
  return request({
    url: '/visit/record',
    method: 'post',
    data: data
  })
}

// 修改访客访问记录
export function updateRecord(data) {
  return request({
    url: '/visit/record',
    method: 'put',
    data: data
  })
}

// 删除访客访问记录
export function delRecord(id) {
  return request({
    url: '/visit/record/' + id,
    method: 'delete'
  })
}

// 导出访客访问记录
export function exportRecord(query) {
  return request({
    url: '/visit/record/' + 'export',
    method: 'post',
    params: query
  })
}
