import request from '@/utils/request'

// 查询积分红包主列表
export function listPointsRedPacket(query) {
  return request({
    url: '/system/pointsRedPacket/list',
    method: 'get',
    params: query
  })
}

// 查询积分红包主详细
export function getPointsRedPacket(id) {
  return request({
    url: '/system/pointsRedPacket/' + id,
    method: 'get'
  })
}

// 新增积分红包主
export function addPointsRedPacket(data) {
  return request({
    url: '/system/pointsRedPacket',
    method: 'post',
    data: data
  })
}

// 修改积分红包主
export function updatePointsRedPacket(data) {
  return request({
    url: '/system/pointsRedPacket',
    method: 'put',
    data: data
  })
}

// 删除积分红包主
export function delPointsRedPacket(id) {
  return request({
    url: '/system/pointsRedPacket/' + id,
    method: 'delete'
  })
}
