All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m16s
2、房间
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
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}`);
|
|
}
|