物业代码生成
This commit is contained in:
61
apps/web-antd/src/api/property/building/index.ts
Normal file
61
apps/web-antd/src/api/property/building/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { BuildingVO, BuildingForm, BuildingQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询建筑管理列表
|
||||
* @param params
|
||||
* @returns 建筑管理列表
|
||||
*/
|
||||
export function buildingList(params?: BuildingQuery) {
|
||||
return requestClient.get<PageResult<BuildingVO>>('/property/building/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出建筑管理列表
|
||||
* @param params
|
||||
* @returns 建筑管理列表
|
||||
*/
|
||||
export function buildingExport(params?: BuildingQuery) {
|
||||
return commonExport('/property/building/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询建筑管理详情
|
||||
* @param id id
|
||||
* @returns 建筑管理详情
|
||||
*/
|
||||
export function buildingInfo(id: ID) {
|
||||
return requestClient.get<BuildingVO>(`/property/building/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增建筑管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function buildingAdd(data: BuildingForm) {
|
||||
return requestClient.postWithMsg<void>('/property/building', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新建筑管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function buildingUpdate(data: BuildingForm) {
|
||||
return requestClient.putWithMsg<void>('/property/building', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除建筑管理
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function buildingRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/building/${id}`);
|
||||
}
|
Reference in New Issue
Block a user