1、单元
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s
2、房间
This commit is contained in:
61
apps/web-antd/src/api/property/room/index.ts
Normal file
61
apps/web-antd/src/api/property/room/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { RoomVO, RoomForm, RoomQuery } 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 roomList(params?: RoomQuery) {
|
||||
return requestClient.get<PageResult<RoomVO>>('/property/room/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出房间信息列表
|
||||
* @param params
|
||||
* @returns 房间信息列表
|
||||
*/
|
||||
export function roomExport(params?: RoomQuery) {
|
||||
return commonExport('/property/room/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房间信息详情
|
||||
* @param id id
|
||||
* @returns 房间信息详情
|
||||
*/
|
||||
export function roomInfo(id: ID) {
|
||||
return requestClient.get<RoomVO>(`/property/room/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房间信息
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function roomAdd(data: RoomForm) {
|
||||
return requestClient.postWithMsg<void>('/property/room', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新房间信息
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function roomUpdate(data: RoomForm) {
|
||||
return requestClient.putWithMsg<void>('/property/room', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间信息
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function roomRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/room/${id}`);
|
||||
}
|
Reference in New Issue
Block a user