import request from '@/utils/request'

// 查询
export function list(data) {
  return request({
    url: '/api/zdcx/query',
    method: 'post',
    data: data
  })
}

// 查询
export function getConfig(configId) {
  return request({
    url: '/system/config/' + configId,
    method: 'get'
  })
}

// 查询
export function getConfigKey(configKey) {
  return request({
    url: '/system/config/configKey/' + configKey,
    method: 'get'
  })
}

// 新增
export function add(data) {
  return request({
    url: '/api/zdcx/save',
    method: 'post',
    data: data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/api/zdcx/save',
    method: 'post',
    data: data
  })
}

// 删除
export function delConfig(configId) {
  return request({
    url: '/system/config/' + configId,
    method: 'delete'
  })
}

// 刷新
export function refreshCache() {
  return request({
    url: '/system/config/refreshCache',
    method: 'delete'
  })
}
