import request from '@/utils/request'

// 查询优惠劵列表
export function listInfo(query) {
  return request({
    url: '/coupon/info/list',
    method: 'get',
    params: query
  })
}

// 查询优惠劵详细
export function getInfo(id) {
  return request({
    url: '/coupon/info/' + id,
    method: 'get'
  })
}

// 新增优惠劵
export function addInfo(data) {
  return request({
    url: '/coupon/info',
    method: 'post',
    data: data
  })
}



// 修改优惠劵
export function updateInfo(data) {
  return request({
    url: '/coupon/info',
    method: 'put',
    data: data
  })
}

// 删除优惠劵
export function delInfo(id) {
  return request({
    url: '/coupon/info/' + id,
    method: 'delete'
  })
}

// 导出优惠劵
export function exportInfo(query) {
  return request({
    url: '/coupon/info/export',
    method: 'get',
    params: query
  })
}

// 导出优惠劵
export function verificationList(query) {
  return request({
    url: '/station/info/selectStationDifferent',
    method: 'get',
    params: query
  })
}


// 导出优惠劵
export function changeCouponStatus(data) {
  return request({
    url: '/system/dept/updateDeptInfo',
    method: 'put',
    data: data
  })
}

// 新增优惠劵发放方式
export function addIssue(data) {
  return request({
    url: '/coupon/issue',
    method: 'post',
    data: data
  })
}

// 修改优惠劵发放方式
export function updateIssue(data) {
  return request({
    url: '/coupon/issue',
    method: 'put',
    data: data
  })
}
// 查询发放方式
export function listIssue(query) {
  return request({
    url: '/coupon/issue/list',
    method: 'get',
    params: query
  })
}

// 新增优惠劵发放方式
export function upIssueStatus(data) {
  return request({
    url: '/coupon/issue/updateCouponIssueStatus',
    method: 'put',
    data: data
  })
}