import request from '@/utils/request'

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

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

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

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

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