import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listMaintenance(query) {
  return request({
    url: '/ruleEngine/maintenance/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getMaintenance(id) {
  return request({
    url: '/ruleEngine/maintenance/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addMaintenance(data) {
  return request({
    url: '/ruleEngine/maintenance',
    method: 'post',
    data: data
  })
}

// 初始化
export function initializeRuleEngine(data) {
  return request({
    url: '/ruleEngine/maintenance/InitializeRuleEngine',
    method: 'post',
    data: data
  })
}
//测试方法
export function testMethod(code) {
  return request({
    url: '/ruleEngine/maintenance/TestMethod?code='+code,
    method: 'get'
  })
}

// 修改【请填写功能名称】
export function updateMaintenance(data) {
  return request({
    url: '/ruleEngine/maintenance',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delMaintenance(id) {
  return request({
    url: '/ruleEngine/maintenance/' + id,
    method: 'delete'
  })
}



export function selectEngineVersionListByEngineId(id) {
  return request({
    url: '/ruleEngine/maintenance/selectEngineVersionListByEngineId/' + id,
    method: 'get'
  })
}
