import request from '@/utils/request'

// 查询会员卡权益列表
export function listCardRights(query) {
  return request({
    url: '/base/cardRights/list',
    method: 'get',
    params: query
  })
}

// 查询会员卡权益详细
export function getCardRights(query) {
  return request({
    url: '/base/cardRights/getByCardId',
    method: 'get',
    params: query
  })
}

// 保存会员卡权益
export function addCardRights(data) {
  return request({
    url: '/base/cardRights/saveAndUpdate',
    method: 'post',
    data: data
  })
}

// 修改会员卡权益
export function updateCardRights(data) {
  return request({
    url: '/base/cardRights',
    method: 'put',
    data: data
  })
}

// 删除会员卡权益
export function delCardRights(id) {
  return request({
    url: '/base/cardRights/' + id,
    method: 'delete'
  })
}
