import request from '@/utils/request'

// 查询优惠卷发放列表
export function listUserCoupon(query) {
  return request({
    url: '/mall/userCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询优惠卷发放详细
export function getUserCoupon(cuId) {
  return request({
    url: '/mall/userCoupon/' + cuId,
    method: 'get'
  })
}

// 新增优惠卷发放
export function addUserCoupon(data) {
  return request({
    url: '/mall/userCoupon',
    method: 'post',
    data: data
  })
}

// 修改优惠卷发放
export function updateUserCoupon(data) {
  return request({
    url: '/mall/userCoupon',
    method: 'put',
    data: data
  })
}

// 删除优惠卷发放
export function delUserCoupon(cuId) {
  return request({
    url: '/mall/userCoupon/' + cuId,
    method: 'delete'
  })
}
