import request from "@/utils/request";

// 查询订单分成记录列表
export function listDivide(query) {
  return request({
    url: "/merchant/divide/list",
    method: "get",
    params: query,
  });
}

// 数据
export function platformRevenueDivGET(query) {
  return request({
    url: "/system/data/platformRevenueDiv",
    method: "get",
    params: query,
  });
}

// 查询订单分成记录详细
export function getDivide(id) {
  return request({
    url: "/merchant/divide/" + id,
    method: "get",
  });
}

// 新增订单分成记录
export function addDivide(data) {
  return request({
    url: "/merchant/divide",
    method: "post",
    data: data,
  });
}

// 修改订单分成记录
export function updateDivide(data) {
  return request({
    url: "/merchant/divide",
    method: "put",
    data: data,
  });
}

// 删除订单分成记录
export function delDivide(id) {
  return request({
    url: "/merchant/divide/" + id,
    method: "delete",
  });
}
