import request from '@/utils/request'

// 查询会员优惠券列表
export function listUserCoupon(query) {
  return request({
    url: '/his/userCoupon/list',
    method: 'get',
    params: query
  })
}
export function getListUserCoupon(query) {
  return request({
    url: '/his/userCoupon/getList',
    method: 'get',
    params: query
  })
}
// 查询会员优惠券详细
export function getUserCoupon(id) {
  return request({
    url: '/his/userCoupon/' + id,
    method: 'get'
  })
}

// 新增会员优惠券
export function addUserCoupon(data) {
  return request({
    url: '/his/userCoupon',
    method: 'post',
    data: data
  })
}
export function sendCoupon(data) {
  return request({
    url: '/his/userCoupon/sendCoupon',
    method: 'post',
    data: data
  })
}

// 修改会员优惠券
export function updateUserCoupon(data) {
  return request({
    url: '/his/userCoupon',
    method: 'put',
    data: data
  })
}

// 删除会员优惠券
export function delUserCoupon(id) {
  return request({
    url: '/his/userCoupon/' + id,
    method: 'delete'
  })
}

// 导出会员优惠券
export function exportUserCoupon(query) {
  return request({
    url: '/his/userCoupon/export',
    method: 'get',
    params: query
  })
}
