import request from '@/utils/request'

// 查询取消规则列表
export function listCancelRule(query) {
  return request({
    url: '/system/cancelRule/list',
    method: 'get',
    params: query
  })
}

// 查询取消规则详细
export function getCancelRule(cancalId) {
  return request({
    url: '/system/cancelRule/' + cancalId,
    method: 'get'
  })
}

// 新增取消规则
export function addCancelRule(data) {
  return request({
    url: '/system/cancelRule',
    method: 'post',
    data: data
  })
}

// 修改取消规则
export function updateCancelRule(data) {
  return request({
    url: '/system/cancelRule',
    method: 'put',
    data: data
  })
}

// 删除取消规则
export function delCancelRule(cancalId) {
  return request({
    url: '/system/cancelRule/' + cancalId,
    method: 'delete'
  })
}
