import request from "@/utils/request";

// 查询兑换订单列表
export function listRedeemOrder(query) {
  return request({
    url: "/brewery/redeemOrder/list",
    method: "get",
    params: query,
  });
}

// 查询兑换订单详细
export function getRedeemOrder(id) {
  return request({
    url: "/brewery/redeemOrder/" + id,
    method: "get",
  });
}

// 新增兑换订单
export function addRedeemOrder(data) {
  return request({
    url: "/brewery/redeemOrder",
    method: "post",
    data: data,
  });
}

// 修改兑换订单
export function updateRedeemOrder(data) {
  return request({
    url: "/brewery/redeemOrder",
    method: "put",
    data: data,
  });
}

// 删除兑换订单
export function delRedeemOrder(id) {
  return request({
    url: "/brewery/redeemOrder/" + id,
    method: "delete",
  });
}

// 导出兑换订单
export function exportRedeemOrder(query) {
  return request({
    url: "/brewery/redeemOrder/export",
    method: "post",
    params: query,
  });
}

// 取消订单
export function cancelRedeemOrder(data) {
  return request({
    url: "/brewery/redeemOrder/cancel",
    method: "post",
    data: data,
  });
}

// 订单发货
export function deliveryRedeemOrder(data) {
  return request({
    url: "/brewery/redeemOrder/delivery",
    method: "post",
    data: data,
  });
}

// 活动奖励兑付订单接口
export function activityRedeemOrder(data) {
  return request({
    url: "/brewery/order/rewardOrderList",
    method: "get",
    data: data,
  });
}

// 查询品牌方活动兑付订单详情
export function getOrderInfo(id) {
  return request({
    url: "/brewery/order/" + id,
    method: "get",
  });
}

//  品牌方兑付订单发货
export function dispatchRew(data) {
  return request({
    url: "/brewery/order/dispatchRew",
    method: "post",
    data: data,
  });
}
