import { baseHttpUtils } from "@/utils/http/baseHttpUtils";
import { middlewareHttpUtils } from "@/utils/http/middlewareHttpUtils";
import { object_pre } from "./preTypes";
export interface QueryReq {
  orders: string;
  pageNumber: number;
  pageSize: number;
}
class FloorController {
  private static http = new middlewareHttpUtils();
  // static http = new baseHttpUtils();
  /**
   * 获取建筑楼层
   * @param {QueryReq} params
   * @returns
   */
  static async floorQuery(params: QueryReq) {
    let result = await this.http.postRequest("/object/floor/query", params);
    result.content = result.content || result.data;
    return result;
  }
  /**
   * 建筑楼层管理-创建楼层
   * @param params
   * @returns
   */
  static async manageCreateFloor(params) {
    return this.http.postRequest(object_pre + "/floor/create", params);
  }
  /**
   * 建筑楼层管理-修改楼层
   * @param params
   * @returns
   */
  static async manageUpdateFloor(params) {
    return this.http.postRequest(object_pre + "/floor/update", params);
  }
}
export default FloorController;
