import request from "@/utils/request.js";

/**
 * 新增打印机
 * @param {*} data
 * @returns
 */
export function tbPrintMachinePost(data, method = "post") {
  return request({
    method: method,
    url: "tbPrintMachine",
    data,
  });
}

/**
 * 分页查询打印机
 * @param {*} params
 * @returns
 */
export function tbPrintMachineGet(params) {
  return request({
    method: "get",
    url: "/tbPrintMachine",
    params,
  });
}

/**
 * 通过主键查询打印机
 * @param {*} params
 * @returns
 */
export function tbPrintMachineDetail(id) {
  return request({
    method: "get",
    url: `/tbPrintMachine/${id}`,
  });
}

/**
 * 删除打印机
 * @param {*} data
 * @returns
 */
export function tbPrintMachineDelete(params) {
  return request({
    method: "DELETE",
    url: "tbPrintMachine",
    params,
  });
}

/**
 * 根据类型查询打印机列表
 * @param {*} params
 * @returns
 */
export function bySubType(params) {
  return request({
    method: "get",
    url: "/tbPrintMachine/bySubType",
    params,
  });
}

/**
 * 商品分类列表
 * @returns
 */
export function tbShopCategoryGet(params) {
  return request({
    url: `/product/queryAllCategory`,
    method: "get",
    params,
  });
}
