import request, { postBlob, getBlob, handleImport } from '@/utils/request'

export function promotionQuestionnaireList(data) {
  return request({
    url: `/promotion/questionnaire/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function promotionQuestionnaireExport(data, name) {
  return postBlob({
    url: '/promotion/questionnaire/export',
    data,
    name
  })
}

export function promotionQuestionnaireAdd(data) {
  return request({
    url: `/promotion/questionnaire/add`,
    method: 'post',
    data
  })
}

export function promotionQuestionnaireDetail(params) {
  return request({
    url: '/promotion/questionnaire/detail',
    method: 'post',
    params
  })
}

export function promotionQuestionnaireStop(params) {
  return request({
    url: '/promotion/questionnaire/stop',
    method: 'post',
    params
  })
}

export function promotionQuestionnaireShow(params) {
  return request({
    url: '/promotion/questionnaire/show',
    method: 'post',
    params
  })
}

export function promotionQuestionnaireDownload(params) {
  return getBlob({
    url: 'promotion/questionnaire/download',
    params
  })
}
