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

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

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

export function adminCompanyListExport(data, name) {
  return postBlob({
    url: "/admin/company/list/export",
    data,
    name,
  });
}

export function adminCompanyAdd(data) {
  return request({
    url: `/admin/company/add`,
    method: "post",
    data,
  });
}

export function adminCompanyEdit(data) {
  return request({
    url: `/admin/company/edit`,
    method: "post",
    data,
  });
}

export function adminCompanyDetail(params) {
  return request({
    url: `/admin/company/detail`,
    method: "post",
    params,
  });
}
