import request from '@/utils/request'

// 查询规则列表
export function listRule(query) {
  return request({
    url: '/rule/rule/list',
    method: 'post',
    params: query
  })
}

// 查询规则详细
export function getRule(id) {
  return request({
    url: '/rule/rule/findById/' + id,
    method: 'get'
  })
}

// 新增规则
export function addRule(data) {
  return request({
    url: '/rule/rule/insert',
    method: 'post',
    data: data
  })
}

// 修改规则
export function updateRule(data) {
  return request({
    url: '/rule/rule/update',
    method: 'put',
    data: data
  })
}


// 删除规则
export function delRule(id) {
  return request({
    url: '/rule/rule/delete/' + id,
    method: 'delete'
  })
}


