import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 微信用户表分页查询
 * @param {查询条件} data
 */
export function listGiftUser(query) {
  return request({
    url: 'business/GiftUser/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增微信用户表
 * @param data
 */
export function addGiftUser(data) {
  return request({
    url: 'business/GiftUser',
    method: 'post',
    data: data,
  })
}
/**
 * 修改微信用户表
 * @param data
 */
export function updateGiftUser(data) {
  return request({
    url: 'business/GiftUser',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取微信用户表详情
 * @param {Id}
 */
export function getGiftUser(id) {
  return request({
    url: 'business/GiftUser/' + id,
    method: 'get'
  })
}

/**
 * 删除微信用户表
 * @param {主键} pid
 */
export function delGiftUser(pid) {
  return request({
    url: 'business/GiftUser/delete/' + pid,
    method: 'POST'
  })
}
// 导出微信用户表
export async function exportGiftUser(query) {
  await downFile('business/GiftUser/export', { ...query })
}
