import request from "@/utils/request";

// 查询厂商列表
export function listVendor(query) {
  return request({
    url: "/iot/vendor/list",
    method: "get",
    params: query
  });
}

// 查询厂商详细
export function getVendor(vendorId) {
  return request({
    url: "/iot/vendor/" + vendorId,
    method: "get"
  });
}

// 新增厂商
export function addVendor(data) {
  return request({
    url: "/iot/vendor",
    method: "post",
    data: data
  });
}

// 修改厂商
export function updateVendor(data) {
  return request({
    url: "/iot/vendor",
    method: "put",
    data: data
  });
}

// 删除厂商
export function delVendor(vendorId) {
  return request({
    url: "/iot/vendor/" + vendorId,
    method: "delete"
  });
}

// 导出厂商
export function exportVendor(query) {
  return request({
    url: "/iot/vendor/export",
    method: "get",
    params: query
  });
}
