import request from '@/utils/request'


export function voucherSave(query) {
  return request({
    url: 'system/voucher/saveOrUpdates',
    method: 'post',
    data: query
  })
}


export function voucherRemove(query) {
  return request({
    url: 'system/voucher/' + query,
    method: 'delete',
  })
}

export function queryPage(query) {
  return request({
    url: 'system/voucher/queryPage',
    method: 'get',
    params: query
  })
}
// 连锁店分页查询
export function storeMultipleShopQueryPage(query) {
  return request({
    url: 'system/storeMultipleShop/queryPage',
    method: 'get',
    params: query
  })
}
export function voucherInfo(query) {
  return request({
    url: 'system/voucher/info/' + query,
    method: 'get',
  })
}
// 根据代金券id查询关联店铺信息
export function queryPageByVoucherId(query) {
  return request({
    url: 'system/storeVoucherRel/queryPageByVoucherId',
    method: 'get',
    params: query
  })
}
// 根据代金券id移除店铺
export function queryPageByVoucherIdRemove(query) {
  return request({
    url: 'system/storeVoucherRel/removeStoreByVoucherId',
    method: 'get',
    params: query
  })
}
// 联合券用户店铺详情模糊查询
export function getStoreInfoByKey(query) {
  return request({
    url: 'system/appUser/getStoreInfoByKey',
    method: 'get',
    params: query
  })
}
export function enable(query) {
  return request({
    url: 'system/voucher/enable',
    method: 'get',
    params: query
  })
}

export function voucherStatistics(query) {
  return request({
    url: 'system/voucher/voucherStatistics',
    method: 'get',
    params: query
  })
}

export function recordPage(query) {
  return request({
    url: 'system/voucher/recordPage',
    method: 'get',
    params: query
  })
}

