import request from '@/utils/request'

// 查询文件信息列表
export function listUpgradeFile(query) {
  return request({
    url: '/api/upgradeFile/list',
    method: 'get',
    params: query
  })
}

// 查询文件信息详细
export function getUpgradeFile(fileId) {
  return request({
    url: '/api/upgradeFile/' + fileId,
    method: 'get'
  })
}

// 新增文件信息
export function addUpgradeFile(data) {
  return request({
    url: '/api/upgradeFile',
    method: 'post',
    data: data
  })
}

// 修改文件信息
export function updateUpgradeFile(data) {
  return request({
    url: '/api/upgradeFile',
    method: 'put',
    data: data
  })
}

// 删除文件信息
export function delUpgradeFile(fileId) {
  return request({
    url: '/api/upgradeFile/' + fileId,
    method: 'delete'
  })
}

// 文件下发
export function distributeUpgradeFile(data) {
  return request({
    url: '/api/upgradeFile/fileSend',
    method: 'post',
    data: data
  })
}
