import request from '@/utils/request'

// 查询会员券发放记录列表
export function listWechatMemberCoupon(query) {
  return request({
    url: '/mall/wechatMemberCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询会员券发放记录详细
export function getWechatMemberCoupon(id) {
  return request({
    url: '/mall/wechatMemberCoupon/' + id,
    method: 'get'
  })
}

// 新增会员券发放记录
export function addWechatMemberCoupon(data) {
  return request({
    url: '/mall/wechatMemberCoupon',
    method: 'post',
    data: data
  })
}

// 发放会员券
export function sendCoupon(data) {
  return request({
    url: '/mall/wechatMemberCoupon/send',
    method: 'post',
    data: data
  })
}

// 修改会员券发放记录
export function updateWechatMemberCoupon(data) {
  return request({
    url: '/mall/wechatMemberCoupon',
    method: 'put',
    data: data
  })
}

// 删除会员券发放记录
export function delWechatMemberCoupon(id) {
  return request({
    url: '/mall/wechatMemberCoupon/' + id,
    method: 'delete'
  })
}

// 导出会员券发放记录
export function exportWechatMemberCoupon(query) {
  return request({
    url: '/mall/wechatMemberCoupon/export',
    method: 'get',
    params: query
  })
}