import request from '@/utils/request'

// 查询微信商家券列表
export function listWechatStock(query) {
  return request({
    url: '/mall/wechatStock/list',
    method: 'get',
    params: query
  })
}

// 查询微信商家券详细
export function getWechatStock(id) {
  return request({
    url: '/mall/wechatStock/' + id,
    method: 'get'
  })
}

// 新增微信商家券
export function addWechatStock(data) {
  return request({
    url: '/mall/wechatStock',
    method: 'post',
    data: data
  })
}

// 修改微信商家券
export function updateWechatStock(data) {
  return request({
    url: '/mall/wechatStock',
    method: 'put',
    data: data
  })
}

// 删除微信商家券
export function delWechatStock(id) {
  return request({
    url: '/mall/wechatStock/' + id,
    method: 'delete'
  })
}

// 导出微信商家券
export function exportWechatStock(query) {
  return request({
    url: '/mall/wechatStock/export',
    method: 'get',
    params: query
  })
}