import request from '@/utils/request'

// 创建用户信息
export function createUserInfo(data) {
  return request({
    url: '/system/user-info/create',
    method: 'post',
    data: data
  })
}

// 更新用户信息
export function updateUserInfo(data) {
  return request({
    url: '/system/user-info/update',
    method: 'put',
    data: data
  })
}

// 删除用户信息
export function deleteUserInfo(id) {
  return request({
    url: '/system/user-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户信息
export function getUserInfo(id) {
  return request({
    url: '/system/user-info/get?id=' + id,
    method: 'get'
  })
}

// 获得用户信息分页
export function getUserInfoPage(query) {
  return request({
    url: '/system/user-info/page',
    method: 'get',
    params: query
  })
}

// 导出用户信息 Excel
export function exportUserInfoExcel(query) {
  return request({
    url: '/system/user-info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
