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

export function couponList(data) {
  return request({
    url: `/coupon/list?moduleId=${data.moduleId}`,
    method: "post",
    data,
  });
}

export function couponListExport(data, name) {
  return postBlob({
    url: "/coupon/list/export",
    data,
    name,
  });
}

export function couponAdd(data) {
  return request({
    url: `/coupon/add`,
    method: "post",
    data,
  });
}

export function couponUpdate(data) {
  return request({
    url: `/coupon/update`,
    method: "post",
    data,
  });
}

export function couponDetail(params) {
  return request({
    url: `/coupon/detail`,
    method: "get",
    params,
  });
}
export function couponCancel(params) {
  return request({
    url: `/coupon/cancel`,
    method: "get",
    params,
  });
}
