import request from '@/utils/request'

// 查询参数列表
export function listBookInfo(query) {
  return request({
    url: '/system/book-info/list',
    method: 'get',
    params: query
  })
}

// 查询参数详细
export function getBookInfo(configId) {
  return request({
    url: '/system/book-info/' + configId,
    method: 'get'
  })
}

// 根据参数键名查询参数值


// 新增参数配置
export function addBookInfo(data) {
  return request({
    url: '/system/book-info',
    method: 'post',
    data: data
  })
}

// 修改参数配置
export function updateBookInfo(data) {
  return request({
    url: '/system/book-info',
    method: 'put',
    data: data
  })
}

// 删除参数配置
export function delBookInfo(configId) {
  return request({
    url: '/system/book-info/' + configId,
    method: 'delete'
  })
}

// 刷新参数缓存
export function refreshCache() {
  return request({
    url: '/system/book-info/refreshCache',
    method: 'delete'
  })
}
